diff --git a/ASSET-LICENSE.md b/ASSET-LICENSE.md index 9519836..50933b5 100644 --- a/ASSET-LICENSE.md +++ b/ASSET-LICENSE.md @@ -1,15 +1,14 @@ -# straywild Asset License 1.1 +# NETfishing Asset License 1.0 Copyright © 2026 Woofmeow. All rights reserved except for the permissions expressly granted below. ## 1. Scope -This license applies to original straywild artwork, graphics, textures, +This license applies to original NETfishing artwork, graphics, textures, models, animations, music, sound recordings, narrative content, visual -designs, characters, and other creative assets owned by the straywild owners -or licensed to them with authority to sublicense, publishing as Woofmeow (the -**“straywild Assets”**). +designs, characters, and other creative assets owned by the NETfishing owners, +publishing as Woofmeow (the **“NETfishing Assets”**). It does not apply to: @@ -17,171 +16,118 @@ 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 straywild and Woofmeow names and logos, which are addressed in +- the NETfishing 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 straywild Software** means: +**Official NETfishing Software** means: -- 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 +- 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 revision. **Mod** means a non-standalone add-on created to operate with Official -straywild Software. A Mod may add, replace, or alter content loaded by the -Official straywild Software, but it may not redistribute a replacement copy +NETfishing Software. A Mod may add, replace, or alter content loaded by the +Official NETfishing 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 -straywild source repository that is created and maintained in good faith -primarily to prepare, test, review, or submit changes for possible inclusion -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 straywild project. - ## 3. Permission to use the official game -You may reproduce straywild Assets as technically necessary to install, run, -back up, and privately modify a lawfully obtained copy of Official straywild +You may reproduce NETfishing Assets as technically necessary to install, run, +back up, and privately modify a lawfully obtained copy of Official NETfishing Software. You may capture, publish, and monetize screenshots, gameplay videos, livestreams, reviews, tutorials, and similar commentary showing a lawfully -obtained copy of straywild. This permission does not authorize redistribution +obtained copy of NETfishing. 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 straywild -Assets solely as part of a Mod for Official straywild Software. +Subject to this license, you may create, modify, and distribute NETfishing +Assets solely as part of a Mod for Official NETfishing 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 -straywild Assets reasonably necessary for the Mod to function. It does not +NETfishing 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 straywild Software; +1. require a separately obtained copy of Official NETfishing Software; 2. be presented as unofficial community content; 3. include the following notice in its documentation or distribution page: - > Contains or adapts straywild assets © 2026 Woofmeow, used under the - > straywild Asset License 1.1. This Mod is unofficial and is not endorsed + > Contains or adapts NETfishing assets © 2026 Woofmeow, used under the + > NETfishing Asset License 1.0. This Mod is unofficial and is not endorsed > by Woofmeow. -4. identify material created by the Mod author separately from straywild +4. identify material created by the Mod author separately from NETfishing 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 straywild +charging for access to it, licensing it commercially, or using NETfishing Assets in paid products requires separate written permission from both -straywild owners. +NETfishing owners. -## 5. Contribution Fork license +## 5. Uses not permitted -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. +Except with separate written permission from both NETfishing owners, you may +not use or distribute NETfishing Assets: -This permission is worldwide, nonexclusive, royalty-free, and available for -as long as you comply with this license. Public source-control hosting of the -Contribution Fork and the repository history technically necessary for that -fork are permitted distributions. - -A Contribution Fork must: - -1. remain primarily directed toward preparing changes for possible inclusion - 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; -4. limit test-build access to the owners, maintainers, contributors, and - testers directly participating in development or review of the proposed - contribution; -5. not publish general-audience binaries, releases, packages, or downloads, - operate a persistent public alternative service, or monetize access; -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 straywild Software or its services. - -Submitting work from a Contribution Fork is governed separately by -`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 straywild Assets. - -## 6. Uses not permitted - -Except as expressly permitted by Sections 3, 4, and 5 or by separate written -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 straywild code that is not - Official straywild Software, except for nonpublic contribution-testing - builds permitted by Section 5; +- in a fork, clone, remake, sequel, or standalone game; +- with a modified distribution of the GPL-covered NETfishing code that is not + Official NETfishing Software; - 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 straywild Assets themselves. +- under terms that claim ownership of the NETfishing 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 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. +The GPL permits forks and redistribution of the GPL-covered code. This asset +license does not permit those forks to carry NETfishing Assets. A code fork +must remove or replace the NETfishing Assets and reserved branding unless both +owners grant separate written permission. -## 7. Ownership of Mods and contribution work +## 6. Ownership of Mods -You retain ownership of your original Mod material and original material -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. +You retain ownership of your original Mod material. The NETfishing owners +retain ownership of the NETfishing 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 straywild Assets. If -you intentionally submit material for inclusion in straywild, -`CONTRIBUTOR-TERMS.md` applies separately. +This license does not require you to assign your original Mod material to the +NETfishing owners. It also does not grant you ownership of the underlying +NETfishing Assets. -## 8. Termination and cure +## 7. 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 straywild owners do not notify you of the violation +permanently if both NETfishing 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 license. -## 9. No warranty +## 8. No warranty -THE straywild ASSETS ARE PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, +THE NETFISHING 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 straywild ASSETS. +OTHER LIABILITY ARISING FROM THIS LICENSE OR USE OF THE NETFISHING ASSETS. -## 10. Additional permission +## 9. Additional permission -Uses not granted here require written permission from both straywild owners. +Uses not granted here require written permission from both NETfishing 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 2dc5724..62c7813 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,32 +1,14 @@ -# Contribution policy +# Contributing -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 -repositories. +NETfishing is currently developed through focused changes on the repository's +active development branch. Coordinate scope with the project owner before +starting substantial work. -Issues remain available for reproducible bug reports and player feedback. An -Issue is not a request for contributed implementation, and attaching or -linking unsolicited work does not make it an accepted Project contribution. - -The owners may occasionally invite specific work in writing before it is -created or submitted. [`CONTRIBUTOR-TERMS.md`](CONTRIBUTOR-TERMS.md) is retained -to document previously accepted contributions and govern expressly invited -work; it is not a standing invitation to contribute. - -## Contribution forks - -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 -do not publish general-audience builds or use the fork as an independent game -or distribution. - -Private test builds and temporary access-controlled test servers may be shared -only as allowed by that license. Permission to maintain a Contribution Fork -does not authorize unsolicited submission or obligate the owners to review it. +By intentionally submitting material for inclusion, contributors agree to the +applicable grants and representations in +[`CONTRIBUTOR-TERMS.md`](CONTRIBUTOR-TERMS.md). Maintainers must preserve an +affirmative record of that agreement. Contact the owners before submitting if +separate written terms are needed. ## Change discipline @@ -39,15 +21,13 @@ does not authorize unsolicited submission or obligate the owners to review it. - Keep presentation-only systems out of save files and network messages. - Store runtime assets under repository-owned paths; never reference a workstation sync or temporary directory. -- Retain source, permission, and license evidence for newly imported assets. - Update [`docs/ATTRIBUTION.md`](docs/ATTRIBUTION.md) when the accepted work - adds or changes a distributed credit or third-party notice; do not add a - file-by-file inventory of ordinary project-owned assets. +- Record the source and license of newly imported assets in + [`docs/ATTRIBUTION.md`](docs/ATTRIBUTION.md). - Do not assume the GPL code license applies to project assets; observe [`ASSET-LICENSE.md`](ASSET-LICENSE.md) and third-party terms. - Do not commit `.godot/`, test data, logs, captures, or build outputs. -## Before committing a maintainer change +## Before requesting review ```sh git diff --check @@ -68,7 +48,7 @@ tests are supporting evidence, not a replacement. - Do not mix generated build artifacts with source changes. - Do not rewrite published release tags. - Describe behavior, compatibility impact, validation, and asset provenance in - the internal review or release record. + the review or release record. ## Style @@ -79,4 +59,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 straywild Asset License. +identifier to asset files governed by the NETfishing Asset License. diff --git a/CONTRIBUTOR-TERMS.md b/CONTRIBUTOR-TERMS.md index 261de60..8ef207e 100644 --- a/CONTRIBUTOR-TERMS.md +++ b/CONTRIBUTOR-TERMS.md @@ -1,17 +1,12 @@ -# straywild contributor terms +# NETfishing contributor terms -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 -patches, pull requests, assets, or other material. +These terms apply to contributions intentionally submitted for inclusion in +NETfishing after these terms are published. They do not retroactively change +ownership of earlier work or replace a separately signed agreement. -These terms do not retroactively change ownership of earlier work or replace a -separately signed agreement. - -“Owners” means the two straywild co-owners who publish the Project as +“Owners” means the two NETfishing co-owners who publish the Project as Woofmeow and are publicly credited as Voyager and Endeavour. “Project” means -the official straywild game, its servers, tools, documentation, websites, +the official NETfishing game, its servers, tools, documentation, websites, ports, updates, and promotional materials. ## 1. Your ownership and authority @@ -56,8 +51,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 straywild, its promotion, and official successor or -derived straywild products. It does not transfer your copyright or authorize +This grant is limited to NETfishing, its promotion, and official successor or +derived NETfishing 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,23 +73,22 @@ or release. ## 6. No automatic ownership, employment, or payment -Submitting a contribution does not provide ownership of straywild, create an +Submitting a contribution does not provide ownership of NETfishing, 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. ## 7. Acceptance -A contribution is not accepted merely because it was posted, uploaded, linked, -emailed, or discussed. Unsolicited material will not be reviewed or accepted. -The Owners or their authorized maintainers may modify, decline, or later -remove previously accepted or expressly invited work. +A contribution is not accepted merely because it was posted, uploaded, or +discussed. The Owners or their authorized maintainers may accept, modify, +decline, or later remove it. -For work expressly invited in writing, intentionally delivering the requested -material for Project inclusion after receiving notice of these terms records -agreement to the applicable grants above. Maintainers must retain both the -written invitation and the contributor's affirmative agreement in a durable -Project record. +By intentionally submitting a patch, pull request, asset, or other material +for Project inclusion after receiving notice of these terms, you agree to the +applicable grants above. Maintainers should record the contributor’s +affirmative agreement in the pull request, issue, email, or another durable +written record. -Do not send unsolicited work. An owner invitation may instead specify a -separate written arrangement signed by the appropriate parties. +If you cannot agree to these terms, do not submit the contribution; contact +the Owners to discuss a separate written arrangement. diff --git a/README.md b/README.md index e228e7b..47caefa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# straywild +# NETfishing -straywild is a multiplayer-first fishing game built with Godot 4.7. The +NETfishing 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,39 +8,23 @@ 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. -straywild is developed and published by **Woofmeow**, the independent team of +NETfishing 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 straywild from the extracted platform folder. +page, then run NETfishing 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 straywild +launch because it cannot verify the developer. Control-click the NETfishing 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 straywild build downloaded from an official +Only bypass this warning for a NETfishing build downloaded from an official project release. ## Requirements @@ -64,7 +48,7 @@ godot --path . ## Validation The validation scripts isolate Godot's settings and application-data roots. -Run the fast, deterministic suite before committing a change: +Run the fast, deterministic suite before submitting a change: ```sh scripts/run_validations.sh quick @@ -110,16 +94,14 @@ 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 [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 straywild and Woofmeow names and branding are reserved as described in + by the [NETfishing Asset License](ASSET-LICENSE.md). It permits community + Mods for official NETfishing software, but not use in forks, clones, or + unrelated products. +- The NETfishing 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). -- Unsolicited contributions are not accepted. See - [CONTRIBUTING.md](CONTRIBUTING.md). Historical and expressly invited work is - governed by [CONTRIBUTOR-TERMS.md](CONTRIBUTOR-TERMS.md). +- Contributions are accepted under [CONTRIBUTOR-TERMS.md](CONTRIBUTOR-TERMS.md). Material boundaries and binary-release requirements are recorded in that same [`docs/ATTRIBUTION.md`](docs/ATTRIBUTION.md) reference. diff --git a/TRADEMARKS.md b/TRADEMARKS.md index fbf49d5..6848f47 100644 --- a/TRADEMARKS.md +++ b/TRADEMARKS.md @@ -1,7 +1,7 @@ -# straywild and Woofmeow branding +# NETfishing and Woofmeow branding -The straywild and Woofmeow names, logos, icons, trade dress, and other source -identifiers are reserved by the straywild owners, publishing as Woofmeow. +The NETfishing and Woofmeow names, logos, icons, trade dress, and other source +identifiers are reserved by the NETfishing 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,41 +10,27 @@ exist through use and other law. ## Permitted references -You may use the names straywild and Woofmeow truthfully to: +You may use the names NETfishing and Woofmeow truthfully to: - refer to the official game or development team; -- state that software interoperates with or is a Mod for straywild; +- state that software interoperates with or is a Mod for NETfishing; - 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 straywild” if its +An unofficial Mod may use wording such as “Example Mod for NETfishing” 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 -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 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. - -## Other forks and redistributed code +## Forks and redistributed code The GNU GPL permits forks and redistribution of covered code. A fork or -modified distribution that is not a qualifying Contribution Fork must: +modified distribution must: - use a distinct product name; -- remove straywild and Woofmeow logos, icons, and official trade dress; +- remove NETfishing 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 +39,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 -straywild owners. +NETfishing owners. diff --git a/addons/straywild_shoreline_baker/plugin.cfg b/addons/netfishing_shoreline_baker/plugin.cfg similarity index 81% rename from addons/straywild_shoreline_baker/plugin.cfg rename to addons/netfishing_shoreline_baker/plugin.cfg index c3f4e47..c8c4d06 100644 --- a/addons/straywild_shoreline_baker/plugin.cfg +++ b/addons/netfishing_shoreline_baker/plugin.cfg @@ -1,6 +1,6 @@ [plugin] -name="straywild Shoreline Auto-Baker" +name="NETfishing Shoreline Auto-Baker" description="Rebuilds configured static shoreline ribbons after authored terrain reimports." author="woofmeow" version="1.0.0" diff --git a/addons/straywild_shoreline_baker/shoreline_auto_baker.gd b/addons/netfishing_shoreline_baker/shoreline_auto_baker.gd similarity index 100% rename from addons/straywild_shoreline_baker/shoreline_auto_baker.gd rename to addons/netfishing_shoreline_baker/shoreline_auto_baker.gd diff --git a/addons/straywild_shoreline_baker/shoreline_auto_baker.gd.uid b/addons/netfishing_shoreline_baker/shoreline_auto_baker.gd.uid similarity index 100% rename from addons/straywild_shoreline_baker/shoreline_auto_baker.gd.uid rename to addons/netfishing_shoreline_baker/shoreline_auto_baker.gd.uid diff --git a/art/exported/characters/base/straywild_base_character.glb b/art/exported/characters/base/netfishing_base_character.glb similarity index 100% rename from art/exported/characters/base/straywild_base_character.glb rename to art/exported/characters/base/netfishing_base_character.glb diff --git a/art/exported/characters/base/straywild_base_character.glb.import b/art/exported/characters/base/netfishing_base_character.glb.import similarity index 77% rename from art/exported/characters/base/straywild_base_character.glb.import rename to art/exported/characters/base/netfishing_base_character.glb.import index 96925de..b1409e1 100644 --- a/art/exported/characters/base/straywild_base_character.glb.import +++ b/art/exported/characters/base/netfishing_base_character.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://w7n4gjqq1juc" -path="res://.godot/imported/straywild_base_character.glb-65021653e51a906d3b4a3494f170317f.scn" +path="res://.godot/imported/netfishing_base_character.glb-0167c087f16181d405afb962dc877d2c.scn" [deps] -source_file="res://art/exported/characters/base/straywild_base_character.glb" -dest_files=["res://.godot/imported/straywild_base_character.glb-65021653e51a906d3b4a3494f170317f.scn"] +source_file="res://art/exported/characters/base/netfishing_base_character.glb" +dest_files=["res://.godot/imported/netfishing_base_character.glb-0167c087f16181d405afb962dc877d2c.scn"] [params] diff --git a/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png b/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png similarity index 100% rename from art/exported/characters/base/straywild_base_character_eyes_simple_shine.png rename to art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png diff --git a/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import b/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import similarity index 58% rename from art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import rename to art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import index ddf8bb7..4141bca 100644 --- a/art/exported/characters/base/straywild_base_character_eyes_simple_shine.png.import +++ b/art/exported/characters/base/netfishing_base_character_eyes_simple_shine.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://dyjwgkgw0syo8" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/exported/characters/base/straywild_base_character_mouth_three.png b/art/exported/characters/base/netfishing_base_character_mouth_three.png similarity index 100% rename from art/exported/characters/base/straywild_base_character_mouth_three.png rename to art/exported/characters/base/netfishing_base_character_mouth_three.png diff --git a/art/exported/characters/base/straywild_base_character_mouth_three.png.import b/art/exported/characters/base/netfishing_base_character_mouth_three.png.import similarity index 59% rename from art/exported/characters/base/straywild_base_character_mouth_three.png.import rename to art/exported/characters/base/netfishing_base_character_mouth_three.png.import index ba0ec2c..10d0721 100644 --- a/art/exported/characters/base/straywild_base_character_mouth_three.png.import +++ b/art/exported/characters/base/netfishing_base_character_mouth_three.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://dt5gitdtjdvcd" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/exported/characters/base/straywild_base_character_nose_dog_round.png b/art/exported/characters/base/netfishing_base_character_nose_dog_round.png similarity index 100% rename from art/exported/characters/base/straywild_base_character_nose_dog_round.png rename to art/exported/characters/base/netfishing_base_character_nose_dog_round.png diff --git a/art/exported/characters/base/straywild_base_character_nose_dog_round.png.import b/art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import similarity index 59% rename from art/exported/characters/base/straywild_base_character_nose_dog_round.png.import rename to art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import index cb2c573..71d25b6 100644 --- a/art/exported/characters/base/straywild_base_character_nose_dog_round.png.import +++ b/art/exported/characters/base/netfishing_base_character_nose_dog_round.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://bmho1ryst3smt" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/exported/creatures/101.png b/art/exported/creatures/101.png deleted file mode 100644 index e6e431c..0000000 Binary files a/art/exported/creatures/101.png and /dev/null differ diff --git a/art/exported/creatures/101.png.import b/art/exported/creatures/101.png.import deleted file mode 100644 index 3dc8865..0000000 --- a/art/exported/creatures/101.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index b1b66a6..0000000 Binary files a/art/exported/creatures/102.png and /dev/null differ diff --git a/art/exported/creatures/102.png.import b/art/exported/creatures/102.png.import deleted file mode 100644 index c958e5f..0000000 --- a/art/exported/creatures/102.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 98dd618..0000000 Binary files a/art/exported/creatures/103.png and /dev/null differ diff --git a/art/exported/creatures/103.png.import b/art/exported/creatures/103.png.import deleted file mode 100644 index 2972cde..0000000 --- a/art/exported/creatures/103.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 09eec3c..0000000 Binary files a/art/exported/creatures/104.png and /dev/null differ diff --git a/art/exported/creatures/104.png.import b/art/exported/creatures/104.png.import deleted file mode 100644 index 01a9393..0000000 --- a/art/exported/creatures/104.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 3ba1000..0000000 Binary files a/art/exported/creatures/105.png and /dev/null differ diff --git a/art/exported/creatures/105.png.import b/art/exported/creatures/105.png.import deleted file mode 100644 index de797a7..0000000 --- a/art/exported/creatures/105.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 4227b44..0000000 Binary files a/art/exported/creatures/106.png and /dev/null differ diff --git a/art/exported/creatures/106.png.import b/art/exported/creatures/106.png.import deleted file mode 100644 index 3032c38..0000000 --- a/art/exported/creatures/106.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index c843bbe..0000000 Binary files a/art/exported/creatures/107.png and /dev/null differ diff --git a/art/exported/creatures/107.png.import b/art/exported/creatures/107.png.import deleted file mode 100644 index c4d28e8..0000000 --- a/art/exported/creatures/107.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 3994912..0000000 Binary files a/art/exported/creatures/201.png and /dev/null differ diff --git a/art/exported/creatures/201.png.import b/art/exported/creatures/201.png.import deleted file mode 100644 index 9d5decf..0000000 --- a/art/exported/creatures/201.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 467431b..0000000 Binary files a/art/exported/creatures/2502.png and /dev/null differ diff --git a/art/exported/creatures/2502.png.import b/art/exported/creatures/2502.png.import deleted file mode 100644 index 17bcad9..0000000 --- a/art/exported/creatures/2502.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index d0279d8..0000000 Binary files a/art/exported/creatures/2504.png and /dev/null differ diff --git a/art/exported/creatures/2504.png.import b/art/exported/creatures/2504.png.import deleted file mode 100644 index 73fa801..0000000 --- a/art/exported/creatures/2504.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 7463c25..0000000 Binary files a/art/exported/creatures/2505.png and /dev/null differ diff --git a/art/exported/creatures/2505.png.import b/art/exported/creatures/2505.png.import deleted file mode 100644 index 130cedb..0000000 --- a/art/exported/creatures/2505.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 4cefefd..0000000 Binary files a/art/exported/creatures/2508.png and /dev/null differ diff --git a/art/exported/creatures/2508.png.import b/art/exported/creatures/2508.png.import deleted file mode 100644 index 0fdbbe4..0000000 --- a/art/exported/creatures/2508.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index f7565d8..0000000 Binary files a/art/exported/creatures/2601.png and /dev/null differ diff --git a/art/exported/creatures/2601.png.import b/art/exported/creatures/2601.png.import deleted file mode 100644 index 7444643..0000000 --- a/art/exported/creatures/2601.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index ad8294d..0000000 Binary files a/art/exported/creatures/2801.png and /dev/null differ diff --git a/art/exported/creatures/2801.png.import b/art/exported/creatures/2801.png.import deleted file mode 100644 index 512f812..0000000 --- a/art/exported/creatures/2801.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 4190610..0000000 Binary files a/art/exported/creatures/2802.png and /dev/null differ diff --git a/art/exported/creatures/2802.png.import b/art/exported/creatures/2802.png.import deleted file mode 100644 index 4d014d1..0000000 --- a/art/exported/creatures/2802.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 6360f26..0000000 Binary files a/art/exported/creatures/2803.png and /dev/null differ diff --git a/art/exported/creatures/2803.png.import b/art/exported/creatures/2803.png.import deleted file mode 100644 index 5096057..0000000 --- a/art/exported/creatures/2803.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 90952fd..0000000 Binary files a/art/exported/creatures/2804.png and /dev/null differ diff --git a/art/exported/creatures/2804.png.import b/art/exported/creatures/2804.png.import deleted file mode 100644 index e6147c2..0000000 --- a/art/exported/creatures/2804.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index acb930e..0000000 Binary files a/art/exported/creatures/2806.png and /dev/null differ diff --git a/art/exported/creatures/2806.png.import b/art/exported/creatures/2806.png.import deleted file mode 100644 index 9d444cd..0000000 --- a/art/exported/creatures/2806.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 5c2a6da..0000000 Binary files a/art/exported/creatures/2807.png and /dev/null differ diff --git a/art/exported/creatures/2807.png.import b/art/exported/creatures/2807.png.import deleted file mode 100644 index af51ff5..0000000 --- a/art/exported/creatures/2807.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 2ae7e73..0000000 Binary files a/art/exported/creatures/3002.png and /dev/null differ diff --git a/art/exported/creatures/3002.png.import b/art/exported/creatures/3002.png.import deleted file mode 100644 index e193cfd..0000000 --- a/art/exported/creatures/3002.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index fe4d8fb..0000000 Binary files a/art/exported/creatures/3102.png and /dev/null differ diff --git a/art/exported/creatures/3102.png.import b/art/exported/creatures/3102.png.import deleted file mode 100644 index 47e9c80..0000000 --- a/art/exported/creatures/3102.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 3d3d615..0000000 Binary files a/art/exported/creatures/3103.png and /dev/null differ diff --git a/art/exported/creatures/3103.png.import b/art/exported/creatures/3103.png.import deleted file mode 100644 index 9743e89..0000000 --- a/art/exported/creatures/3103.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 425932e..0000000 Binary files a/art/exported/creatures/3104.png and /dev/null differ diff --git a/art/exported/creatures/3104.png.import b/art/exported/creatures/3104.png.import deleted file mode 100644 index fbc70d7..0000000 --- a/art/exported/creatures/3104.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 7dee611..0000000 Binary files a/art/exported/creatures/3107.png and /dev/null differ diff --git a/art/exported/creatures/3107.png.import b/art/exported/creatures/3107.png.import deleted file mode 100644 index 241bac9..0000000 --- a/art/exported/creatures/3107.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index bcc639b..0000000 Binary files a/art/exported/creatures/3201.png and /dev/null differ diff --git a/art/exported/creatures/3201.png.import b/art/exported/creatures/3201.png.import deleted file mode 100644 index a8d6a43..0000000 --- a/art/exported/creatures/3201.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index c14c2ae..0000000 Binary files a/art/exported/creatures/3401.png and /dev/null differ diff --git a/art/exported/creatures/3401.png.import b/art/exported/creatures/3401.png.import deleted file mode 100644 index 096d0fb..0000000 --- a/art/exported/creatures/3401.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index d231239..0000000 Binary files a/art/exported/creatures/3902.png and /dev/null differ diff --git a/art/exported/creatures/3902.png.import b/art/exported/creatures/3902.png.import deleted file mode 100644 index a8e5440..0000000 --- a/art/exported/creatures/3902.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 6cc1d1b..0000000 Binary files a/art/exported/creatures/3906.png and /dev/null differ diff --git a/art/exported/creatures/3906.png.import b/art/exported/creatures/3906.png.import deleted file mode 100644 index 9bce5e4..0000000 --- a/art/exported/creatures/3906.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index a1eb283..0000000 Binary files a/art/exported/creatures/403.png and /dev/null differ diff --git a/art/exported/creatures/403.png.import b/art/exported/creatures/403.png.import deleted file mode 100644 index da790e8..0000000 --- a/art/exported/creatures/403.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 74a068b..0000000 Binary files a/art/exported/creatures/4101.png and /dev/null differ diff --git a/art/exported/creatures/4101.png.import b/art/exported/creatures/4101.png.import deleted file mode 100644 index d906da5..0000000 --- a/art/exported/creatures/4101.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index d043f4c..0000000 Binary files a/art/exported/creatures/4401.png and /dev/null differ diff --git a/art/exported/creatures/4401.png.import b/art/exported/creatures/4401.png.import deleted file mode 100644 index 809a146..0000000 --- a/art/exported/creatures/4401.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index afd6a85..0000000 Binary files a/art/exported/creatures/4701.png and /dev/null differ diff --git a/art/exported/creatures/4701.png.import b/art/exported/creatures/4701.png.import deleted file mode 100644 index 5f4ed32..0000000 --- a/art/exported/creatures/4701.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index cf39422..0000000 Binary files a/art/exported/creatures/5001.png and /dev/null differ diff --git a/art/exported/creatures/5001.png.import b/art/exported/creatures/5001.png.import deleted file mode 100644 index c87c852..0000000 --- a/art/exported/creatures/5001.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index aba6b80..0000000 Binary files a/art/exported/creatures/5702.png and /dev/null differ diff --git a/art/exported/creatures/5702.png.import b/art/exported/creatures/5702.png.import deleted file mode 100644 index 527c367..0000000 --- a/art/exported/creatures/5702.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index a75039f..0000000 Binary files a/art/exported/creatures/5901.png and /dev/null differ diff --git a/art/exported/creatures/5901.png.import b/art/exported/creatures/5901.png.import deleted file mode 100644 index e52ad8c..0000000 --- a/art/exported/creatures/5901.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 809057d..0000000 Binary files a/art/exported/creatures/5902.png and /dev/null differ diff --git a/art/exported/creatures/5902.png.import b/art/exported/creatures/5902.png.import deleted file mode 100644 index 2c8a5fb..0000000 --- a/art/exported/creatures/5902.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 74a8af6..0000000 Binary files a/art/exported/creatures/5903.png and /dev/null differ diff --git a/art/exported/creatures/5903.png.import b/art/exported/creatures/5903.png.import deleted file mode 100644 index 22946e8..0000000 --- a/art/exported/creatures/5903.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 924ba4b..0000000 Binary files a/art/exported/creatures/5904.png and /dev/null differ diff --git a/art/exported/creatures/5904.png.import b/art/exported/creatures/5904.png.import deleted file mode 100644 index 23458ae..0000000 --- a/art/exported/creatures/5904.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 9219597..0000000 Binary files a/art/exported/creatures/6001.png and /dev/null differ diff --git a/art/exported/creatures/6001.png.import b/art/exported/creatures/6001.png.import deleted file mode 100644 index a63cf85..0000000 --- a/art/exported/creatures/6001.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index f45e607..0000000 Binary files a/art/exported/creatures/6103.png and /dev/null differ diff --git a/art/exported/creatures/6103.png.import b/art/exported/creatures/6103.png.import deleted file mode 100644 index ac97dac..0000000 --- a/art/exported/creatures/6103.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 15c3b83..0000000 Binary files a/art/exported/creatures/6406.png and /dev/null differ diff --git a/art/exported/creatures/6406.png.import b/art/exported/creatures/6406.png.import deleted file mode 100644 index ac060ee..0000000 --- a/art/exported/creatures/6406.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 93c05c0..0000000 Binary files a/art/exported/creatures/6601.png and /dev/null differ diff --git a/art/exported/creatures/6601.png.import b/art/exported/creatures/6601.png.import deleted file mode 100644 index f5facf7..0000000 --- a/art/exported/creatures/6601.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index bcdf70b..0000000 Binary files a/art/exported/creatures/6801.png and /dev/null differ diff --git a/art/exported/creatures/6801.png.import b/art/exported/creatures/6801.png.import deleted file mode 100644 index c257a50..0000000 --- a/art/exported/creatures/6801.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 14cc738..0000000 Binary files a/art/exported/creatures/6804.png and /dev/null differ diff --git a/art/exported/creatures/6804.png.import b/art/exported/creatures/6804.png.import deleted file mode 100644 index 12be7af..0000000 --- a/art/exported/creatures/6804.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 270004f..0000000 Binary files a/art/exported/creatures/6807.png and /dev/null differ diff --git a/art/exported/creatures/6807.png.import b/art/exported/creatures/6807.png.import deleted file mode 100644 index 026d3d9..0000000 --- a/art/exported/creatures/6807.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 0c34e37..0000000 Binary files a/art/exported/creatures/6901.png and /dev/null differ diff --git a/art/exported/creatures/6901.png.import b/art/exported/creatures/6901.png.import deleted file mode 100644 index 651f116..0000000 --- a/art/exported/creatures/6901.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 3d4517e..0000000 Binary files a/art/exported/creatures/6902.png and /dev/null differ diff --git a/art/exported/creatures/6902.png.import b/art/exported/creatures/6902.png.import deleted file mode 100644 index 35f84df..0000000 --- a/art/exported/creatures/6902.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index f2e8a7b..0000000 Binary files a/art/exported/creatures/6904.png and /dev/null differ diff --git a/art/exported/creatures/6904.png.import b/art/exported/creatures/6904.png.import deleted file mode 100644 index 75051e3..0000000 --- a/art/exported/creatures/6904.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 296848e..0000000 Binary files a/art/exported/creatures/6905.png and /dev/null differ diff --git a/art/exported/creatures/6905.png.import b/art/exported/creatures/6905.png.import deleted file mode 100644 index f267dc2..0000000 --- a/art/exported/creatures/6905.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 4f7d8f8..0000000 Binary files a/art/exported/creatures/701.png and /dev/null differ diff --git a/art/exported/creatures/701.png.import b/art/exported/creatures/701.png.import deleted file mode 100644 index 7598ee8..0000000 --- a/art/exported/creatures/701.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 526d090..0000000 Binary files a/art/exported/creatures/704.png and /dev/null differ diff --git a/art/exported/creatures/704.png.import b/art/exported/creatures/704.png.import deleted file mode 100644 index e80e19e..0000000 --- a/art/exported/creatures/704.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 93a13af..0000000 Binary files a/art/exported/creatures/7101.png and /dev/null differ diff --git a/art/exported/creatures/7101.png.import b/art/exported/creatures/7101.png.import deleted file mode 100644 index 2d312b3..0000000 --- a/art/exported/creatures/7101.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index ad73c17..0000000 Binary files a/art/exported/creatures/7403.png and /dev/null differ diff --git a/art/exported/creatures/7403.png.import b/art/exported/creatures/7403.png.import deleted file mode 100644 index bef32c4..0000000 --- a/art/exported/creatures/7403.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 7e8c5b2..0000000 Binary files a/art/exported/creatures/7506.png and /dev/null differ diff --git a/art/exported/creatures/7506.png.import b/art/exported/creatures/7506.png.import deleted file mode 100644 index c2c99a0..0000000 --- a/art/exported/creatures/7506.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 27f1a59..0000000 Binary files a/art/exported/creatures/7508.png and /dev/null differ diff --git a/art/exported/creatures/7508.png.import b/art/exported/creatures/7508.png.import deleted file mode 100644 index a14d42f..0000000 --- a/art/exported/creatures/7508.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index f2e6390..0000000 Binary files a/art/exported/creatures/801.png and /dev/null differ diff --git a/art/exported/creatures/801.png.import b/art/exported/creatures/801.png.import deleted file mode 100644 index 3721440..0000000 --- a/art/exported/creatures/801.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index f786031..0000000 Binary files a/art/exported/creatures/802.png and /dev/null differ diff --git a/art/exported/creatures/802.png.import b/art/exported/creatures/802.png.import deleted file mode 100644 index f7e4cc6..0000000 --- a/art/exported/creatures/802.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index 727793c..0000000 Binary files a/art/exported/creatures/805.png and /dev/null differ diff --git a/art/exported/creatures/805.png.import b/art/exported/creatures/805.png.import deleted file mode 100644 index db359af..0000000 --- a/art/exported/creatures/805.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index a8acdb1..0000000 Binary files a/art/exported/creatures/806.png and /dev/null differ diff --git a/art/exported/creatures/806.png.import b/art/exported/creatures/806.png.import deleted file mode 100644 index 8078cb6..0000000 --- a/art/exported/creatures/806.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index e218b8e..0000000 Binary files a/art/exported/creatures/808.png and /dev/null differ diff --git a/art/exported/creatures/808.png.import b/art/exported/creatures/808.png.import deleted file mode 100644 index 1126876..0000000 --- a/art/exported/creatures/808.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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 deleted file mode 100644 index de69afb..0000000 Binary files a/art/exported/creatures/fish_placeholder.png and /dev/null differ diff --git a/art/exported/creatures/fish_placeholder.png.import b/art/exported/creatures/fish_placeholder.png.import deleted file mode 100644 index 87111f4..0000000 --- a/art/exported/creatures/fish_placeholder.png.import +++ /dev/null @@ -1,42 +0,0 @@ -[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.import b/art/exported/items/equipment/net.glb.import index 28667d6..bd957ad 100644 --- a/art/exported/items/equipment/net.glb.import +++ b/art/exported/items/equipment/net.glb.import @@ -3,7 +3,7 @@ importer="scene" importer_version=1 type="PackedScene" -uid="uid://dsa6yss1sxfcy" +uid="uid://cvwxg6kh8ulqv" path="res://.godot/imported/net.glb-cbbc53905aec6a50c4a3322ca7a93b1e.scn" [deps] diff --git a/art/exported/system_icons/netfishing.ico b/art/exported/system_icons/netfishing.ico new file mode 100644 index 0000000..dc5bdae Binary files /dev/null and b/art/exported/system_icons/netfishing.ico differ diff --git a/art/exported/system_icons/netfishing_1024.png b/art/exported/system_icons/netfishing_1024.png new file mode 100644 index 0000000..a433e80 Binary files /dev/null and b/art/exported/system_icons/netfishing_1024.png differ diff --git a/art/exported/system_icons/straywild_1024.png.import b/art/exported/system_icons/netfishing_1024.png.import similarity index 74% rename from art/exported/system_icons/straywild_1024.png.import rename to art/exported/system_icons/netfishing_1024.png.import index dea156a..08aa925 100644 --- a/art/exported/system_icons/straywild_1024.png.import +++ b/art/exported/system_icons/netfishing_1024.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bkh5hw8wwu8pc" -path="res://.godot/imported/straywild_1024.png-b9b5c159c9fcecc21b04324370d4522f.ctex" +path="res://.godot/imported/netfishing_1024.png-7c53a099ed2743b4a623c258641b1d29.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/exported/system_icons/straywild_1024.png" -dest_files=["res://.godot/imported/straywild_1024.png-b9b5c159c9fcecc21b04324370d4522f.ctex"] +source_file="res://art/exported/system_icons/netfishing_1024.png" +dest_files=["res://.godot/imported/netfishing_1024.png-7c53a099ed2743b4a623c258641b1d29.ctex"] [params] diff --git a/art/exported/system_icons/netfishing_256.png b/art/exported/system_icons/netfishing_256.png new file mode 100644 index 0000000..1e7be72 Binary files /dev/null and b/art/exported/system_icons/netfishing_256.png differ diff --git a/art/exported/system_icons/straywild_256.png.import b/art/exported/system_icons/netfishing_256.png.import similarity index 74% rename from art/exported/system_icons/straywild_256.png.import rename to art/exported/system_icons/netfishing_256.png.import index 5726347..34d5d27 100644 --- a/art/exported/system_icons/straywild_256.png.import +++ b/art/exported/system_icons/netfishing_256.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cty16m8ydla06" -path="res://.godot/imported/straywild_256.png-87b7e62e710eae4d3e3ed24a8454ca6d.ctex" +path="res://.godot/imported/netfishing_256.png-d9dfc9c7871ac38bc73d09d00df679be.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/exported/system_icons/straywild_256.png" -dest_files=["res://.godot/imported/straywild_256.png-87b7e62e710eae4d3e3ed24a8454ca6d.ctex"] +source_file="res://art/exported/system_icons/netfishing_256.png" +dest_files=["res://.godot/imported/netfishing_256.png-d9dfc9c7871ac38bc73d09d00df679be.ctex"] [params] diff --git a/art/exported/system_icons/straywild.ico b/art/exported/system_icons/straywild.ico deleted file mode 100644 index c03de8e..0000000 Binary files a/art/exported/system_icons/straywild.ico and /dev/null differ diff --git a/art/exported/system_icons/straywild_1024.png b/art/exported/system_icons/straywild_1024.png deleted file mode 100644 index 2a3b204..0000000 Binary files a/art/exported/system_icons/straywild_1024.png and /dev/null differ diff --git a/art/exported/system_icons/straywild_256.png b/art/exported/system_icons/straywild_256.png deleted file mode 100644 index 98275eb..0000000 Binary files a/art/exported/system_icons/straywild_256.png and /dev/null differ diff --git a/art/source/characters/base/straywild_base_character.blend b/art/source/characters/base/netfishing_base_character.blend similarity index 100% rename from art/source/characters/base/straywild_base_character.blend rename to art/source/characters/base/netfishing_base_character.blend diff --git a/art/source/characters/base/straywild_base_character.blend.import b/art/source/characters/base/netfishing_base_character.blend.import similarity index 84% rename from art/source/characters/base/straywild_base_character.blend.import rename to art/source/characters/base/netfishing_base_character.blend.import index 2cab53c..f6df489 100644 --- a/art/source/characters/base/straywild_base_character.blend.import +++ b/art/source/characters/base/netfishing_base_character.blend.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://cb4bcakhoprm8" -path="res://.godot/imported/straywild_base_character.blend-02abbfdb9b1d393f1bd3cfface615e27.scn" +path="res://.godot/imported/netfishing_base_character.blend-65bf3bc5b77cc1a37fa3f81ebd808d37.scn" [deps] -source_file="res://art/source/characters/base/straywild_base_character.blend" -dest_files=["res://.godot/imported/straywild_base_character.blend-02abbfdb9b1d393f1bd3cfface615e27.scn"] +source_file="res://art/source/characters/base/netfishing_base_character.blend" +dest_files=["res://.godot/imported/netfishing_base_character.blend-65bf3bc5b77cc1a37fa3f81ebd808d37.scn"] [params] diff --git a/art/source/characters/base/straywild_base_character.glb.import b/art/source/characters/base/netfishing_base_character.glb.import similarity index 77% rename from art/source/characters/base/straywild_base_character.glb.import rename to art/source/characters/base/netfishing_base_character.glb.import index bda93c0..5a38b76 100644 --- a/art/source/characters/base/straywild_base_character.glb.import +++ b/art/source/characters/base/netfishing_base_character.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://bfhnup14638r7" -path="res://.godot/imported/straywild_base_character.glb-c9650c715a1b5b9ae0d8541191f7d7a9.scn" +path="res://.godot/imported/netfishing_base_character.glb-cbdc33eaa4fcd1d2d2a8f4a463b228d6.scn" [deps] -source_file="res://art/source/characters/base/straywild_base_character.glb" -dest_files=["res://.godot/imported/straywild_base_character.glb-c9650c715a1b5b9ae0d8541191f7d7a9.scn"] +source_file="res://art/source/characters/base/netfishing_base_character.glb" +dest_files=["res://.godot/imported/netfishing_base_character.glb-cbdc33eaa4fcd1d2d2a8f4a463b228d6.scn"] [params] diff --git a/art/source/characters/base/straywild_character_source.blend b/art/source/characters/base/netfishing_character_source.blend similarity index 100% rename from art/source/characters/base/straywild_character_source.blend rename to art/source/characters/base/netfishing_character_source.blend diff --git a/art/source/characters/base/straywild_character_source.blend.import b/art/source/characters/base/netfishing_character_source.blend.import similarity index 84% rename from art/source/characters/base/straywild_character_source.blend.import rename to art/source/characters/base/netfishing_character_source.blend.import index 741c389..8288280 100644 --- a/art/source/characters/base/straywild_character_source.blend.import +++ b/art/source/characters/base/netfishing_character_source.blend.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://d38y8blk2w5c5" -path="res://.godot/imported/straywild_character_source.blend-0e7b8a87008f88e309ad73a63561ef5b.scn" +path="res://.godot/imported/netfishing_character_source.blend-1d18c95606937d4c8bcb87e334e02ee5.scn" [deps] -source_file="res://art/source/characters/base/straywild_character_source.blend" -dest_files=["res://.godot/imported/straywild_character_source.blend-0e7b8a87008f88e309ad73a63561ef5b.scn"] +source_file="res://art/source/characters/base/netfishing_character_source.blend" +dest_files=["res://.godot/imported/netfishing_character_source.blend-1d18c95606937d4c8bcb87e334e02ee5.scn"] [params] diff --git a/art/source/characters/base/straywild_character_source.glb.import b/art/source/characters/base/netfishing_character_source.glb.import similarity index 76% rename from art/source/characters/base/straywild_character_source.glb.import rename to art/source/characters/base/netfishing_character_source.glb.import index bbcee6a..61158c5 100644 --- a/art/source/characters/base/straywild_character_source.glb.import +++ b/art/source/characters/base/netfishing_character_source.glb.import @@ -4,12 +4,12 @@ importer="scene" importer_version=1 type="PackedScene" uid="uid://3uq4cxiomttt" -path="res://.godot/imported/straywild_character_source.glb-3a8ccc55dbe60da1b70b62110b206353.scn" +path="res://.godot/imported/netfishing_character_source.glb-9c98ee44b142c5b3d06f0838b7d2c9c4.scn" [deps] -source_file="res://art/source/characters/base/straywild_character_source.glb" -dest_files=["res://.godot/imported/straywild_character_source.glb-3a8ccc55dbe60da1b70b62110b206353.scn"] +source_file="res://art/source/characters/base/netfishing_character_source.glb" +dest_files=["res://.godot/imported/netfishing_character_source.glb-9c98ee44b142c5b3d06f0838b7d2c9c4.scn"] [params] diff --git a/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png b/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png similarity index 100% rename from art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png rename to art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png diff --git a/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import b/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import similarity index 58% rename from art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import rename to art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import index dba5a5f..e7aade1 100644 --- a/art/source/characters/base/straywild_character_source_eyes1_eyebrows1.png.import +++ b/art/source/characters/base/netfishing_character_source_eyes1_eyebrows1.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://bdomsntfeovnc" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/source/characters/base/straywild_character_source_eyes_simple_shine.png b/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png similarity index 100% rename from art/source/characters/base/straywild_character_source_eyes_simple_shine.png rename to art/source/characters/base/netfishing_character_source_eyes_simple_shine.png diff --git a/art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import b/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import similarity index 58% rename from art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import rename to art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import index 8b99f72..e49d401 100644 --- a/art/source/characters/base/straywild_character_source_eyes_simple_shine.png.import +++ b/art/source/characters/base/netfishing_character_source_eyes_simple_shine.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://du4u6meapay05" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/source/characters/base/straywild_character_source_mouth1.png b/art/source/characters/base/netfishing_character_source_mouth1.png similarity index 100% rename from art/source/characters/base/straywild_character_source_mouth1.png rename to art/source/characters/base/netfishing_character_source_mouth1.png diff --git a/art/source/characters/base/straywild_character_source_mouth1.png.import b/art/source/characters/base/netfishing_character_source_mouth1.png.import similarity index 60% rename from art/source/characters/base/straywild_character_source_mouth1.png.import rename to art/source/characters/base/netfishing_character_source_mouth1.png.import index 5dd84f4..8ff49a4 100644 --- a/art/source/characters/base/straywild_character_source_mouth1.png.import +++ b/art/source/characters/base/netfishing_character_source_mouth1.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://css0k0virgoph" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/source/characters/base/straywild_character_source_mouth_three.png b/art/source/characters/base/netfishing_character_source_mouth_three.png similarity index 100% rename from art/source/characters/base/straywild_character_source_mouth_three.png rename to art/source/characters/base/netfishing_character_source_mouth_three.png diff --git a/art/source/characters/base/straywild_character_source_mouth_three.png.import b/art/source/characters/base/netfishing_character_source_mouth_three.png.import similarity index 59% rename from art/source/characters/base/straywild_character_source_mouth_three.png.import rename to art/source/characters/base/netfishing_character_source_mouth_three.png.import index 4b2413d..6abae09 100644 --- a/art/source/characters/base/straywild_character_source_mouth_three.png.import +++ b/art/source/characters/base/netfishing_character_source_mouth_three.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://di20c1x8vksi1" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/source/characters/base/straywild_character_source_nose1.2.png b/art/source/characters/base/netfishing_character_source_nose1.2.png similarity index 100% rename from art/source/characters/base/straywild_character_source_nose1.2.png rename to art/source/characters/base/netfishing_character_source_nose1.2.png diff --git a/art/source/characters/base/straywild_character_source_nose1.2.png.import b/art/source/characters/base/netfishing_character_source_nose1.2.png.import similarity index 60% rename from art/source/characters/base/straywild_character_source_nose1.2.png.import rename to art/source/characters/base/netfishing_character_source_nose1.2.png.import index e0c3667..2fbb165 100644 --- a/art/source/characters/base/straywild_character_source_nose1.2.png.import +++ b/art/source/characters/base/netfishing_character_source_nose1.2.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://7dwa0bfev1rk" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/art/source/characters/base/straywild_character_source_nose_dog_round.png b/art/source/characters/base/netfishing_character_source_nose_dog_round.png similarity index 100% rename from art/source/characters/base/straywild_character_source_nose_dog_round.png rename to art/source/characters/base/netfishing_character_source_nose_dog_round.png diff --git a/art/source/characters/base/straywild_character_source_nose_dog_round.png.import b/art/source/characters/base/netfishing_character_source_nose_dog_round.png.import similarity index 59% rename from art/source/characters/base/straywild_character_source_nose_dog_round.png.import rename to art/source/characters/base/netfishing_character_source_nose_dog_round.png.import index 5fe079e..12333e8 100644 --- a/art/source/characters/base/straywild_character_source_nose_dog_round.png.import +++ b/art/source/characters/base/netfishing_character_source_nose_dog_round.png.import @@ -3,8 +3,8 @@ importer="texture" type="CompressedTexture2D" uid="uid://b0p55hwdry2cr" -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" +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" metadata={ "imported_formats": ["s3tc_bptc", "etc2_astc"], "vram_texture": true @@ -15,8 +15,8 @@ generator_parameters={ [deps] -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"] +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"] [params] diff --git a/audio/music/world/tulips.wav b/audio/music/world/tulips.wav deleted file mode 100644 index 9cd4605..0000000 Binary files a/audio/music/world/tulips.wav and /dev/null differ diff --git a/audio/music/world/tulips.wav.import b/audio/music/world/tulips.wav.import deleted file mode 100644 index 0f8cce1..0000000 --- a/audio/music/world/tulips.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamWAV" -uid="uid://5hgmht4bq1my" -path="res://.godot/imported/tulips.wav-7c18a300a62f25396913efb28c2ba3f6.sample" - -[deps] - -source_file="res://audio/music/world/tulips.wav" -dest_files=["res://.godot/imported/tulips.wav-7c18a300a62f25396913efb28c2ba3f6.sample"] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop_mode=0 -edit/loop_begin=0 -edit/loop_end=-1 -compress/mode=2 diff --git a/collection/collection_log.gd b/collection/collection_log.gd index 59d33d1..da36eb8 100644 --- a/collection/collection_log.gd +++ b/collection/collection_log.gd @@ -6,11 +6,9 @@ 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: @@ -43,26 +41,6 @@ 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: @@ -87,14 +65,6 @@ 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 @@ -107,22 +77,6 @@ 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: @@ -141,19 +95,7 @@ func replace_collection_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 d8676f0..5f9e387 100644 --- a/docs/ATTRIBUTION.md +++ b/docs/ATTRIBUTION.md @@ -7,31 +7,32 @@ prove authorship or licensing. ## Ownership and credits -straywild is jointly owned, developed, and published by its creators, +NETfishing 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 - 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 +- Voyager: co-owner, developer, project director, creator of the game's 3D + art, and composer of the original title/ambient track + `audio/music/title/as_in_four_wolves.ogg`, 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, item art, and - finished fish and creature artwork. Planned work is not described as - incorporated until its files enter the project. +- Endeavour: co-owner, developer, and creator of the game's 2D art, including + the original fish, environment, UI, and other artwork. - 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 `chillnfill`. -- kat: supplied the original source voice recording for the kat animalese set. - Voyager created the sliced, normalized runtime derivatives. -- kim: supplied the original source voice recording for the kim animalese set. - Voyager created the sliced, normalized runtime derivatives. +- adamantris: contributor of the original hand-net model and texture artwork; + the contributor is credited as `adamantris`. +- Tekgator: creator of the cooler-capacity, reel-speed, and barrier-power shop + icons. +- kat: supplied the original recorded voice sample used for the animalese + alphabet and number sounds. +- kim: supplied the recorded voice performance used for the kim animalese + alphabet and number sounds. 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 straywild, Woofmeow, or its owners. +credits do not imply endorsement of NETfishing, Woofmeow, or its owners. ## License map @@ -41,31 +42,30 @@ 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` | -| straywild and Woofmeow names, logos, icons, and official identity | Source-root or packaged `TRADEMARKS.md` | +| NETfishing 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 | +| New outside contributions | Source-root `CONTRIBUTOR-TERMS.md` plus any separately signed agreement | Generated Godot import metadata and deterministic generated resources follow 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 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 straywild assets and reserved -branding with independently licensed material and a distinct identity. +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; it does not permit those assets to +accompany code forks, clones, standalone games, unrelated products, or +general-purpose asset packs. A GPL fork must replace NETfishing 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 straywild owners under their private joint +written approval from both NETfishing owners under their private joint ownership agreement. ## Godot Engine notice -straywild uses Godot Engine under the MIT License: +NETfishing uses Godot Engine under the MIT License: > Copyright (c) 2014-present Godot Engine contributors. > Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. @@ -103,68 +103,47 @@ 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 straywild Asset License. +Public-domain fonts are not governed by the NETfishing Asset License. ## Intake policy -For every new external or supplied asset, retain a durable intake record with: +For every new external or supplied asset, record: - creator or supplying party; - original source location or delivery channel; -- source filename and, when useful, its initial repository destination; +- source filename and repository destination; - source and destination SHA-256 when copied without modification; - license or explicit permission; - any permitted transformations; - the importing commit or release. -The intake record may live in the accepted pull request, issue, email, or the -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. - -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. +Maintainers must also obtain affirmative agreement to the source-root +`CONTRIBUTOR-TERMS.md` before accepting an outside contribution and retain +that agreement in a durable pull request, issue, email, or signed document. Runtime resources must use `res://` paths. Workstation Sync folders are intake locations only and must never appear in scenes or resources. -## Project-created artwork and music +## Asset inventory and provenance -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, 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 -and Git history identify the files present in a particular revision. A path, -directory name, commit author, or supplying party is not by itself evidence of -authorship. - -## Third-party and contributor runtime material - -The following paths identify distributed material whose external license or -individual contributor credit must remain easy to find. They were checked -against the repository when this record was revised. - -| Material | Runtime location | Credit or terms | +| Asset family | Repository location | Recorded provenance | | --- | --- | --- | -| 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. | +| Fish art and portraits | `fish/species/`, `art/exported/fish/` | Original 2D artwork by co-owner Endeavour. | +| Item icons | `items/icons/` | Original 2D artwork by co-owner Endeavour except where separately credited below. | +| Cooler-capacity shop icon | `items/icons/equipment/64_cooler_plus.png` | Original artwork by Tekgator. Repository SHA-256: `b63705be5b78915753c068170323781a90e22b555b57a5b2ca9466e2726539f7`. | +| Reel-speed shop icon | `items/icons/shop/64_speed_plus.png` | Original artwork by Tekgator. Repository SHA-256: `938452798f2be505e06ce3fbef178f52459331fd3bced8763fbc2a80157125ca`. | +| Barrier-power shop icon | `items/icons/shop/64_power_plus.png` | Original artwork by Tekgator. Repository SHA-256: `164d34ce152aa6d75de79b69f0be2d9074f7891057de9636678889028ff98ae7`. | +| Inventory notepad | `art/ui/ui_notepad.png` | Original 2D artwork by co-owner Endeavour; integrated without a runtime external path. | +| Environment textures | `art/exported/environment/textures/` | Original 2D artwork by co-owner Endeavour. | +| UI patterns | `art/patterns/` | Original 2D artwork by co-owner Endeavour. | +| Fur customization channel maps | `art/exported/characters/patterns/` | Original 2D channel-map artwork by co-owner Endeavour. Exact file hashes are recorded below. | +| Character base meshes and appendages | `art/source/characters/base/`, `art/exported/characters/base/`, and derived character resources | Original body and arm models and original ear and tail models by chillnfill. Any embedded original 2D artwork is by Endeavour. | +| World and decorative prop models | `art/source/environment/`, `art/exported/environment/`, and derived world resources | Original prop and decorative models by chillnfill, including trees and bridges. Any embedded original 2D artwork is by Endeavour. | +| Hand-net model | `art/source/items/equipment/net.blend`, `art/exported/items/equipment/net.glb`, and adjacent exported textures | Original model and texture artwork by adamantris; repository adaptation and rigging by Voyager. | | 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`. | +| Seattle Avenue font | `ui/fonts/seattle_avenue.otf` | Public-domain font by JLH Fonts; source record and hash in `ui/fonts/Seattle-Avenue-LICENSE.txt`. | +| Title music | `audio/music/title/as_in_four_wolves.ogg` | Original music composed and owned by co-owner Voyager. | +| Dusk music | `audio/music/world/craft.mp3` | Original music composed and owned by co-owner Voyager. | | Fishing fight loop | `audio/sfx/fishing/fighting.wav` | Edited from “Spinning reel.wav” by Freesound user tosha73, sound 509902, CC0. | | Manual-reeling loop | `audio/sfx/fishing/reeling.wav` | Edited from the same CC0 “Spinning reel.wav” source. | | Saltwater wave ambience | `audio/ambience/waves.wav` | “Gentle Ocean Waves Loop” by Freesound user kkenny101, sound 852826, CC0. | @@ -172,6 +151,9 @@ against the repository when this record was revised. | Rain ambience | `audio/ambience/rain_loop_ontario.ogg` | Converted from “Rain Loop Ontario” by Freesound user Ayton, sound 212799, CC BY 3.0. | | Character bark call | `sound/dialogue/calls/bark.wav` | Edited from `Dog_Bark.wav` by Freesound user ivolipa, sound 328729, CC0. | | Character meow call | `sound/dialogue/calls/meow.wav` | Edited from `Cat meow.m4a` by Freesound user Christyboy100, sound 495694, Attribution 3.0. | +| Animalese alphabet and number sounds | `sound/dialogue/animalese/alphanumeric/` | Processed derivatives of the original recorded voice sample supplied by NETfishing community member kat. | +| Kim animalese alphabet and number sounds | `sound/dialogue/animalese/kim/` | Processed per-character voice samples supplied by NETfishing community member kim. | +| Robot animalese tones | `sound/dialogue/animalese/robot/` | Original synthesized tones composed and owned by co-owner Voyager without third-party samples. | Creative Commons Zero information: https://creativecommons.org/publicdomain/zero/1.0/. Creative Commons @@ -184,26 +166,157 @@ https://creativecommons.org/licenses/by/3.0/legalcode. - Original contribution families: character bodies and arms; character ears and tails; and multiple world props and decorative assets, including trees and bridges. -- Repository mapping: these contributions may be incorporated into combined - character or environment resources rather than retained as one file per - originally supplied model. Git history is the revision-specific file map. +- Repository mapping: character contributions are incorporated into the + character source/export families identified above. Prop contributions may + be incorporated into combined environment source and export files rather + than retained as one file per originally supplied model. - Permission record: because these historical contributions predate the current `CONTRIBUTOR-TERMS.md`, retain the original permission record or a later written confirmation covering Project use, modification, distribution, commercial release, and applicable sublicensing. -### Endeavour 2D contribution record +### adamantris hand-net contribution record -Endeavour created the incorporated character customization patterns and -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. +- Requested credit: `adamantris`. +- Original contribution: hand-net model and texture artwork. +- Repository source: `art/source/items/equipment/net.blend`, SHA-256 + `4608993b2397681029c60eb6a7657e3db311ded99ebb5a461cdf4738c8858b39`. +- Repository export: `art/exported/items/equipment/net.glb`, SHA-256 + `d4c2d4903da3817ff9bb82e0404f5e51b74d299abc5bef28c7f6daf6371474fb`. +- Repository adaptation: reshaping and the generic `net_root`, `net_rim`, + `net_mid`, and `net_tip` deformation rig were prepared by Voyager for + reuse across gathering activities. +- Permission record: retain the original submission correspondence or a + written confirmation accepting `CONTRIBUTOR-TERMS.md` with the project + records. -The exact current filenames and bytes are intentionally not copied into this -document. The character appearance resources and Git history are the -revision-specific inventory. +### Fur customization channel-map record +Original channel-map artwork by Endeavour. Repository paths preserve the +authored `mesh_style.png` filenames. + +| Style and mesh | Source filename | Repository file | SHA-256 | +| --- | --- | --- | --- | +| Bengal spots, body and arms | `body_arms_bengal.png` | `art/exported/characters/patterns/bengal/body_arms_bengal.png` | `fa90bd4e74b0b770ce97bf69d069676f5d4bd1f5d649f89e09638a66b61a8470` | +| Bengal spots, main body | `body_main_bengal.png` | `art/exported/characters/patterns/bengal/body_main_bengal.png` | `8662fa198220cfdbe0aa83bdeeef7b855e20124d74f8481467f750d32b67ee8b` | +| Bengal spots, round head | `head_round_bengal.png` | `art/exported/characters/patterns/bengal/head_round_bengal.png` | `f397ed8d152e3fda8181757a2bbd01925b7b8c2c4362f515d91c7f0fbf3ddfb6` | +| Calico, main body | `body_main_calico.png` | `art/exported/characters/patterns/calico/body_main_calico.png` | `25b2389ee729a6bafafbe6b5440541b18f3c5db2808ca8d49c2d5c4d012d390c` | +| Fox, body and arms | `body_arms_fox.png` | `art/exported/characters/patterns/fox/body_arms_fox.png` | `9930808718f31d84b415902f1ba55ac2a508bb2ac127300e793d73a8a013022d` | +| Fox, main body | `body_main_fox.png` | `art/exported/characters/patterns/fox/body_main_fox.png` | `c65e4390173b8c31c9396edd053f940f0f809e47e01d18042cd7babc712dde9d` | +| Fox, short pointy ears | `ears_pointy_short_fox.png` | `art/exported/characters/patterns/fox/ears_pointy_short_fox.png` | `13cb35192d25c0136df287434fa056ce990698fc47dc50445c941f92a4ff42fb` | +| Fox, pointy head | `head_pointy_fox.png` | `art/exported/characters/patterns/fox/head_pointy_fox.png` | `71a9d2383e62884dbd3981460fcd985b18805fa907f61ffb16dce08ff9418ddf` | +| Fox, round head | `head_round_fox.png` | `art/exported/characters/patterns/fox/head_round_fox.png` | `1ac3d503bc1e47a5ae3c1a8af719c9d1be06aab2d6d4d30c179c2a021fe7d34d` | +| Fox tail | `tails_fox_fox.png` | `art/exported/characters/patterns/fox/tails_fox_fox.png` | `72da9673f038e2c3bb8aca19ed99932085fa3b162cab95366901c4e97153dd3e` | +| Paws, body and arms | `body_arms_paws.png` | `art/exported/characters/patterns/paws/body_arms_paws.png` | `38f31ecf7045510501bdd08cbc243065c2fadec481462671dd22b13e8a196e66` | +| Paws, main body | `body_main_paws.png` | `art/exported/characters/patterns/paws/body_main_paws.png` | `d52012d4a1ea3ed544582be714469ed8fec148ccd59417dda21e89c18509321b` | +| Stripes, main body | `body_main_stripes.png` | `art/exported/characters/patterns/stripes/body_main_stripes.png` | `4b1e5b412a7af3e6acd0a5bfb1b6ffd6e0814850a311fc8cc3061419a8f23555` | +| Tiger, main body | `body_main_tiger.png` | `art/exported/characters/patterns/tiger/body_main_tiger.png` | `64b6f47871802e72ba6fe15577f14949a760c6d44bb962bfbbdcddc991b2105b` | +| Tiger, round head | `head_round_tiger.png` | `art/exported/characters/patterns/tiger/head_round_tiger.png` | `6af27056b9827391a73b4ea6f3736b308fa93a03127570f90cc4d3701afd3d80` | +| Tummy, main body | `body_main_tummy.png` | `art/exported/characters/patterns/tummy/body_main_tummy.png` | `dad404614c3feae4082537c02556781ea46c664327e0dc4528804f76619af86a` | + +### Tekgator shop icon contribution record + +- Requested credit: `Tekgator`. +- Original contributions: cooler-capacity, reel-speed, and barrier-power shop + icons. +- Repository files and SHA-256: + - `items/icons/equipment/64_cooler_plus.png`: + `b63705be5b78915753c068170323781a90e22b555b57a5b2ca9466e2726539f7` + - `items/icons/shop/64_speed_plus.png`: + `938452798f2be505e06ce3fbef178f52459331fd3bced8763fbc2a80157125ca` + - `items/icons/shop/64_power_plus.png`: + `164d34ce152aa6d75de79b69f0be2d9074f7891057de9636678889028ff98ae7` +- Permission record: retain the original permission record or a later written + confirmation covering Project use, modification, distribution, commercial + release, and applicable sublicensing. + +### kat animalese voice contribution record + +- Requested credit: `kat`. +- Original contribution: the recorded voice sample used to produce the + animalese alphabet and number sounds. +- Repository mapping: the heavily processed per-character derivatives are in + `sound/dialogue/animalese/alphanumeric/`. +- Intake filenames: `0.wav` through `9.wav` and `a.wav` through `z.wav`. +- Source and initial repository files were compared byte-for-byte at intake. + The hashes below identify those untouched intake files; runtime files are + normalized derivatives produced by `scripts/import_animalese_voice.sh`. +- Permission record: retain the original submission and permission record + covering Project use, processing, distribution, commercial release, and + applicable sublicensing. + +| Clip | SHA-256 | Clip | SHA-256 | +| --- | --- | --- | --- | +| `0.wav` | `0616a2fb035d410f24403e66c4fe46e9ff86e976126db16c56125af28bbe5ad6` | `a.wav` | `aa701de9370000e620dae16c4e3082bc79fc9692ed5260dfd5f4f2480b556e75` | +| `1.wav` | `e29191c0b4011d4237710b0ef4fe1f0ebe875bb3cf8abb62b057b7799c683dda` | `b.wav` | `149286a210d4fec9197f4c6109a066706cb890181b6663369a9941435ee859bb` | +| `2.wav` | `e4ce823498ec8440b2f870ea767b1b6185add948a3ba573ec476794fc6ab5abb` | `c.wav` | `4776bb64044e82f21755e771f31e30e18e8737533b08f04a9bd5103aa9adf923` | +| `3.wav` | `498a06196dd672f273c90802d0349f3ecc5f582a1aeb9b952ff54030bef523e0` | `d.wav` | `6bb00d354b5a621895412ae40a40f02f219976fc164b08389a6bb708a6c99e84` | +| `4.wav` | `dbb90d8e7e5cb9524cfd429d63e297548871ed6dda7c2594c5ea4e932c623754` | `e.wav` | `232edabddc6c046ba5bbb5f640cabe9c9a905c2a12cec07fc60ef657e83547c4` | +| `5.wav` | `dc6dc2946e0ebb5b346bbf4c646c72e27303f4bf8838c14038df5ce7087071f9` | `f.wav` | `f104a52c97605872de4cafab1f1c24a132051e14a9400c2098a24385525f1e15` | +| `6.wav` | `8dae2ce33aaa0d788964d0a7026d3c51738ef2b06672697675a7f2da0f9f7a59` | `g.wav` | `12915a19a9c3b0f1559a4c53734c16fedc1d82f7c24adce08608aad7da141968` | +| `7.wav` | `f5c5c855b06794a22954f3eb2b32f2caec877ce7dee27fd3153c7aa65ab1ff92` | `h.wav` | `951a2c1b074eb43c8016d592ed7d1bc63ec64ab95312d122fa8f2e717b61c1e1` | +| `8.wav` | `b31561b5e3748024daf109510d5ee955274d2ef45f7fed96882f8a4862b70e30` | `i.wav` | `1d51b902b1b667eadc7bcc569909ce927075e7b91b8a02ea811f361e3e95164c` | +| `9.wav` | `e46bb34cb045fb15bb0cbbfbd9364895521ee3c441290154a1f4ff67ffd38f2d` | `j.wav` | `9ef84e992d58349b42f642901688f49203af27dda85c5baee30b4c2cf93944c9` | +| | | `k.wav` | `65ae2072c6f55b5013dea21dd4644c2dd502963b89f5711eb22f741cee3dec09` | +| | | `l.wav` | `d87f8fcb4c217c0dbd5526705c982655e514a5645ef2391557b6c033344aa713` | +| | | `m.wav` | `1f1bc0ba3abe077febfa035e873d0e47838e880fbbd6e10164b1e58e13a5e47b` | +| | | `n.wav` | `2f422e00c4c42689e0d50adf2226c28a851960f3c460b2c8cdbbefb687175ad1` | +| | | `o.wav` | `70143fd697e1b1d1f1d27c8fc3bd59ea72e076e1679494f8022a44911752da46` | +| | | `p.wav` | `9419172ec8a595f89ac2993f4a942c554dc5a8fa64bd8a75f468718cdb2b176e` | +| | | `q.wav` | `e0117043020c0eda1d15f1315b7796774a219c1439bafc587c01e3661215abbb` | +| | | `r.wav` | `31f9a4a06975c55331b830247b39f47572622698457c191d03c92d02599b1131` | +| | | `s.wav` | `232edabddc6c046ba5bbb5f640cabe9c9a905c2a12cec07fc60ef657e83547c4` | +| | | `t.wav` | `a8b7379fa5c26462bde6e51cd74edb514aa731afa02efb5f82b42341c5a50964` | +| | | `u.wav` | `e25dec74b9f141203c92c4a8ebf296c80e031cc677d924656bef64e90a02c7a3` | +| | | `v.wav` | `643725a16a9e821a5e8a502aa43979a9f9ed73860839d28cf15b4b3fb4ff3539` | +| | | `w.wav` | `5a915415157775f00875b4985844a1cd28f36733744dbe718fdf8b714f1ccc89` | +| | | `x.wav` | `04fc26436d1524c5fb6e7f84c2a1a930aa519a57f594b73e7310c7187ac581c3` | +| | | `y.wav` | `7fbe3ee4f2a6c6432b8cbeeffe2cc422b3b960e0f148533ffcc0d42d73804f9c` | +| | | `z.wav` | `0616a2fb035d410f24403e66c4fe46e9ff86e976126db16c56125af28bbe5ad6` | + +### kim animalese voice contribution record + +- Requested credit: `kim`. +- Original contribution: the recorded voice performance used to produce the + kim animalese alphabet and number sounds. +- Repository mapping: the per-character samples are in + `sound/dialogue/animalese/kim/`. +- Intake filenames: `0.wav` through `9.wav` and `a.wav` through `z.wav`. +- Source and initial repository files were compared byte-for-byte at intake. + The hashes below identify those untouched intake files; runtime files are + normalized derivatives produced by `scripts/import_animalese_voice.sh`. +- Permission record: retain the original submission and permission record + covering Project use, processing, distribution, commercial release, and + applicable sublicensing. + +| Clip | SHA-256 | Clip | SHA-256 | +| --- | --- | --- | --- | +| `0.wav` | `cd107c5904569c87fb972dce3853e02d126d1d1fe61b16596a2e40b6c5ffa4c1` | `a.wav` | `037dde81eaae9d11b316a0336a2cf39090810afcb8e6a3349af674808a7b6a92` | +| `1.wav` | `4e2310d7af7912d7bf88dbe0b1b864bd491b412dfb46e28e8dbf7fc77d2b839e` | `b.wav` | `09e82faa88e7be9d3d9b984288f001cf722ba9c29f7a422053c90641e2406ff4` | +| `2.wav` | `ed54c8edc36b80e696a45e4eaefe724b714fa949a01af09d66ec4b8af4538dda` | `c.wav` | `8f8bf82630511d510042918389473a6bcb0c71173dc4bbfaaef0ec64c77a8b34` | +| `3.wav` | `41f6b3e0d30384c790ca625ab049826f2cf33aaca4b3bfbbbb833bfbd84d86c9` | `d.wav` | `ccf55a87158896e233afb3c3be517b92f97af92a8d972a8fc8f1ce88a418ec7c` | +| `4.wav` | `d9345022c32fc03f382d892d2ec105a3200c787dfac5357c8c192377b01b7816` | `e.wav` | `d62935c4d90cabc1fc789eab22da1aae205383ba5063b1d923ae3165bb231b92` | +| `5.wav` | `3ea7659d6d1bdc2cf6d5e9131d983ce27ec715d5a27923f141a9e8123f413551` | `f.wav` | `4a7957d71c3e287a94f94b40f77c631e41b9b885bbd968aee60b66e789f5fb65` | +| `6.wav` | `a91e64bccc07162cefaf1c59f838e4475e8ba40efcb749e965f87903f03c2a0d` | `g.wav` | `8fe9f4aa5a3c1f61860c9ef371674e9d3ce117fe222612465d2c7531367294e8` | +| `7.wav` | `e4e2e85f88625e152ff682c45ce816e7ec3fc15eb23ed01c686528f9abfa1015` | `h.wav` | `88a758b4f1e2a90758f93c72b15804b38152e3e8cf6b0b67558823d52e0a0648` | +| `8.wav` | `da94b98ef5bcf7460d3c9ca02b651f586b51ef2809f33da639898f81253e16a4` | `i.wav` | `f272e24648bbf62b09c83743b53c94168e81a90a8d3fff2aa0ba5a727927f494` | +| `9.wav` | `34aa49af5f8414bff289cb575468bef2745b3f6d0ac3420d9eb07ec148cdd645` | `j.wav` | `f25e1585e28313f63bcad0fe3c9a0032c96a32754687e592ea4f1989edfb3411` | +| | | `k.wav` | `3c39ede36a423577d75772ba5c1b7f1a4315aac0b5dea89fa6cd7ac647f4c342` | +| | | `l.wav` | `beda782f9b1de5e82e0f7c481f3e7a5694ead7c72ccabc684a7c330234b7ad7c` | +| | | `m.wav` | `b4002b6dc895896144711cf8a763cdc93d11d9bc74b0b57fbc55831ec3dbf28d` | +| | | `n.wav` | `d5e989ab8cc755cd8676fe05ec3e5b8e433d674694188df3717e3073bd27975b` | +| | | `o.wav` | `043e5f81a29400a4b8078168c187c0e0907ea43041c96be98b2bdf646afc0f61` | +| | | `p.wav` | `da228b88d1621a09b21b3a5e5ea57710fab0a726ef9655406b43da30cd67c6d4` | +| | | `q.wav` | `83cb2e061fa8473e9205d03b353c1d8a3c6cb26913b287571205033ce95e0c99` | +| | | `r.wav` | `4d58f4337a62d0b37b5cea427a22dc05f2b1cab505d6de6fa1d7d8363ee018d4` | +| | | `s.wav` | `93a19e046764af830fc5582f8de3b35b287eea2bc3abf0b269aa0e945405d95c` | +| | | `t.wav` | `c7b1f1d967736c3b640fab88fa4522ca6bec86fc96f2980c3948788c3d9ede9c` | +| | | `u.wav` | `320a3d89c0ad22cf4249d9647bedbb882e8ca561feb651eb7534f2ea51380c54` | +| | | `v.wav` | `8ed8d00aaf3f60531680241f65f45251639080258799698e81afce996ba506af` | +| | | `w.wav` | `edad2171e9b4238a20b8c3d6675b5ab457be0af0450f37950bc6d70215f9def7` | +| | | `x.wav` | `93896a36adeaf8628c18597957e86804c98115b40f41f7ea2d139ba9bf172da8` | +| | | `y.wav` | `9bde2a148b881ef04003286351cb7801fd65276d56b00433921bf7f42aa4d1ab` | +| | | `z.wav` | `cd107c5904569c87fb972dce3853e02d126d1d1fe61b16596a2e40b6c5ffa4c1` | ### Fishing fight loop source record diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 76ed032..c82c549 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -1,6 +1,6 @@ # Development reference -This is the authoritative reference for straywild architecture, engineering +This is the authoritative reference for NETfishing architecture, engineering decisions, content policy, authoring, and validation. ## Architecture @@ -43,19 +43,9 @@ 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 `straywild_DISCOVERY_URL` available as a +`network/discovery/base_url`, with `NETFISHING_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 @@ -78,12 +68,8 @@ 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` 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. +written by `PlayerSaveManager`; device settings and social/identity stores have +separate formats and lifecycles. Save migrations are sequential and explicit. Existing catches and ownership are keyed by stable IDs so authored metadata can evolve without rewriting @@ -103,8 +89,9 @@ presented through a uniformly scaled SubViewport. Shared UI components and palette resources prevent page-specific geometry and style drift. World presentation systems (time/weather visuals, procedural sky and water, -shoreline treatment, player blob shadows) do not own gameplay collision or -network authority. +shoreline ribbons, player blob shadows) do not own gameplay collision or +network authority. Generated shoreline meshes are deterministic presentation +resources baked from explicitly configured static terrain. ### Engineering consequences @@ -142,9 +129,9 @@ remain authoritative in `.tres` resources and typed scripts. wallet exactly once. - Reserved assets are rejected atomically; mixed valid and reserved batches must not partially succeed. -- Item effects, shop prices, inventory and storage capacity, fishing upgrades, - jobs, and experience are separate balance axes. Avoid changing several in - an unrelated presentation pass. +- Item effects, shop prices, cooler capacity, fishing upgrades, jobs, and + experience are separate balance axes. Avoid changing several in an + unrelated presentation pass. Record affected stable IDs and resource paths, old and new values, intended player-facing outcome, interactions with quality/availability/economy, @@ -156,57 +143,70 @@ authored number changed. ### World composition -`world/test_world.tscn` is the shared gameplay stage. It owns the environment, -sun, world bounds, and below-world failsafe, then hosts exactly one active -`WorldRegion`. Two canonical region implementations are supported: +The active test world uses the canonical starter island through +`world/regions/starter_island_region.tscn`. -- the generated world, which is the default for new games and is rebuilt from - the saved seed; and -- the starter island, which remains an authored selectable layout and a useful - compatibility/reference scene. - -The stable layout IDs live in `world/world_layout.gd`. Do not infer a layout -from a scene filename, display label, or region node name. Both implementations -must satisfy the shared `WorldRegion` contract for player spawn, safe respawns, -water regions, recovery, gathering, digging, the shop, and player storage. - -A region owns the content that changes with the selected world: +`world/test_world.tscn` owns the gameplay-wide environment, sun, world bounds, +and below-world failsafe. `StarterIslandRegion` owns the placed island content: ```text -WorldRegion +StarterIslandRegion ├── Terrain +│ ├── Visual +│ └── Collision ├── WaterBodies +│ ├── Pond +│ │ ├── VisualWater +│ │ ├── FishingRegion +│ │ └── RecoveryRegion +│ └── Ocean +│ ├── VisualWater +│ ├── FishingRegions +│ └── RecoveryRegions ├── PlayerSpawn ├── SafeRespawns -├── DiggableAreas -├── GatherableAnchors └── Interactables ├── FishingShopWorld - └── PlayerStorageBox + └── PelicanCoolerPerch ``` -The generated region owns its chunk, biome, and prop catalogs and derives -terrain collision, water coverage, biome placement, and presentation reference -geometry from the generated result. The starter-island region owns its imported -terrain hierarchy and explicitly placed content. Code shared by both layouts -must depend on `WorldRegion`, not a starter-island child path. +Move a meaningful feature root rather than one of its implementation children. +Child transforms are local offsets owned by that feature. -Every fishable water body authors its water type explicitly. Fish species use -the same central type through an allowed-water-type bitmask. Do not infer -habitat from node names, pool filenames, coordinates, or water height. +Every fishable region authors its `water_type` explicitly. The starter pond is +`FRESH_WATER`; the starter coast is `SALT_WATER`. Fish species use the same +central type through an allowed-water-type bitmask. Do not infer habitat from +node names, pool filenames, coordinates, or water height. -In the generated layout, seed and layout ID are persistent data. Chunk IDs, -edge rules, biome definitions, and prop definitions are authored resources; -changing them can change the world produced by an existing seed and therefore -requires deliberate compatibility review. +Select `WaterBodies/Pond` to move or resize the pond. Its transform is the +authoritative surface position; surface size and fishing/recovery coverage are +owned together. Select `WaterBodies/Ocean` to move the surrounding water as one +feature. Its fishing coverage is derived from the visible water mesh and the +terrain collision determines the shoreline. New or revised land meshes do not +require hand-authored fishing exclusions. Recovery volumes remain explicit so +they can follow the playable world bounds rather than the horizon-sized visual +ocean. -For the authored starter island, move a meaningful feature root rather than one -of its implementation children. Child transforms are local offsets owned by -that feature. Its imported GLB hierarchy is the starter region's terrain and -collision authority; this rule does not describe generated-world collision. +Placed-feature ownership: -The active `Environment` and `Sun` remain Inspector-authored on the shared -stage and are not recreated by either region. +- `PlayerSpawn` defines the initial player transform and facing. +- `SafeRespawns` contains authoritative recovery destinations. Recovery + preserves current facing. +- `Interactables/FishingShopWorld` owns the shop visual, collision, interaction + area, prompt, and entrance marker. +- `Interactables/PelicanCoolerPerch` owns the Pelican landmark visual; selling + remains a Cooler action. +- `Terrain` owns imported visuals and generated collision. +- `BelowWorldFailsafe/Coverage` owns below-world recovery coverage. + +The starter-island GLB hierarchy is the terrain-collision authority. The +region rebuilds one concave collision shape from every imported +`MeshInstance3D` when it loads, so newly exported terrain and props participate +without a separate stale collision bake. Keep purely decorative meshes out of +that hierarchy if they should not block players. + +The active `Environment`, `Sun`, and starter-island grass material remain +Inspector-authored and are not recreated by runtime scripts. ### Reusable world props @@ -226,14 +226,29 @@ root scaling is acceptable when visual and collision scale together; avoid non-uniform root scaling. Make mutable per-instance shapes, meshes, and materials local to the scene. -### Shoreline presentation +### Shoreline tide ribbons -The visible shoreline treatment is currently produced by the water materials. -The older smooth-ribbon baker and generated starter-island ribbon resource are -retained as development history/tooling, but the ribbon mesh is disabled and -is not part of the current rendered shoreline. Do not treat a ribbon rebuild -as a normal terrain-authoring requirement or re-enable the mesh as incidental -cleanup. +Maps using generated tide ribbons own a `ShorelineRibbonBaker` and one +`ShorelineRibbonConfig` per water body. Each configuration selects only its +static terrain source, water height, generation bounds, water-facing reference, +smoothing overrides, and generated `.tres` path. Props, players, bobbers, and +gameplay areas are not scanned unless selected explicitly. Only `SALT_WATER` +bodies generate ribbons. + +The editor automatically rebuilds configured shoreline resources when an +authored terrain GLB is reimported. Select the baker and press **Rebuild +Shoreline Ribbons** only when intentionally forcing a rebuild without a terrain +reimport. The equivalent headless fallback and validation command is: + +```sh +godot --headless --path . --script scripts/bake_shoreline_ribbons.gd +``` + +Use `debug_path_stage` only while comparing extraction stages and leave it Off +in committed scenes. A rebuild is required when saltwater terrain at the +waterline, water height, or generation bounds change; terrain reimports handle +the usual case automatically. Normal gameplay loads committed generated meshes +and never runs extraction. ### Facial-feature textures @@ -261,11 +276,9 @@ copies of the entire customization catalog. ### Texture sampling -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 +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 `TextureSamplingPolicy` autoload applies nearest sampling to 2D canvas items, Sprite3D presentations, imported 3D materials, and dynamically constructed mesh materials at runtime. @@ -286,12 +299,12 @@ with a -3 dBFS peak ceiling, mono, 48 kHz, 16-bit PCM. Import a supplied set through the normalization script rather than copying its WAV files directly: ```bash -scripts/import_animalese_voice.sh /path/to/source_clips +scripts/import_animalese_voice.sh /path/to/source_clips sample_set_directory ``` The source directory may contain lowercase letter, number, and underscore WAV filenames. The script converts every top-level WAV and writes the results under -`sound/dialogue/animalese//`. Add a new runtime set to +`sound/dialogue/animalese/sample_set_directory/`. Add a new runtime set to `player/animalese_voice_profiles.gd` after import, then run the quick validation suite. Keep the untouched submission and its original hashes in the private intake record; repository files are normalized derivatives. @@ -351,10 +364,10 @@ godot --headless --path . --script tests/fish_catalog_content_validation.gd rm -rf -- "$test_root" ``` -Do not point `straywild_DATA_DIR` at an arbitrary empty directory; it is an +Do not point `NETFISHING_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 -`straywild_CREATE_DATA_DIR=1`, allowing the game to initialize its known empty +`NETFISHING_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 803f72f..e7e3e09 100644 --- a/docs/PORTMASTER.md +++ b/docs/PORTMASTER.md @@ -1,15 +1,15 @@ # PortMaster reference -straywild's PortMaster release is a canonical PortMaster package, not a +NETfishing's PortMaster release is a canonical PortMaster package, not a version-named generic ZIP. The installer-facing archive must be named -`straywild.zip`, and its root must contain exactly: +`netfishing.zip`, and its root must contain exactly: ```text -straywild.sh -straywild/ +NETfishing.sh +netfishing/ ``` -`port.json` belongs at `straywild/port.json` in the distributable archive. +`port.json` belongs at `netfishing/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 straywild's former root-level `port.json` during auto-install tests. +masked NETfishing'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,34 +26,27 @@ directory. The templates in `scripts/portmaster/` are authoritative. ## Release contract -- `port.json` uses schema version 4, names `straywild.zip`, and marks the +- `port.json` uses schema version 4, names `netfishing.zip`, and marks the self-contained package ready to run. -- `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 `straywild/straywild.aarch64`. +- `NETfishing.sh` starts with `# PORTMASTER: netfishing.zip, NETfishing.sh`. +- The executable is `netfishing/NETfishing.aarch64`. - The package declares AArch64, two analog sticks, GLIBC 2.28, and `weston_pkg_0.2.squashfs`. -- 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 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 starts GPTOKEYB with the explicit `netfishing.gptk` no-op map. + Every keyboard and mouse binding is disabled, leaving only PortMaster's + device-specific force-quit chord while Godot and NETfishing's controller + mapping manager handle gameplay input. - The launcher calls `pm_platform_helper` for the game executable after starting GPTOKEYB and calls `pm_finish` after the game exits. -- straywild automatically creates player data for new installations under - `ports/saves/straywild/` and does not present the in-game folder picker. +- New installations automatically create player data under + `ports/saves/netfishing/` and do 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 - `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. + `netfishing/conf/data`, `netfishing/conf/config`, and + `netfishing/conf/cache`. - The archive must not contain `conf/`, saves, identities, logs, source files, `.git`, or `.godot` content. -- Release downloads must publish only the canonical `straywild.zip` for this +- Release downloads must publish only the canonical `netfishing.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. @@ -71,7 +64,7 @@ The script deletes and regenerates the Linux ARM64 export, stages the package, validates its structure, and writes: ```text -builds/v/straywild.zip +builds/v/netfishing.zip ``` `--package-only` is reserved for repackaging an already validated ARM64 export. @@ -87,7 +80,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 `straywild.zip`; never move the game release tag. +the release's existing `netfishing.zip`; never move the game release tag. ## Local muOS installation @@ -97,31 +90,31 @@ The muOS auto-install directory is: /mnt/mmc/MUOS/PortMaster/autoinstall/ ``` -For an explicit offline installation test, copy `straywild.zip` to a temporary +For an explicit offline installation test, copy `netfishing.zip` to a temporary device directory and run: ```bash /mnt/mmc/MUOS/PortMaster/harbourmaster \ - --offline --no-check install ./straywild.zip + --offline --no-check install ./netfishing.zip ``` -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: +Before upgrading an existing installation, preserve +`/mnt/mmc/ports/netfishing/conf/` and `/mnt/mmc/ports/saves/netfishing/` 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 - `straywild.gptk` and calls `pm_platform_helper` for the game executable. +2. Confirm the installed launcher contains the canonical PortMaster header, + starts GPTOKEYB with `netfishing.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. 5. Verify the displayed game version and controller face-button mapping. -6. Verify GPTOKEYB's device-specific force-quit chord exits the game. This is - Start+Select on most devices. +6. Verify PortMaster's force-quit chord exits the game. This is Start+Select on + most devices. Installing the public PortMaster catalog entry can still install an older -catalog build until the upstream `straywild.zip` is updated. A local release +catalog build until the upstream `netfishing.zip` is updated. A local release test must install the generated local archive explicitly. ## Template provenance @@ -134,7 +127,7 @@ f24daae48f543b3a270a5aa46b5e73a31904bf0c7216d4c8a9e15a8dc48a5eed screenshot.png ``` The remaining catalog metadata assets were copied from the installed official -`straywild.zip` package and are intentionally preserved byte-for-byte: +`netfishing.zip` package and are intentionally preserved byte-for-byte: ```text e2a9d132744684c67865c01eca027a8c9946b4c5a19da57c82f1af0373dc83b7 gameinfo.xml @@ -164,7 +157,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/straywild.sh` must replace the incompatible SDL2 entry +`scripts/portmaster/NETfishing.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 @@ -173,19 +166,19 @@ 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-straywild.sh`, which reads that +starting Weston. Weston must launch `launch-netfishing.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 `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 -avoids the anomalous controller behavior observed on ROCKNIX when no map is -provided. Do not add gameplay mappings to this file. +Legacy GPTOKEYB builds can load their compiled default keyboard map when no +`-c` file is supplied. That map translates face buttons, D-pad directions, and +sticks into keyboard or mouse events on top of Godot's native controller input. +Always pass `netfishing.gptk`, which explicitly unassigns every direct and +hotkey binding with GPTOKEYB's `\"` value. Do not add gameplay mappings to this +file. The Start+Select kill chord remains independent of the no-op bindings. Do not call `Input.add_joy_mapping(..., true)` for a recognized connected muOS controller. Updating this virtual controller after connection can stop Godot @@ -213,8 +206,8 @@ The light profile passes these Godot options: - `--max-fps 30` - `--audio-output-latency 40` -It also passes `straywild_PERFORMANCE_PROFILE=light` and -`straywild_LOW_END=1`. The game renders the 3D world at 37.5% linear +It also passes `NETFISHING_PERFORMANCE_PROFILE=light` and +`NETFISHING_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: @@ -248,7 +241,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 -`straywild/conf/performance_profile` containing exactly: +`netfishing/conf/performance_profile` containing exactly: ```text normal @@ -257,13 +250,13 @@ normal On a typical muOS installation, the full path is: ```text -/mnt/mmc/ports/straywild/conf/performance_profile +/mnt/mmc/ports/netfishing/conf/performance_profile ``` Set the file to `light`, or remove it, to restore the default. An externally -provided `straywild_PERFORMANCE_PROFILE=normal` or `light` environment value +provided `NETFISHING_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 `straywild/log.txt`. +the light profile and are reported in `netfishing/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 f187182..cd65918 100644 --- a/docs/README-PLAYTEST.txt +++ b/docs/README-PLAYTEST.txt @@ -1,10 +1,10 @@ -straywild -v0.20.2-alpha -Alpha 0.20.2 +NETfishing +v0.13.1-alpha +Alpha 0.13.1 -Thank you for supporting this private testing release. +Thank you for trying this early private playtest. -straywild is an early multiplayer fishing game. This alpha includes local +NETfishing 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 straywild.pck together. -3. Launch straywild.exe on Windows or straywild on Linux. +2. Keep the executable and netfishing.pck together. +3. Launch netfishing.exe on Windows or netfishing 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 straywild + chmod +x netfishing CONTROLS @@ -30,17 +30,13 @@ Sprint Shift Sneak Ctrl or click right stick Slow walk Alt Rotate camera Hold right mouse, or use right stick -Cycle active hotbar slot Mouse wheel or D-pad left/right +Cycle active hotbar slot Mouse wheel 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 +Cast / withdraw / reel Left mouse +Cooler, Bag, and Logbook Tab Game Menu / back Escape -Interact E -Chat T - -Keyboard and controller bindings can be reviewed and changed in Settings. +Open Fishing Shop E while near the shop FISHING @@ -52,14 +48,12 @@ FISHING - At barriers, use distinct left-click presses to damage the barrier. - Do not let the red chase meter catch the green meter. - Accessibility auto-click can be enabled in Settings. -- Approach the Fishing Shop and interact to open it. -- Move sellable inventory entries into the shop's sell tray, review the total, - and confirm the sale. -- Buy supplies, equipment, and persistent upgrades from their shop tabs. -- Move world-use items into the hotbar and select their slot to use or hold - them. +- Approach the bright Fishing Shop booth and press E to open it. +- The Fishing Shop buys one Cooler fish at a time for full base value. +- Buy Coffee, Energy Drinks, Snacks, and Fish Finders as Bag supplies. +- Drag supplies from Bag to the hotbar and left-click in READY to use one. - Coffee improves movement; other supplies temporarily improve fishing. -- Inventory and storage capacity can be expanded permanently at the shop. +- The Cooler starts at 12 fish; buy permanent capacity expansions at the shop. - Reel Speed upgrades increase authoritative green reeling progress. - Rod Power upgrades increase damage per valid barrier action. - Shop upgrades persist in the local progression save. @@ -70,37 +64,35 @@ FEATURES TO TRY - Hosting a private or public room and joining compatible online sessions - Direct-IP, saved-server, recent-server, and public-room connection flows - Text chat, player calls, player lists, relationships, and moderation tools -- Kat, Kim, and robot speech sample sets - Movement, jumping, camera rotation, and zoom -- Short, medium, and maximum-distance casts, including far ocean casts +- Short, medium, and maximum-distance casts - Valid water and invalid land casts - Manual withdrawal before a bite - Barrier-and-chase catching - Accessibility auto-click settings - Catch showcase and fish size variation -- General inventory, separate tackle, hotbar storage, player storage, and the - Logbook -- 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 -- Collaborative Art Kit drawing, finalized artwork, PNG export, and stamps +- Cooler, Bag, Logbook, favorites, and sorting +- Basic Fishing Rod equipment and the 1–9 hotbar +- Pelican selling and wallet updates +- Physical Fishing Shop sales and persistent fishing upgrades - Save, Continue, New Game, and Delete Save - Game Menu and persistent camera settings - Water-entry recovery from several shores SAVES AND SETTINGS -Progression and settings are stored outside the extracted game folder. The -Data & Identity page shows the active player-data location. Delete Save removes -progression but preserves device settings. +Progression and settings are stored in Godot's per-user application-data +directory, outside this extracted game folder. Delete Save removes progression +but preserves settings. + +Windows: + %APPDATA%\Godot\app_userdata\NETFISHING\ + +Linux: + ~/.local/share/godot/app_userdata/NETFISHING/ This is an early save format. Keep expectations modest and report any failure -to Continue, save, sell, move, favorite, or retain an inventory entry. +to Continue, save, sell, favorite, or retain an individual fish. FEEDBACK @@ -119,6 +111,5 @@ 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 444ebc7..49645b3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# straywild documentation +# NETfishing 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/straywild-discovery-server/src/branch/main/docs/API.md) +- [Discovery service API](https://forge.makearmy.io/woofmeow/netfishing-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/straywild-dedicated-server/src/branch/main/README.md) +- [Dedicated-server packaging](https://forge.makearmy.io/woofmeow/netfishing-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. @@ -34,12 +34,6 @@ and resources. These documents describe boundaries, policy, and maintenance procedures; they should not duplicate changing constants or inventories that can be derived reliably from the project. -The same rule applies to credits. `ATTRIBUTION.md` records creators, licenses, -and durable contribution families. It does not attempt to mirror every current -asset filename or private intake-directory layout. Planned or unincorporated -work is not described as shipped, and repository paths are included only when -they help recipients locate a distributed third-party work or license. - ## Files intentionally kept at the repository root The following are entry points or governing legal documents rather than @@ -52,10 +46,6 @@ general project documentation, so they remain at conventional root paths: - `TRADEMARKS.md` - `CONTRIBUTOR-TERMS.md` -`CONTRIBUTING.md` records that unsolicited contributions are not accepted. -`CONTRIBUTOR-TERMS.md` remains a governing legal record for previously -accepted and expressly invited work, not an invitation for new submissions. - Third-party font license texts stay beside their font files under `ui/fonts/` so the licensed files and their original notices cannot drift apart. Build scripts collect those legal files and the authoritative attribution record @@ -68,8 +58,3 @@ update the appropriate reference above and link to its heading when source comments need more context. Player-facing package instructions belong only in `README-PLAYTEST.txt`; source and scripts remain authoritative for command-line usage. - -Before adding a literal project path to prose, verify that it exists in the -same revision and that readers actually need the path. Prefer a stable owner, -interface, or resource type over a directory listing. A path or Git author is -never evidence of creative authorship. diff --git a/drawing/surface_drawing_canvas.gd b/drawing/surface_drawing_canvas.gd index 01d34d7..f6ceb94 100644 --- a/drawing/surface_drawing_canvas.gd +++ b/drawing/surface_drawing_canvas.gd @@ -2,6 +2,7 @@ class_name SurfaceDrawingCanvas extends Node3D const GUIDED_PIXEL_FILL: float = 0.88 +const FINISHED_PIXEL_FILL: float = 1.0 const SURFACE_OFFSET: float = 0.012 const LAYER_OFFSET_STEP: float = 0.0002 const SURFACE_SAMPLE_DEPTH: float = 0.45 @@ -12,17 +13,13 @@ var grid_height: int = 0 var cell_size: float = 0.0 var revision: int = -1 var creator_fingerprint: String = "" -var participant_fingerprints: Array[String] = [] var _surface_origin: Vector3 var _surface_normal: Vector3 var _surface_tangent: Vector3 var _surface_bitangent: Vector3 var _cells: Dictionary[int, Dictionary] = {} -var _cell_surface_transforms: Array[Transform3D] = [] -var _pixel_image: Image -var _pixel_texture: ImageTexture -var _pixel_instance: MeshInstance3D +var _color_meshes: Dictionary[StringName, MultiMeshInstance3D] = {} var _grid_instance: MeshInstance3D var _guide_visible: bool = true var _finalized: bool = false @@ -45,7 +42,6 @@ func setup( cell_size = float(data["cell_size"]) revision = int(data["revision"]) creator_fingerprint = str(data["creator_fingerprint"]) - participant_fingerprints = _participants_from_state(data) _finalized = bool(data.get("finalized", false)) _guide_visible = bool(data.get("guide_visible", true)) and not _finalized _layer = int(data.get("layer", 0)) @@ -69,7 +65,7 @@ func setup( var cell: Dictionary = cell_value _cells[_cell_key(int(cell["x"]), int(cell["y"]))] = cell.duplicate(true) _build_grid() - _build_pixel_renderer() + _rebuild_pixels() return true @@ -87,15 +83,8 @@ func apply_update(data: Dictionary) -> bool: _cells.erase(key) else: _cells[key] = edit.duplicate(true) - participant_fingerprints = _participants_from_update( - data, participant_fingerprints - ) revision = int(data["revision"]) - if is_hidden_by_relationship(): - _rebuild_pixel_image() - else: - _apply_pixel_edits(data["edits"]) - _refresh_grid_visibility() + _rebuild_pixels() return true @@ -107,32 +96,15 @@ func apply_guide_update(data: Dictionary) -> bool: ): return false revision = int(data["revision"]) - participant_fingerprints = _participants_from_update( - data, participant_fingerprints - ) _finalized = bool(data["finalized"]) _guide_visible = bool(data["guide_visible"]) and not _finalized - if _finalized: - _destroy_grid() - else: - _refresh_grid_visibility() + _refresh_grid_visibility() + _rebuild_pixels() return true func refresh_relationship_visibility() -> void: - _rebuild_pixel_image() - if _pixel_instance != null: - _pixel_instance.visible = not is_hidden_by_relationship() - _refresh_grid_visibility() - - -func is_hidden_by_relationship() -> bool: - if _relationships == null: - return false - for fingerprint: String in participant_fingerprints: - if _relationships.is_blocked(fingerprint): - return true - return false + _rebuild_pixels() func set_stencil_visible(should_be_visible: bool) -> void: @@ -149,27 +121,7 @@ func is_finalized() -> bool: func get_rendered_pixel_size() -> float: - return cell_size - - -func get_rendered_pixel_count() -> int: - if is_hidden_by_relationship(): - return 0 - var count: int = 0 - for cell: Dictionary in _cells.values(): - if not _visible_cell_color(cell).is_equal_approx(Color.TRANSPARENT): - count += 1 - return count - - -func get_export_image() -> Image: - if _pixel_image == null or _pixel_image.is_empty(): - return null - return _pixel_image.duplicate() as Image - - -func has_guide_geometry() -> bool: - return _grid_instance != null and is_instance_valid(_grid_instance) + return cell_size * _pixel_fill() func contains_world_point(world_point: Vector3, tolerance: float = 0.3) -> bool: @@ -240,18 +192,7 @@ func get_cell_surface_transform( ) -> Transform3D: if x < 0 or x >= grid_width or y < 0 or y >= grid_height: return Transform3D.IDENTITY - var key: int = _cell_key(x, y) - var local_transform: Transform3D = ( - _cell_surface_transforms[key] - if key >= 0 and key < _cell_surface_transforms.size() - else _sample_cell_transform(x, y, 1.0) - ) - var scaled_basis: Basis = local_transform.basis - var resolved_fill: float = clampf(fill, 0.05, 1.0) - scaled_basis.x *= resolved_fill - scaled_basis.y *= resolved_fill - local_transform.basis = scaled_basis - return global_transform * local_transform + return global_transform * _sample_cell_transform(x, y, fill) func get_authoritative_cells() -> Array[Dictionary]: @@ -269,9 +210,6 @@ func get_authoritative_cells() -> Array[Dictionary]: func _build_grid() -> void: if _grid_instance != null: _grid_instance.queue_free() - _grid_instance = null - if _finalized: - return var immediate := ImmediateMesh.new() var material := StandardMaterial3D.new() material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED @@ -281,7 +219,6 @@ func _build_grid() -> void: immediate.surface_begin(Mesh.PRIMITIVE_LINES, material) var half_width: float = float(grid_width) * cell_size * 0.5 var half_height: float = float(grid_height) * cell_size * 0.5 - var sampled_vertices: Dictionary[Vector2i, Dictionary] = {} for x: int in range(grid_width + 1): var horizontal: float = -half_width + float(x) * cell_size for y_segment: int in range(grid_height): @@ -292,15 +229,11 @@ func _build_grid() -> void: immediate, _surface_origin + _surface_tangent * horizontal + _surface_bitangent * start_vertical, - Vector2i(x, y_segment), - sampled_vertices, ) _add_grid_vertex( immediate, _surface_origin + _surface_tangent * horizontal + _surface_bitangent * (start_vertical + cell_size), - Vector2i(x, y_segment + 1), - sampled_vertices, ) for y: int in range(grid_height + 1): var vertical: float = -half_height + float(y) * cell_size @@ -312,16 +245,12 @@ func _build_grid() -> void: immediate, _surface_origin + _surface_tangent * start_horizontal + _surface_bitangent * vertical, - Vector2i(x_segment, y), - sampled_vertices, ) _add_grid_vertex( immediate, _surface_origin + _surface_tangent * (start_horizontal + cell_size) + _surface_bitangent * vertical, - Vector2i(x_segment + 1, y), - sampled_vertices, ) immediate.surface_end() _grid_instance = MeshInstance3D.new() @@ -332,16 +261,8 @@ func _build_grid() -> void: _refresh_grid_visibility() -func _add_grid_vertex( - immediate: ImmediateMesh, - world_point: Vector3, - grid_point: Vector2i, - sampled_vertices: Dictionary[Vector2i, Dictionary], -) -> void: - var sampled: Dictionary = sampled_vertices.get(grid_point, {}) - if sampled.is_empty(): - sampled = _sample_surface(world_point) - sampled_vertices[grid_point] = sampled +func _add_grid_vertex(immediate: ImmediateMesh, world_point: Vector3) -> void: + var sampled: Dictionary = _sample_surface(world_point) var point: Vector3 = sampled["position"] var normal: Vector3 = sampled["normal"] immediate.surface_add_vertex( @@ -349,130 +270,56 @@ func _add_grid_vertex( ) -func _build_pixel_renderer() -> void: - if _pixel_instance != null: - _pixel_instance.queue_free() - _pixel_instance = null - var cell_count: int = grid_width * grid_height - var vertices := PackedVector3Array() - var texture_coordinates := PackedVector2Array() - var indices := PackedInt32Array() - vertices.resize(cell_count * 4) - texture_coordinates.resize(cell_count * 4) - indices.resize(cell_count * 6) - _cell_surface_transforms.clear() - _cell_surface_transforms.resize(cell_count) - for y: int in range(grid_height): - for x: int in range(grid_width): - var cell_index: int = _cell_key(x, y) - var surface_transform := _sample_cell_transform(x, y, 1.0) - _cell_surface_transforms[cell_index] = surface_transform - var center: Vector3 = surface_transform.origin - var horizontal: Vector3 = surface_transform.basis.x * 0.5 - var vertical: Vector3 = surface_transform.basis.y * 0.5 - var vertex_offset: int = cell_index * 4 - vertices[vertex_offset] = center - horizontal - vertical - vertices[vertex_offset + 1] = center + horizontal - vertical - vertices[vertex_offset + 2] = center + horizontal + vertical - vertices[vertex_offset + 3] = center - horizontal + vertical - var image_row: int = _image_y(y) - var u_min: float = float(x) / float(grid_width) - var u_max: float = float(x + 1) / float(grid_width) - var v_min: float = float(image_row) / float(grid_height) - var v_max: float = float(image_row + 1) / float(grid_height) - texture_coordinates[vertex_offset] = Vector2(u_min, v_max) - texture_coordinates[vertex_offset + 1] = Vector2(u_max, v_max) - texture_coordinates[vertex_offset + 2] = Vector2(u_max, v_min) - texture_coordinates[vertex_offset + 3] = Vector2(u_min, v_min) - var index_offset: int = cell_index * 6 - indices[index_offset] = vertex_offset - indices[index_offset + 1] = vertex_offset + 1 - indices[index_offset + 2] = vertex_offset + 2 - indices[index_offset + 3] = vertex_offset - indices[index_offset + 4] = vertex_offset + 2 - indices[index_offset + 5] = vertex_offset + 3 - _rebuild_pixel_image() - var arrays: Array = [] - arrays.resize(Mesh.ARRAY_MAX) - arrays[Mesh.ARRAY_VERTEX] = vertices - arrays[Mesh.ARRAY_TEX_UV] = texture_coordinates - arrays[Mesh.ARRAY_INDEX] = indices - var mesh := ArrayMesh.new() - mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) +func _rebuild_pixels() -> void: + for instance: MultiMeshInstance3D in _color_meshes.values(): + instance.queue_free() + _color_meshes.clear() + var cells_by_color: Dictionary[StringName, Array] = {} + for cell: Dictionary in _cells.values(): + var author_fingerprint: String = str(cell.get("author_fingerprint", "")) + if ( + _relationships != null + and _relationships.is_blocked(author_fingerprint) + ): + continue + var color_id := StringName(str(cell.get("color_id", ""))) + if not SurfaceDrawingPalette.has_color(color_id): + continue + var color_cells: Array = cells_by_color.get(color_id, []) + color_cells.append(cell) + cells_by_color[color_id] = color_cells + for color_id: StringName in cells_by_color: + _create_color_mesh(color_id, cells_by_color[color_id]) + + +func _create_color_mesh(color_id: StringName, cells: Array) -> void: + if cells.is_empty(): + return + var quad := QuadMesh.new() + quad.size = Vector2.ONE var material := StandardMaterial3D.new() material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED - material.albedo_color = Color.WHITE - material.albedo_texture = _pixel_texture - material.texture_filter = BaseMaterial3D.TEXTURE_FILTER_NEAREST - material.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA_SCISSOR - material.alpha_scissor_threshold = 0.5 + material.albedo_color = SurfaceDrawingPalette.get_color(color_id) material.cull_mode = BaseMaterial3D.CULL_DISABLED - mesh.surface_set_material(0, material) - _pixel_instance = MeshInstance3D.new() - _pixel_instance.name = "ArtworkTexture" - _pixel_instance.mesh = mesh - _pixel_instance.cast_shadow = GeometryInstance3D.SHADOW_CASTING_SETTING_OFF - add_child(_pixel_instance) - _pixel_instance.visible = not is_hidden_by_relationship() - - -func _rebuild_pixel_image() -> void: - if ( - _pixel_image == null - or _pixel_image.get_width() != grid_width - or _pixel_image.get_height() != grid_height - ): - _pixel_image = Image.create( - grid_width, grid_height, false, Image.FORMAT_RGBA8 + quad.material = material + var multimesh := MultiMesh.new() + multimesh.transform_format = MultiMesh.TRANSFORM_3D + multimesh.mesh = quad + multimesh.instance_count = cells.size() + for cell_index: int in range(cells.size()): + var cell: Dictionary = cells[cell_index] + multimesh.set_instance_transform( + cell_index, + _sample_cell_transform( + int(cell["x"]), int(cell["y"]), _pixel_fill() + ), ) - _pixel_image.fill(Color.TRANSPARENT) - if not is_hidden_by_relationship(): - for cell: Dictionary in _cells.values(): - _set_image_cell(int(cell["x"]), int(cell["y"]), cell) - if _pixel_texture == null: - _pixel_texture = ImageTexture.create_from_image(_pixel_image) - else: - _pixel_texture.update(_pixel_image) - - -func _apply_pixel_edits(edits: Array) -> void: - if _pixel_image == null or _pixel_texture == null: - _rebuild_pixel_image() - return - for edit_value: Variant in edits: - var edit: Dictionary = edit_value - var x: int = int(edit["x"]) - var y: int = int(edit["y"]) - var cell: Dictionary = _cells.get(_cell_key(x, y), {}) - _set_image_cell(x, y, cell) - _pixel_texture.update(_pixel_image) - - -func _set_image_cell(x: int, y: int, cell: Dictionary) -> void: - if ( - _pixel_image == null - or x < 0 - or x >= grid_width - or y < 0 - or y >= grid_height - ): - return - _pixel_image.set_pixel(x, _image_y(y), _visible_cell_color(cell)) - - -func _visible_cell_color(cell: Dictionary) -> Color: - if cell.is_empty(): - return Color.TRANSPARENT - var color_id := StringName(str(cell.get("color_id", ""))) - return ( - SurfaceDrawingPalette.get_color(color_id) - if SurfaceDrawingPalette.has_color(color_id) - else Color.TRANSPARENT - ) - - -func _image_y(cell_y: int) -> int: - return grid_height - 1 - cell_y + var instance := MultiMeshInstance3D.new() + instance.name = "Pixels_%s" % color_id + instance.multimesh = multimesh + instance.cast_shadow = GeometryInstance3D.SHADOW_CASTING_SETTING_OFF + add_child(instance) + _color_meshes[color_id] = instance func _sample_cell_transform( @@ -529,60 +376,17 @@ func _sample_surface(expected: Vector3) -> Dictionary: return {"position": point, "normal": normal} +func _pixel_fill() -> float: + return GUIDED_PIXEL_FILL if _guide_visible else FINISHED_PIXEL_FILL + + func _surface_offset() -> float: return SURFACE_OFFSET + float(_layer) * LAYER_OFFSET_STEP -func _destroy_grid() -> void: - if _grid_instance == null: - return - _grid_instance.queue_free() - _grid_instance = null - - func _refresh_grid_visibility() -> void: if _grid_instance != null: - _grid_instance.visible = ( - _stencil_requested_visible - and _guide_visible - and not is_hidden_by_relationship() - ) - - -func _participants_from_state(data: Dictionary) -> Array[String]: - var result: Array[String] = [] - _append_participant(result, str(data.get("creator_fingerprint", ""))) - for value: Variant in data.get("participant_fingerprints", []): - _append_participant(result, str(value)) - for cell_value: Variant in data.get("cells", []): - var cell: Dictionary = cell_value - _append_participant( - result, str(cell.get("author_fingerprint", "")) - ) - return result - - -func _participants_from_update( - data: Dictionary, - fallback: Array[String], -) -> Array[String]: - var result: Array[String] = fallback.duplicate() - for value: Variant in data.get("participant_fingerprints", []): - _append_participant(result, str(value)) - for edit_value: Variant in data.get("edits", []): - var edit: Dictionary = edit_value - _append_participant( - result, str(edit.get("author_fingerprint", "")) - ) - return result - - -func _append_participant(result: Array[String], fingerprint: String) -> void: - if ( - NetworkIdentityCrypto.valid_fingerprint(fingerprint) - and fingerprint not in result - ): - result.append(fingerprint) + _grid_instance.visible = _stencil_requested_visible and _guide_visible func _cell_key(x: int, y: int) -> int: diff --git a/drawing/surface_drawing_protocol.gd b/drawing/surface_drawing_protocol.gd index ff132f8..5ca4ae0 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.DRAWING_RELIABLE_CHANNEL +const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_RELIABLE_CHANNEL const GRID_SIZES: Array[int] = [16, 32, 64, 128] const DEFAULT_GRID_SIZE: int = 16 const MAX_GRID_SIZE: int = 128 @@ -18,9 +18,6 @@ const MAX_CANVAS_ID_LENGTH: int = 64 const MAX_REQUEST_ID_LENGTH: int = 64 const MAX_STROKE_ID_LENGTH: int = 64 const MAX_SESSION_ID_LENGTH: int = 96 -# Sessions support up to 128 simultaneous players. Keep enough bounded history -# for a complete room turnover while never accepting unattributed edits. -const MAX_PARTICIPANTS: int = 256 const MAX_COORDINATE: float = 10000.0 @@ -67,38 +64,6 @@ static func validate_edit_request(data: Variant) -> bool: return true -static func validate_stamp_request(data: Variant) -> bool: - if typeof(data) != TYPE_DICTIONARY: - return false - var value: Dictionary = data - if ( - not _valid_common(value) - or not _valid_vector(value.get("origin")) - or not _valid_vector(value.get("normal")) - or not _valid_vector(value.get("tangent")) - or typeof(value.get("width")) != TYPE_INT - or int(value["width"]) not in GRID_SIZES - or typeof(value.get("height")) != TYPE_INT - or int(value["height"]) != int(value["width"]) - or typeof(value.get("cell_size")) not in [TYPE_FLOAT, TYPE_INT] - or not is_equal_approx(float(value["cell_size"]), CELL_SIZE) - or typeof(value.get("pixels")) != TYPE_PACKED_BYTE_ARRAY - ): - return false - var pixels: PackedByteArray = value["pixels"] - var expected_size: int = int(value["width"]) * int(value["height"]) - if pixels.size() != expected_size: - return false - var maximum_palette_index: int = SurfaceDrawingPalette.COLORS.size() - var painted_count: int = 0 - for palette_index: int in pixels: - if palette_index > maximum_palette_index: - return false - if palette_index > 0: - painted_count += 1 - return painted_count > 0 - - static func validate_guide_request(data: Variant) -> bool: if typeof(data) != TYPE_DICTIONARY: return false @@ -147,9 +112,6 @@ static func validate_canvas_state(data: Variant) -> bool: or not NetworkIdentityCrypto.valid_fingerprint( value.get("creator_fingerprint") ) - or not _valid_participant_fingerprints( - value.get("participant_fingerprints", []) - ) or typeof(value.get("cells")) != TYPE_ARRAY ): return false @@ -165,13 +127,6 @@ static func validate_canvas_state(data: Variant) -> bool: or int((cell_value as Dictionary)["y"]) >= grid_height ): return false - var participants: Array = value.get("participant_fingerprints", []) - if not participants.is_empty(): - if str(value["creator_fingerprint"]) not in participants: - return false - for cell_value: Variant in cells: - if str((cell_value as Dictionary)["author_fingerprint"]) not in participants: - return false return true @@ -188,9 +143,6 @@ static func validate_guide_update(data: Variant) -> bool: and int(value["revision"]) >= 1 and typeof(value.get("guide_visible")) == TYPE_BOOL and typeof(value.get("finalized")) == TYPE_BOOL - and _valid_participant_fingerprints( - value.get("participant_fingerprints", []) - ) ) @@ -208,9 +160,6 @@ static func validate_canvas_update(data: Variant) -> bool: or typeof(value.get("revision")) != TYPE_INT or int(value["revision"]) < 1 or typeof(value.get("edits")) != TYPE_ARRAY - or not _valid_participant_fingerprints( - value.get("participant_fingerprints", []) - ) ): return false var edits: Array = value["edits"] @@ -219,18 +168,6 @@ static func validate_canvas_update(data: Variant) -> bool: for edit_value: Variant in edits: if not validate_authoritative_cell(edit_value, true): return false - var participants: Array = value.get("participant_fingerprints", []) - if not participants.is_empty(): - for edit_value: Variant in edits: - var edit: Dictionary = edit_value - var author_fingerprint: String = str( - edit.get("author_fingerprint", "") - ) - if ( - not str(edit.get("color_id", "")).is_empty() - and author_fingerprint not in participants - ): - return false return true @@ -305,26 +242,6 @@ static func _valid_stroke_id(value: Variant) -> bool: ) -static func _valid_participant_fingerprints(value: Variant) -> bool: - if typeof(value) != TYPE_ARRAY: - return false - var fingerprints: Array = value - if fingerprints.size() > MAX_PARTICIPANTS: - return false - var seen: Dictionary[String, bool] = {} - for fingerprint_value: Variant in fingerprints: - if typeof(fingerprint_value) != TYPE_STRING: - return false - var fingerprint: String = str(fingerprint_value) - if ( - not NetworkIdentityCrypto.valid_fingerprint(fingerprint) - or seen.has(fingerprint) - ): - return false - seen[fingerprint] = true - return true - - static func _valid_vector(value: Variant) -> bool: if typeof(value) != TYPE_ARRAY: return false diff --git a/economy/art_shop_stock.gd b/economy/art_shop_stock.gd index ddd6f3c..ff84d09 100644 --- a/economy/art_shop_stock.gd +++ b/economy/art_shop_stock.gd @@ -24,9 +24,6 @@ const GRID_PRODUCTS: Array[StringName] = [ &"grid_64x", &"grid_128x", ] -const STAMP_PRODUCTS: Array[StringName] = [ - PlayerArtUnlocks.STAMP_PRODUCT_ID, -] static func get_price(product_id: StringName) -> int: @@ -47,8 +44,6 @@ static func get_display_name(product_id: StringName) -> String: var grid_size: int = PlayerArtUnlocks.grid_size_for_product(product_id) if grid_size > 0: return "%d×%d grid" % [grid_size, grid_size] - if product_id == PlayerArtUnlocks.STAMP_PRODUCT_ID: - return "Stamp tool" return "Unknown art supply" @@ -66,6 +61,4 @@ static func get_description(product_id: StringName) -> String: return "Unlocks the %d×%d grid in the Paint UI." % [ grid_size, grid_size, ] - if product_id == PlayerArtUnlocks.STAMP_PRODUCT_ID: - return "Unlocks saved artwork stamps in the Art Kit." return "" diff --git a/economy/fishing_shop_stock.gd b/economy/fishing_shop_stock.gd index b9d3eaf..962ba3a 100644 --- a/economy/fishing_shop_stock.gd +++ b/economy/fishing_shop_stock.gd @@ -12,7 +12,6 @@ const MAGNET_ID: StringName = &"magnet" const BATTERIES_ID: StringName = &"batteries" const CRAB_NET_ID: StringName = &"crab_net" const STANDARD_SHOVEL_ID: StringName = &"standard_shovel" -const FISHING_NET_ID: StringName = &"fishing_net" const ITEM_PRICES: Dictionary[StringName, int] = { &"worms": 1, @@ -31,7 +30,6 @@ const ITEM_PRICES: Dictionary[StringName, int] = { BATTERIES_ID: 15, CRAB_NET_ID: 50, STANDARD_SHOVEL_ID: 75, - FISHING_NET_ID: 250, } const BAIT_UNLOCK_PRICES: Dictionary[StringName, int] = { &"snails": 400, @@ -54,7 +52,6 @@ const ITEM_ORDER: Array[StringName] = [ MAGNET_ID, CRAB_NET_ID, STANDARD_SHOVEL_ID, - FISHING_NET_ID, &"coffee", &"energy_drink", &"snack", @@ -123,7 +120,6 @@ static func is_permanent_unlock( or item_id == MAGNET_ID or item_id == CRAB_NET_ID or item_id == STANDARD_SHOVEL_ID - or item_id == FISHING_NET_ID or item is FishingRodDataType ) ) diff --git a/export_presets.cfg b/export_presets.cfg index a49f01f..ccc81d9 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.20.2-alpha/windows-x86_64/straywild.exe" +export_path="builds/v0.13.1-alpha/windows-x86_64/NETfishing.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/straywild.ico" +application/icon="res://art/exported/system_icons/netfishing.ico" application/console_wrapper_icon="" -application/icon_interpolation=0 -application/file_version="0.20.2.0" -application/product_version="0.20.2.0" +application/icon_interpolation=4 +application/file_version="0.13.1.0" +application/product_version="0.13.1.0" application/company_name="Woofmeow" -application/product_name="straywild" -application/file_description="straywild v0.20.2-alpha" +application/product_name="NETfishing" +application/file_description="NETfishing v0.13.1-alpha" application/copyright="Copyright © 2026 Woofmeow" -application/trademarks="straywild and Woofmeow branding is reserved; see TRADEMARKS.md" +application/trademarks="NETfishing 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.20.2-alpha/linux-arm64/straywild.arm64" +export_path="builds/v0.13.1-alpha/linux-arm64/NETfishing.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.20.2-alpha/macos/straywild.zip" +export_path="builds/v0.13.1-alpha/macos/NETfishing.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/straywild_1024.png" +application/icon="res://art/exported/system_icons/netfishing_1024.png" application/icon_interpolation=0 -application/short_version="0.20.2" -application/version="0.20.2" +application/short_version="0.13.1" +application/version="0.13.1" 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.20.2-alpha/server-linux-x86_64/straywildServer.x86_64" +export_path="builds/v0.13.1-alpha/server-linux-x86_64/NETfishingServer.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.20.2-alpha/android/straywild.apk" +export_path="builds/v0.13.1-alpha/android/NETfishing.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=200200 -version/name="v0.20.2-alpha" +version/code=130100 +version/name="v0.13.1-alpha" package/unique_name="io.woofmeow.netfishing" -package/name="straywild" +package/name="NETfishing" 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/straywild_256.png" +launcher_icons/main_192x192="res://art/exported/system_icons/netfishing_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.20.2-alpha/linux-x86_64/straywild.x86_64" +export_path="builds/v0.13.1-alpha/linux-x86_64/NETfishing.x86_64" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" diff --git a/fish/fish_data.gd b/fish/fish_data.gd index 46d4675..2696d4b 100644 --- a/fish/fish_data.gd +++ b/fish/fish_data.gd @@ -36,12 +36,6 @@ enum LogbookSection { SHELLFISH, } -enum CreatureGroup { - FISH, - INSECT, - SHELLFISH, -} - @export var id: StringName @export var display_name: String @export_category("Developer Catalog") @@ -100,14 +94,6 @@ func is_fishable() -> bool: return is_selectable() and collection_method == CollectionMethod.FISHING -func get_creature_group() -> CreatureGroup: - if logbook_section == LogbookSection.SHELLFISH: - return CreatureGroup.SHELLFISH - if collection_method == CollectionMethod.FISHING: - return CreatureGroup.FISH - return CreatureGroup.INSECT - - func get_habitat_label() -> String: if not habitat_label.strip_edges().is_empty(): return habitat_label.strip_edges().to_lower() diff --git a/fish/pools/generated_lake_pool.tres b/fish/pools/generated_lake_pool.tres deleted file mode 100644 index c0ff343..0000000 --- a/fish/pools/generated_lake_pool.tres +++ /dev/null @@ -1,27 +0,0 @@ -[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_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_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 deleted file mode 100644 index 9da4ed5..0000000 --- a/fish/pools/generated_pond_pool.tres +++ /dev/null @@ -1,40 +0,0 @@ -[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_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_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 deleted file mode 100644 index 66102ef..0000000 --- a/fish/pools/generated_river_pool.tres +++ /dev/null @@ -1,60 +0,0 @@ -[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_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_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_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 274b58d..1e47a2b 100644 --- a/fish/pools/starter_ocean_pool.tres +++ b/fish/pools/starter_ocean_pool.tres @@ -1,211 +1,41 @@ -[gd_resource type="Resource" load_steps=206 format=3] +[gd_resource type="Resource" load_steps=36 format=3] [ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"] -[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/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/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/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/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/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/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"] +[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"] [resource] script = ExtResource("1_pool") -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")] +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")] diff --git a/fish/pools/starter_pond_pool.tres b/fish/pools/starter_pond_pool.tres index e9718d9..f7976fc 100644 --- a/fish/pools/starter_pond_pool.tres +++ b/fish/pools/starter_pond_pool.tres @@ -1,113 +1,33 @@ -[gd_resource type="Resource" load_steps=108 format=3] +[gd_resource type="Resource" load_steps=28 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_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"] +[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"] [resource] script = ExtResource("1_pool") -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")] +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")] diff --git a/fish/species/abalone_red/abalone_red.tres b/fish/species/abalone_red/abalone_red.tres index 6efe784..f454905 100644 --- a/fish/species/abalone_red/abalone_red.tres +++ b/fish/species/abalone_red/abalone_red.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"abalone_red" display_name = "red abalone" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 b0e40b8..2a7c794 100644 --- a/fish/species/amberjack_greater/amberjack_greater.tres +++ b/fish/species/amberjack_greater/amberjack_greater.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"amberjack_greater" display_name = "greater amberjack" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 1d5983c..0f82f2f 100644 --- a/fish/species/amberjack_lesser/amberjack_lesser.tres +++ b/fish/species/amberjack_lesser/amberjack_lesser.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"amberjack_lesser" display_name = "lesser amberjack" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 0a7d122..4e442e7 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" path="res://art/exported/creatures/805.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://debgohfsg4ec7" path="res://fish/species/anchovy_european/fish_anchovy_european.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 e2c7fa0..37c52f7 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" path="res://art/exported/creatures/808.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://6sikqc8eivta" path="res://fish/species/anchovy_northern/fish_anchovy_northern.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 7a58450..63d818b 100644 --- a/fish/species/angelfish_freshwater/angelfish_freshwater.tres +++ b/fish/species/angelfish_freshwater/angelfish_freshwater.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"angelfish_freshwater" display_name = "freshwater angelfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 5a15f5b..70706d8 100644 --- a/fish/species/angelfish_queen/angelfish_queen.tres +++ b/fish/species/angelfish_queen/angelfish_queen.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"angelfish_queen" display_name = "queen angelfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 83b1fb3..4ac947e 100644 --- a/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres +++ b/fish/species/anglerfish_black_seadevil/anglerfish_black_seadevil.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"anglerfish_black_seadevil" display_name = "black seadevil" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 b43e3bd..6561920 100644 --- a/fish/species/arapaima/arapaima.tres +++ b/fish/species/arapaima/arapaima.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"arapaima" display_name = "arapaima" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 42baf33..054b94d 100644 --- a/fish/species/arowana_silver/arowana_silver.tres +++ b/fish/species/arowana_silver/arowana_silver.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"arowana_silver" display_name = "silver arowana" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c201f9c..f67de61 100644 --- a/fish/species/axolotl/axolotl.tres +++ b/fish/species/axolotl/axolotl.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"axolotl" display_name = "axolotl" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 9cbafff..4e1711b 100644 --- a/fish/species/barbel_common/barbel_common.tres +++ b/fish/species/barbel_common/barbel_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"barbel_common" display_name = "common barbel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f15092c..0039cef 100644 --- a/fish/species/barracuda_great/barracuda_great.tres +++ b/fish/species/barracuda_great/barracuda_great.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"barracuda_great" display_name = "great barracuda" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 705001d..0b98fe4 100644 --- a/fish/species/barramundi/barramundi.tres +++ b/fish/species/barramundi/barramundi.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"barramundi" display_name = "barramundi" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c0705dd..d1d9fc8 100644 --- a/fish/species/barreleye_pacific/barreleye_pacific.tres +++ b/fish/species/barreleye_pacific/barreleye_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"barreleye_pacific" display_name = "Pacific barreleye" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 9d52609..eeb6df5 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://dvh6s86asl4ix" path="res://fish/species/bass/fish_bass_striped.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 4c9ca3c..276ecfb 100644 --- a/fish/species/betta_siamese/betta_siamese.tres +++ b/fish/species/betta_siamese/betta_siamese.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"betta_siamese" display_name = "Siamese fighting fish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 b542327..46d7db4 100644 --- a/fish/species/black_drum/black_drum.tres +++ b/fish/species/black_drum/black_drum.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"black_drum" display_name = "black drum" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 4245304..41846aa 100644 --- a/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres +++ b/fish/species/blobfish_smooth_head/blobfish_smooth_head.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"blobfish_smooth_head" display_name = "smooth-head blobfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 d8888f7..f36c898 100644 --- a/fish/species/bluefish/bluefish.tres +++ b/fish/species/bluefish/bluefish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"bluefish" display_name = "bluefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 181b969..e32fdcb 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://art/exported/creatures/3102.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/bluegill/fish_bluegill.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 b2949d2..fe4def7 100644 --- a/fish/species/bonefish/bonefish.tres +++ b/fish/species/bonefish/bonefish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"bonefish" display_name = "bonefish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7b2881f..dc76fd9 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://art/exported/creatures/101.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/bowfin/bowfin.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 aeda5ad..040e8fc 100644 --- a/fish/species/boxfish_yellow/boxfish_yellow.tres +++ b/fish/species/boxfish_yellow/boxfish_yellow.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"boxfish_yellow" display_name = "yellow boxfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 cc44fef..38d9015 100644 --- a/fish/species/bream_common/bream_common.tres +++ b/fish/species/bream_common/bream_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"bream_common" display_name = "common bream" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 bae0473..6292951 100644 --- a/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres +++ b/fish/species/buffalo_bigmouth/buffalo_bigmouth.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"buffalo_bigmouth" display_name = "bigmouth buffalo" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 2756035..d590ec6 100644 --- a/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres +++ b/fish/species/buffalo_smallmouth/buffalo_smallmouth.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"buffalo_smallmouth" display_name = "smallmouth buffalo" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 1d904bd..f10fa87 100644 --- a/fish/species/bullhead_black/bullhead_black.tres +++ b/fish/species/bullhead_black/bullhead_black.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"bullhead_black" display_name = "black bullhead" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 b3651b2..a2c81f9 100644 --- a/fish/species/bullhead_brown/bullhead_brown.tres +++ b/fish/species/bullhead_brown/bullhead_brown.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"bullhead_brown" display_name = "brown bullhead" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 4dce589..b00df0d 100644 --- a/fish/species/bullhead_yellow/bullhead_yellow.tres +++ b/fish/species/bullhead_yellow/bullhead_yellow.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"bullhead_yellow" display_name = "yellow bullhead" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 e46006c..189f076 100644 --- a/fish/species/burbot/burbot.tres +++ b/fish/species/burbot/burbot.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"burbot" display_name = "burbot" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7a7c112..8ef5d2e 100644 --- a/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres +++ b/fish/species/butterflyfish_copperband/butterflyfish_copperband.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"butterflyfish_copperband" display_name = "copperband butterflyfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5759cb8..7f1b9ba 100644 --- a/fish/species/capelin/capelin.tres +++ b/fish/species/capelin/capelin.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"capelin" display_name = "capelin" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 24b50e7..37cff52 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c6pa1gqwv1a5s" path="res://fish/species/carp/fish_carp_common.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 8df5866..e26c1e8 100644 --- a/fish/species/catfish_blue/catfish_blue.tres +++ b/fish/species/catfish_blue/catfish_blue.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://7f1dtcou8moe" path="res://fish/species/catfish_blue/fish_catfish_blue.png" id="4_texture"] [sub_resource type="Resource" id="BlueCatfishAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) allow_day = false preferred_bait_tags = Array[StringName]([&"worm", &"minnow"]) preferred_bait_weight_multiplier = 1.35 diff --git a/fish/species/catfish_channel/catfish_channel.tres b/fish/species/catfish_channel/catfish_channel.tres index e72fdb0..b545b89 100644 --- a/fish/species/catfish_channel/catfish_channel.tres +++ b/fish/species/catfish_channel/catfish_channel.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://dvxpk2ltt3blb" path="res://fish/species/catfish_channel/fish_catfish_channel.png" id="4_texture"] [sub_resource type="Resource" id="ChannelCatfishAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"starter_pond", &"pond"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) allow_day = false preferred_bait_tags = Array[StringName]([&"worm"]) preferred_bait_weight_multiplier = 1.35 diff --git a/fish/species/catfish_flathead/catfish_flathead.tres b/fish/species/catfish_flathead/catfish_flathead.tres index de0e5f6..68a9bfd 100644 --- a/fish/species/catfish_flathead/catfish_flathead.tres +++ b/fish/species/catfish_flathead/catfish_flathead.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bacx63lp0yh7t" path="res://fish/species/catfish_flathead/fish_catfish_flathead.png" id="4_texture"] [sub_resource type="Resource" id="FlatheadCatfishAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) allow_day = false preferred_bait_tags = Array[StringName]([&"worm", &"minnow"]) preferred_bait_weight_multiplier = 1.35 diff --git a/fish/species/catfish_walking/catfish_walking.tres b/fish/species/catfish_walking/catfish_walking.tres index fe36cee..c0de099 100644 --- a/fish/species/catfish_walking/catfish_walking.tres +++ b/fish/species/catfish_walking/catfish_walking.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"catfish_walking" display_name = "walking catfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 86b799f..aad1cb5 100644 --- a/fish/species/catfish_white/catfish_white.tres +++ b/fish/species/catfish_white/catfish_white.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bf6kiawwekv7g" path="res://fish/species/catfish_white/fish_catfish_white.png" id="4_texture"] [sub_resource type="Resource" id="WhiteCatfishAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"starter_pond", &"pond"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) allow_day = false preferred_bait_tags = Array[StringName]([&"worm"]) preferred_bait_weight_multiplier = 1.35 diff --git a/fish/species/char_arctic/char_arctic.tres b/fish/species/char_arctic/char_arctic.tres index 17d08d1..85bcac1 100644 --- a/fish/species/char_arctic/char_arctic.tres +++ b/fish/species/char_arctic/char_arctic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"char_arctic" display_name = "arctic char" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 65f35b4..cec319e 100644 --- a/fish/species/chromis_blue_green/chromis_blue_green.tres +++ b/fish/species/chromis_blue_green/chromis_blue_green.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"chromis_blue_green" display_name = "blue-green chromis" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 778e9da..acd5351 100644 --- a/fish/species/chub_creek/chub_creek.tres +++ b/fish/species/chub_creek/chub_creek.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"chub_creek" display_name = "creek chub" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 16f43a1..61ccc87 100644 --- a/fish/species/chub_european/chub_european.tres +++ b/fish/species/chub_european/chub_european.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/2505.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c04wtbyslmpll" path="res://fish/species/chub_european/fish_chub_european.png" id="4_texture"] [sub_resource type="Resource" id="ChubEuropeanAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/chub_flame/chub_flame.tres b/fish/species/chub_flame/chub_flame.tres index 2bf815c..7a656cd 100644 --- a/fish/species/chub_flame/chub_flame.tres +++ b/fish/species/chub_flame/chub_flame.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bla6pc21imxsi" path="res://fish/species/chub_flame/fish_chub_flame.png" id="4_texture"] [sub_resource type="Resource" id="ChubFlameAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/chub_lake/chub_lake.tres b/fish/species/chub_lake/chub_lake.tres index 1dc2d9a..26a8fe5 100644 --- a/fish/species/chub_lake/chub_lake.tres +++ b/fish/species/chub_lake/chub_lake.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/2807.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://w8cjrpnv350h" path="res://fish/species/chub_lake/fish_chub_lake.png" id="4_texture"] [sub_resource type="Resource" id="ChubLakeAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"lake"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/cisco/cisco.tres b/fish/species/cisco/cisco.tres index 1bc53b0..2a91382 100644 --- a/fish/species/cisco/cisco.tres +++ b/fish/species/cisco/cisco.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cisco" display_name = "cisco" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 492113c..5add347 100644 --- a/fish/species/clam_geoduck/clam_geoduck.tres +++ b/fish/species/clam_geoduck/clam_geoduck.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"clam_geoduck" display_name = "Pacific geoduck" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 2b4f59d..cf31a65 100644 --- a/fish/species/clam_giant/clam_giant.tres +++ b/fish/species/clam_giant/clam_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"clam_giant" display_name = "giant clam" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 2b3fe73..20e3f8a 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://art/exported/creatures/6406.png" id="3_texture"] +[ext_resource type="Texture2D" path="res://fish/species/clam_manila/clam_manila.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 16566cb..ac9a95e 100644 --- a/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres +++ b/fish/species/clownfish_ocellaris/clownfish_ocellaris.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"clownfish_ocellaris" display_name = "ocellaris clownfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 51dec82..1cde907 100644 --- a/fish/species/cobia/cobia.tres +++ b/fish/species/cobia/cobia.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cobia" display_name = "cobia" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 640ccaa..e799724 100644 --- a/fish/species/cod_atlantic/cod_atlantic.tres +++ b/fish/species/cod_atlantic/cod_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"cod_atlantic" display_name = "atlantic cod" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 729acc1..89eb39f 100644 --- a/fish/species/cod_pacific/cod_pacific.tres +++ b/fish/species/cod_pacific/cod_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"cod_pacific" display_name = "pacific cod" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 8b7bf18..3da9f04 100644 --- a/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres +++ b/fish/species/coelacanth_west_indian/coelacanth_west_indian.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"coelacanth_west_indian" display_name = "West Indian Ocean coelacanth" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 045012b..bac9eb6 100644 --- a/fish/species/conch_queen/conch_queen.tres +++ b/fish/species/conch_queen/conch_queen.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"conch_queen" display_name = "queen conch" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 ea750bd..600d189 100644 --- a/fish/species/cornetfish_red/cornetfish_red.tres +++ b/fish/species/cornetfish_red/cornetfish_red.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"cornetfish_red" display_name = "red cornetfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 2a848a7..8d3e4b2 100644 --- a/fish/species/cowfish_longhorn/cowfish_longhorn.tres +++ b/fish/species/cowfish_longhorn/cowfish_longhorn.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"cowfish_longhorn" display_name = "longhorn cowfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 b715522..2ee3279 100644 --- a/fish/species/crab_blue/crab_blue.tres +++ b/fish/species/crab_blue/crab_blue.tres @@ -1,11 +1,9 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 @@ -14,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"crab_blue" display_name = "blue crab" -active = true +active = false 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." @@ -32,5 +30,3 @@ 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 7dec427..8f31b9c 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://art/exported/creatures/3906.png" id="3_texture"] +[ext_resource type="Texture2D" path="res://fish/species/crab_brown/crab_brown.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 33ffbff..d09f4cd 100644 --- a/fish/species/crab_japanese_spider/crab_japanese_spider.tres +++ b/fish/species/crab_japanese_spider/crab_japanese_spider.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"crab_japanese_spider" display_name = "Japanese spider crab" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c82579a..3a1a326 100644 --- a/fish/species/crab_red_king/crab_red_king.tres +++ b/fish/species/crab_red_king/crab_red_king.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"crab_red_king" display_name = "red king crab" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 0359a2c..bfa949b 100644 --- a/fish/species/crappie_black/crappie_black.tres +++ b/fish/species/crappie_black/crappie_black.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"crappie_black" display_name = "black crappie" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6766f1e..021000b 100644 --- a/fish/species/crappie_white/crappie_white.tres +++ b/fish/species/crappie_white/crappie_white.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"crappie_white" display_name = "white crappie" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6c055d2..c3bd2df 100644 --- a/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres +++ b/fish/species/crayfish_red_swamp/crayfish_red_swamp.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"crayfish_red_swamp" display_name = "red swamp crayfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 d0fb147..b8ebf09 100644 --- a/fish/species/croaker_atlantic/croaker_atlantic.tres +++ b/fish/species/croaker_atlantic/croaker_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"croaker_atlantic" display_name = "atlantic croaker" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1e282da..e2a6105 100644 --- a/fish/species/croaker_yellowfin/croaker_yellowfin.tres +++ b/fish/species/croaker_yellowfin/croaker_yellowfin.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"croaker_yellowfin" display_name = "yellowfin croaker" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 b223ba1..6e69dd6 100644 --- a/fish/species/cusk/cusk.tres +++ b/fish/species/cusk/cusk.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"cusk" display_name = "cusk" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c1ef5ec..f6b678a 100644 --- a/fish/species/cuttlefish_common/cuttlefish_common.tres +++ b/fish/species/cuttlefish_common/cuttlefish_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"cuttlefish_common" display_name = "common cuttlefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 496ade9..1af0669 100644 --- a/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres +++ b/fish/species/cuttlefish_flamboyant/cuttlefish_flamboyant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"cuttlefish_flamboyant" display_name = "flamboyant cuttlefish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 b758404..0e605c0 100644 --- a/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres +++ b/fish/species/damselfish_sergeant_major/damselfish_sergeant_major.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"damselfish_sergeant_major" display_name = "sergeant major" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 0f73935..285687e 100644 --- a/fish/species/danio_zebra/danio_zebra.tres +++ b/fish/species/danio_zebra/danio_zebra.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"danio_zebra" display_name = "zebrafish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 9803f77..4fcd169 100644 --- a/fish/species/discus/discus.tres +++ b/fish/species/discus/discus.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"discus" display_name = "discus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 2b410ea..abbc37f 100644 --- a/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres +++ b/fish/species/dolphin_bottlenose/dolphin_bottlenose.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"dolphin_bottlenose" display_name = "common bottlenose dolphin" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 e22f7c9..4110ebe 100644 --- a/fish/species/dorado_golden/dorado_golden.tres +++ b/fish/species/dorado_golden/dorado_golden.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"dorado_golden" display_name = "golden dorado" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 0c81d2e..3225a52 100644 --- a/fish/species/dugong/dugong.tres +++ b/fish/species/dugong/dugong.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"dugong" display_name = "dugong" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 a433afa..b1f4b8e 100644 --- a/fish/species/eel_american/eel_american.tres +++ b/fish/species/eel_american/eel_american.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"eel_american" display_name = "american eel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7683d92..4ef5246 100644 --- a/fish/species/eel_european/eel_european.tres +++ b/fish/species/eel_european/eel_european.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"eel_european" display_name = "european eel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 ef5b6df..7792d81 100644 --- a/fish/species/electric_eel/electric_eel.tres +++ b/fish/species/electric_eel/electric_eel.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"electric_eel" display_name = "electric eel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 53ef7b6..02c6bbe 100644 --- a/fish/species/fallfish/fallfish.tres +++ b/fish/species/fallfish/fallfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"fallfish" display_name = "fallfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1004279..c7312b0 100644 --- a/fish/species/fangtooth_common/fangtooth_common.tres +++ b/fish/species/fangtooth_common/fangtooth_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"fangtooth_common" display_name = "common fangtooth" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 3d096df..50bd7dc 100644 --- a/fish/species/flounder_peacock/flounder_peacock.tres +++ b/fish/species/flounder_peacock/flounder_peacock.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"flounder_peacock" display_name = "peacock flounder" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 680738d..b5bb969 100644 --- a/fish/species/flounder_summer/flounder_summer.tres +++ b/fish/species/flounder_summer/flounder_summer.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"flounder_summer" display_name = "summer flounder" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c3ae09b..1297bcb 100644 --- a/fish/species/flounder_winter/flounder_winter.tres +++ b/fish/species/flounder_winter/flounder_winter.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"flounder_winter" display_name = "winter flounder" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 12fd4bb..6376ead 100644 --- a/fish/species/flyingfish_tropical/flyingfish_tropical.tres +++ b/fish/species/flyingfish_tropical/flyingfish_tropical.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"flyingfish_tropical" display_name = "tropical flyingfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7ebba2f..a2e5361 100644 --- a/fish/species/foureyes_largescale/foureyes_largescale.tres +++ b/fish/species/foureyes_largescale/foureyes_largescale.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"foureyes_largescale" display_name = "largescale foureyes" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 f52f9fe..5d710f3 100644 --- a/fish/species/freshwater_drum/freshwater_drum.tres +++ b/fish/species/freshwater_drum/freshwater_drum.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"freshwater_drum" display_name = "freshwater drum" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f5439a4..5a00da6 100644 --- a/fish/species/gar_alligator/gar_alligator.tres +++ b/fish/species/gar_alligator/gar_alligator.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"gar_alligator" display_name = "alligator gar" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 aaabbfe..ff1d808 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://art/exported/creatures/103.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/gar_longnose/gar_longnose.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 3405ee9..25f92cd 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://art/exported/creatures/106.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/gar_spotted/gar_spotted.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 3a8ffee..af135e0 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" path="res://art/exported/creatures/3401.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bdhywe0r1xcio" path="res://fish/species/goby_round/fish_goby_round.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 1d09b7c..69b28a1 100644 --- a/fish/species/goldeye/goldeye.tres +++ b/fish/species/goldeye/goldeye.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"goldeye" display_name = "goldeye" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 58c7934..a750280 100644 --- a/fish/species/goldfish/goldfish.tres +++ b/fish/species/goldfish/goldfish.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/3002.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c6uth7aob03kg" path="res://fish/species/goldfish/fish_goldfish.png" id="4_texture"] [sub_resource type="Resource" id="GoldfishAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"starter_pond", &"pond"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres b/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres index d88719c..56d0fac 100644 --- a/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres +++ b/fish/species/goldfish_bubbleeye/goldfish_bubbleeye.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://brjjnxr6n7olr" path="res://fish/species/goldfish_bubbleeye/fish_goldfish_bubbleeye.png" id="4_texture"] [sub_resource type="Resource" id="GoldfishBubbleeyeAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"starter_pond", &"pond"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/gourami_giant/gourami_giant.tres b/fish/species/gourami_giant/gourami_giant.tres index b4f8f52..5cc9eee 100644 --- a/fish/species/gourami_giant/gourami_giant.tres +++ b/fish/species/gourami_giant/gourami_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"gourami_giant" display_name = "giant gourami" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ae6321a..ee7902a 100644 --- a/fish/species/grayling_arctic/grayling_arctic.tres +++ b/fish/species/grayling_arctic/grayling_arctic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"grayling_arctic" display_name = "arctic grayling" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1733035..37db5fc 100644 --- a/fish/species/green_sunfish/green_sunfish.tres +++ b/fish/species/green_sunfish/green_sunfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"green_sunfish" display_name = "green sunfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 eb2d2bf..7bb6179 100644 --- a/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres +++ b/fish/species/grouper_atlantic_goliath/grouper_atlantic_goliath.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"grouper_atlantic_goliath" display_name = "Atlantic goliath grouper" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 9051115..7ca4c07 100644 --- a/fish/species/grouper_giant/grouper_giant.tres +++ b/fish/species/grouper_giant/grouper_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"grouper_giant" display_name = "giant grouper" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ec4b583..f8aaca6 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://ctu8xd5or7v3h" path="res://fish/species/grouper_gulf/fish_grouper_gulf.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 de4b0fd..fe6ad35 100644 --- a/fish/species/grouper_nassau/grouper_nassau.tres +++ b/fish/species/grouper_nassau/grouper_nassau.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"grouper_nassau" display_name = "Nassau grouper" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 d746cc2..55f8379 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://jjcc78tffxhb" path="res://fish/species/grouper_red/fish_grouper_red.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 5f247a8..91771a6 100644 --- a/fish/species/grunt_bluestriped/grunt_bluestriped.tres +++ b/fish/species/grunt_bluestriped/grunt_bluestriped.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"grunt_bluestriped" display_name = "bluestriped grunt" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 8e8161e..20b1a62 100644 --- a/fish/species/grunt_french/grunt_french.tres +++ b/fish/species/grunt_french/grunt_french.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"grunt_french" display_name = "French grunt" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 11245c9..d24bcb8 100644 --- a/fish/species/gulper_eel/gulper_eel.tres +++ b/fish/species/gulper_eel/gulper_eel.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"gulper_eel" display_name = "gulper eel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 9771dfb..fe4877c 100644 --- a/fish/species/guppy/guppy.tres +++ b/fish/species/guppy/guppy.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"guppy" display_name = "guppy" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ec5db7d..19c674b 100644 --- a/fish/species/haddock/haddock.tres +++ b/fish/species/haddock/haddock.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"haddock" display_name = "haddock" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 2a7293b..24ddb93 100644 --- a/fish/species/hake_pacific/hake_pacific.tres +++ b/fish/species/hake_pacific/hake_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"hake_pacific" display_name = "pacific hake" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ffb42ff..cbce843 100644 --- a/fish/species/hake_silver/hake_silver.tres +++ b/fish/species/hake_silver/hake_silver.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"hake_silver" display_name = "silver hake" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6d7fe32..88df91f 100644 --- a/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres +++ b/fish/species/halfbeak_ballyhoo/halfbeak_ballyhoo.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"halfbeak_ballyhoo" display_name = "ballyhoo" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ead724a..332c9ef 100644 --- a/fish/species/halibut_atlantic/halibut_atlantic.tres +++ b/fish/species/halibut_atlantic/halibut_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"halibut_atlantic" display_name = "atlantic halibut" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 3856b5a..5bdb5cb 100644 --- a/fish/species/halibut_pacific/halibut_pacific.tres +++ b/fish/species/halibut_pacific/halibut_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"halibut_pacific" display_name = "pacific halibut" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 2c55863..44c050a 100644 --- a/fish/species/hellbender/hellbender.tres +++ b/fish/species/hellbender/hellbender.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"hellbender" display_name = "hellbender" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 e193dcc..6cea5a6 100644 --- a/fish/species/herring_atlantic/herring_atlantic.tres +++ b/fish/species/herring_atlantic/herring_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"herring_atlantic" display_name = "atlantic herring" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 7d8e754..4b20d90 100644 --- a/fish/species/herring_pacific/herring_pacific.tres +++ b/fish/species/herring_pacific/herring_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"herring_pacific" display_name = "pacific herring" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 0e94a20..0bbd835 100644 --- a/fish/species/hogfish/hogfish.tres +++ b/fish/species/hogfish/hogfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"hogfish" display_name = "hogfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 aea8907..63be3b3 100644 --- a/fish/species/ide/ide.tres +++ b/fish/species/ide/ide.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"ide" display_name = "ide" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 4110dcc..e2e3dc8 100644 --- a/fish/species/jack_crevalle/jack_crevalle.tres +++ b/fish/species/jack_crevalle/jack_crevalle.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"jack_crevalle" display_name = "crevalle jack" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f8746fa..9abd34d 100644 --- a/fish/species/jelly_crystal/jelly_crystal.tres +++ b/fish/species/jelly_crystal/jelly_crystal.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"jelly_crystal" display_name = "crystal jelly" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c7c6fbb..4bfa8b3 100644 --- a/fish/species/jelly_lions_mane/jelly_lions_mane.tres +++ b/fish/species/jelly_lions_mane/jelly_lions_mane.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"jelly_lions_mane" display_name = "lion's mane jelly" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 378c11d..2c72f03 100644 --- a/fish/species/jelly_moon/jelly_moon.tres +++ b/fish/species/jelly_moon/jelly_moon.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"jelly_moon" display_name = "moon jelly" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 b31f4b3..9e559ec 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,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"jelly_pacific_sea_nettle" display_name = "Pacific sea nettle" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 29bed0a..a68cb4a 100644 --- a/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres +++ b/fish/species/jelly_sea_wasp/jelly_sea_wasp.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"jelly_sea_wasp" display_name = "sea wasp" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c83b877..3ba5b63 100644 --- a/fish/species/knifefish_clown/knifefish_clown.tres +++ b/fish/species/knifefish_clown/knifefish_clown.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"knifefish_clown" display_name = "clown knifefish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 58c7c29..91b465c 100644 --- a/fish/species/koi/koi.tres +++ b/fish/species/koi/koi.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"koi" display_name = "koi" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 8cdf8e6..3651f23 100644 --- a/fish/species/krill_antarctic/krill_antarctic.tres +++ b/fish/species/krill_antarctic/krill_antarctic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"krill_antarctic" display_name = "Antarctic krill" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 57c277c..57029f5 100644 --- a/fish/species/ladyfish/ladyfish.tres +++ b/fish/species/ladyfish/ladyfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"ladyfish" display_name = "ladyfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 28446b7..c0725d1 100644 --- a/fish/species/lanternfish_spotted/lanternfish_spotted.tres +++ b/fish/species/lanternfish_spotted/lanternfish_spotted.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"lanternfish_spotted" display_name = "spotted lanternfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 aa89d04..04d157a 100644 --- a/fish/species/largemouth_bass/largemouth_bass.tres +++ b/fish/species/largemouth_bass/largemouth_bass.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"largemouth_bass" display_name = "largemouth bass" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 807dc8b..92d4a81 100644 --- a/fish/species/lingcod/lingcod.tres +++ b/fish/species/lingcod/lingcod.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"lingcod" display_name = "lingcod" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 f3c3b3b..564e243 100644 --- a/fish/species/lionfish_red/lionfish_red.tres +++ b/fish/species/lionfish_red/lionfish_red.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"lionfish_red" display_name = "red lionfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 f99a1be..ba24335 100644 --- a/fish/species/loach_clown/loach_clown.tres +++ b/fish/species/loach_clown/loach_clown.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"loach_clown" display_name = "clown loach" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 cc7afef..fa2ae34 100644 --- a/fish/species/loach_weather/loach_weather.tres +++ b/fish/species/loach_weather/loach_weather.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"loach_weather" display_name = "weather loach" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 b70b809..b89e992 100644 --- a/fish/species/lobster_american/lobster_american.tres +++ b/fish/species/lobster_american/lobster_american.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"lobster_american" display_name = "American lobster" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 cdd828c..eb9fdde 100644 --- a/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres +++ b/fish/species/lobster_caribbean_spiny/lobster_caribbean_spiny.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"lobster_caribbean_spiny" display_name = "Caribbean spiny lobster" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f049cff..6ae8db6 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://art/exported/creatures/107.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/lungfish_west_african/lungfish_west_african.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 ba6e0d8..f90a01b 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" path="res://art/exported/creatures/701.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://breyc8fqq8lq3" path="res://fish/species/mackerel_atlantic/fish_mackerel_atlantic.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 25cd4c5..598f01b 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://g8qanq47g1b8" path="res://fish/species/mackerel_cero/fish_mackerel_cero.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 891abe4..7eeefb2 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" path="res://art/exported/creatures/704.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://b7q2t02oo2bcp" path="res://fish/species/mackerel_chub/fish_mackerel_chub.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 9c00470..a167660 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://b2fag3xemyx5s" path="res://fish/species/mackerel_king/fish_mackerel_king.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 1f0bcf4..3dbc07c 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cy2hmpenpkee2" path="res://fish/species/mackerel_spanish/fish_mackerel_spanish.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 d0a5545..3c50b22 100644 --- a/fish/species/madtom_tadpole/madtom_tadpole.tres +++ b/fish/species/madtom_tadpole/madtom_tadpole.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"madtom_tadpole" display_name = "tadpole madtom" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 691a52a..1d688a3 100644 --- a/fish/species/mahi_mahi/mahi_mahi.tres +++ b/fish/species/mahi_mahi/mahi_mahi.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"mahi_mahi" display_name = "mahi-mahi" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1459de1..dd2bd95 100644 --- a/fish/species/mahseer_golden/mahseer_golden.tres +++ b/fish/species/mahseer_golden/mahseer_golden.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"mahseer_golden" display_name = "golden mahseer" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7154157..8c47efe 100644 --- a/fish/species/manatee_west_indian/manatee_west_indian.tres +++ b/fish/species/manatee_west_indian/manatee_west_indian.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"manatee_west_indian" display_name = "West Indian manatee" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 13eef47..ad96bd2 100644 --- a/fish/species/manta_ray_giant/manta_ray_giant.tres +++ b/fish/species/manta_ray_giant/manta_ray_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"manta_ray_giant" display_name = "giant manta ray" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 26f506a..3c2f6f4 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://dkdctr2o52vrb" path="res://fish/species/marlin_black/fish_marlin_black.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 c8ee35d..92d76d7 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://de35fjoytbomu" path="res://fish/species/marlin_blue/fish_marlin_blue.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 a69d01d..1039aa7 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bdvy4ujx2htcy" path="res://fish/species/marlin_white/fish_marlin_white.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 53b4d6e..e19f95b 100644 --- a/fish/species/menhaden_atlantic/menhaden_atlantic.tres +++ b/fish/species/menhaden_atlantic/menhaden_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"menhaden_atlantic" display_name = "atlantic menhaden" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 9c8362a..b7cbf82 100644 --- a/fish/species/milkfish/milkfish.tres +++ b/fish/species/milkfish/milkfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"milkfish" display_name = "milkfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c4a3aff..630b8c5 100644 --- a/fish/species/minnow_fathead/minnow_fathead.tres +++ b/fish/species/minnow_fathead/minnow_fathead.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"minnow_fathead" display_name = "fathead minnow" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 d485570..82319f8 100644 --- a/fish/species/monkfish/monkfish.tres +++ b/fish/species/monkfish/monkfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"monkfish" display_name = "monkfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 3dff8a1..c04be25 100644 --- a/fish/species/mooneye/mooneye.tres +++ b/fish/species/mooneye/mooneye.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"mooneye" display_name = "mooneye" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e0d49ae..48258b5 100644 --- a/fish/species/moray_green/moray_green.tres +++ b/fish/species/moray_green/moray_green.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"moray_green" display_name = "green moray" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7df958a..477183a 100644 --- a/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres +++ b/fish/species/mudskipper_atlantic/mudskipper_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"mudskipper_atlantic" display_name = "atlantic mudskipper" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 67a35fa..ed17234 100644 --- a/fish/species/mullet_red/mullet_red.tres +++ b/fish/species/mullet_red/mullet_red.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"mullet_red" display_name = "red mullet" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 a285ee7..2affb1b 100644 --- a/fish/species/mullet_striped/mullet_striped.tres +++ b/fish/species/mullet_striped/mullet_striped.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"mullet_striped" display_name = "striped mullet" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e747d07..6bb8997 100644 --- a/fish/species/muskellunge/muskellunge.tres +++ b/fish/species/muskellunge/muskellunge.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"muskellunge" display_name = "muskellunge" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 562f16b..b38815d 100644 --- a/fish/species/nautilus_chambered/nautilus_chambered.tres +++ b/fish/species/nautilus_chambered/nautilus_chambered.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"nautilus_chambered" display_name = "chambered nautilus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5d97670..4eda89e 100644 --- a/fish/species/needlefish_hound/needlefish_hound.tres +++ b/fish/species/needlefish_hound/needlefish_hound.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"needlefish_hound" display_name = "houndfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 2bcd4ab..3687f0f 100644 --- a/fish/species/oarfish_giant/oarfish_giant.tres +++ b/fish/species/oarfish_giant/oarfish_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"oarfish_giant" display_name = "giant oarfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 6b0cdcc..e02db9a 100644 --- a/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres +++ b/fish/species/ocean_perch_pacific/ocean_perch_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"ocean_perch_pacific" display_name = "Pacific ocean perch" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 e379010..66278ee 100644 --- a/fish/species/octopus_common/octopus_common.tres +++ b/fish/species/octopus_common/octopus_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"octopus_common" display_name = "common octopus" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 4384f38..6251fe8 100644 --- a/fish/species/octopus_day/octopus_day.tres +++ b/fish/species/octopus_day/octopus_day.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"octopus_day" display_name = "day octopus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1091088..438eb60 100644 --- a/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres +++ b/fish/species/octopus_giant_pacific/octopus_giant_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"octopus_giant_pacific" display_name = "giant Pacific octopus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f2a21d9..9b538f2 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,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"octopus_greater_blue_ringed" display_name = "greater blue-ringed octopus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 f9b202a..a7d3fd1 100644 --- a/fish/species/opah/opah.tres +++ b/fish/species/opah/opah.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"opah" display_name = "opah" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 8e780cb..bf44caa 100644 --- a/fish/species/oscar/oscar.tres +++ b/fish/species/oscar/oscar.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"oscar" display_name = "oscar" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 776218d..74a99d7 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,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"oyster_black_lip_pearl" display_name = "black-lip pearl oyster" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 498730b..27d1696 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://art/exported/creatures/104.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/paddlefish/paddlefish.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 c0b0dc2..06df938 100644 --- a/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres +++ b/fish/species/parrotfish_rainbow/parrotfish_rainbow.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"parrotfish_rainbow" display_name = "rainbow parrotfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 50962f4..3cc5389 100644 --- a/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres +++ b/fish/species/parrotfish_stoplight/parrotfish_stoplight.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"parrotfish_stoplight" display_name = "stoplight parrotfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7cfbb5d..eaae159 100644 --- a/fish/species/peacock_bass/peacock_bass.tres +++ b/fish/species/peacock_bass/peacock_bass.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"peacock_bass" display_name = "peacock bass" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 f58283c..f9c0d95 100644 --- a/fish/species/permit/permit.tres +++ b/fish/species/permit/permit.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"permit" display_name = "permit" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 db02b7f..eec103a 100644 --- a/fish/species/pickerel_chain/pickerel_chain.tres +++ b/fish/species/pickerel_chain/pickerel_chain.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"pickerel_chain" display_name = "chain pickerel" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 9ef8952..1a25625 100644 --- a/fish/species/pickerel_grass/pickerel_grass.tres +++ b/fish/species/pickerel_grass/pickerel_grass.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pickerel_grass" display_name = "grass pickerel" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 05f1ed7..b7594d1 100644 --- a/fish/species/pike_northern/pike_northern.tres +++ b/fish/species/pike_northern/pike_northern.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pike_northern" display_name = "northern pike" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 0436a8a..3bc3407 100644 --- a/fish/species/pipefish_bay/pipefish_bay.tres +++ b/fish/species/pipefish_bay/pipefish_bay.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pipefish_bay" display_name = "bay pipefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ebc9fab..ea52350 100644 --- a/fish/species/piranha_red_bellied/piranha_red_bellied.tres +++ b/fish/species/piranha_red_bellied/piranha_red_bellied.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"piranha_red_bellied" display_name = "red-bellied piranha" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e66f162..17ea57f 100644 --- a/fish/species/plaice_european/plaice_european.tres +++ b/fish/species/plaice_european/plaice_european.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"plaice_european" display_name = "European plaice" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e9add13..aebdcf4 100644 --- a/fish/species/pollock_alaska/pollock_alaska.tres +++ b/fish/species/pollock_alaska/pollock_alaska.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"pollock_alaska" display_name = "Alaska pollock" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 494dd23..9e3c322 100644 --- a/fish/species/pollock_atlantic/pollock_atlantic.tres +++ b/fish/species/pollock_atlantic/pollock_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"pollock_atlantic" display_name = "Atlantic pollock" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 a3c9e54..517e5d5 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://ch3y6xdo22j1o" path="res://fish/species/pomfret_black/fish_pomfret_black.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 e3f236c..313c0bf 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cijr0gseldncc" path="res://fish/species/pomfret_chinese/fish_pomfret_chinese.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 162a2e7..bcd2469 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://7rjv7k60bv7q" path="res://fish/species/pomfret_golden/fish_pomfret_golden.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 8652e63..c4114db 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c3fr0x4e1nfe0" path="res://fish/species/pomfret_white/fish_pomfret_white.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 598da61..d0f6559 100644 --- a/fish/species/pompano_african/pompano_african.tres +++ b/fish/species/pompano_african/pompano_african.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"pompano_african" display_name = "African pompano" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 b21035c..7ef5dd2 100644 --- a/fish/species/pompano_florida/pompano_florida.tres +++ b/fish/species/pompano_florida/pompano_florida.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"pompano_florida" display_name = "Florida pompano" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 93d5dca..1e03d89 100644 --- a/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres +++ b/fish/species/porcupinefish_spotted/porcupinefish_spotted.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"porcupinefish_spotted" display_name = "spotted porcupinefish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 ad96831..ebf9b50 100644 --- a/fish/species/porgy_scup/porgy_scup.tres +++ b/fish/species/porgy_scup/porgy_scup.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"porgy_scup" display_name = "scup" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 754cf4d..e75ee2d 100644 --- a/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres +++ b/fish/species/pufferfish_guineafowl/pufferfish_guineafowl.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pufferfish_guineafowl" display_name = "guineafowl puffer" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7a4f090..d0ddcd3 100644 --- a/fish/species/pumpkinseed/pumpkinseed.tres +++ b/fish/species/pumpkinseed/pumpkinseed.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"pumpkinseed" display_name = "pumpkinseed" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 d6ee3be..145d0de 100644 --- a/fish/species/queenfish_talang/queenfish_talang.tres +++ b/fish/species/queenfish_talang/queenfish_talang.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"queenfish_talang" display_name = "talang queenfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 2ca6399..6f59e17 100644 --- a/fish/species/quillback/quillback.tres +++ b/fish/species/quillback/quillback.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"quillback" display_name = "quillback" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 393a002..7cbaecc 100644 --- a/fish/species/red_drum/red_drum.tres +++ b/fish/species/red_drum/red_drum.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"red_drum" display_name = "red drum" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6078d20..44a3729 100644 --- a/fish/species/redear_sunfish/redear_sunfish.tres +++ b/fish/species/redear_sunfish/redear_sunfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"redear_sunfish" display_name = "redear sunfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 5ba103b..44ae38f 100644 --- a/fish/species/redhorse_golden/redhorse_golden.tres +++ b/fish/species/redhorse_golden/redhorse_golden.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"redhorse_golden" display_name = "golden redhorse" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c12d380..ce38873 100644 --- a/fish/species/roach_common/roach_common.tres +++ b/fish/species/roach_common/roach_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"roach_common" display_name = "common roach" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 c37b427..21cd186 100644 --- a/fish/species/rockfish_black/rockfish_black.tres +++ b/fish/species/rockfish_black/rockfish_black.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"rockfish_black" display_name = "black rockfish" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 1e65d72..e20e655 100644 --- a/fish/species/rockfish_canary/rockfish_canary.tres +++ b/fish/species/rockfish_canary/rockfish_canary.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"rockfish_canary" display_name = "canary rockfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 89aab8e..79e8d75 100644 --- a/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres +++ b/fish/species/rockfish_yelloweye/rockfish_yelloweye.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"rockfish_yelloweye" display_name = "yelloweye rockfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 388dd70..19c009c 100644 --- a/fish/species/roosterfish/roosterfish.tres +++ b/fish/species/roosterfish/roosterfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"roosterfish" display_name = "roosterfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 5de8d57..6ef01aa 100644 --- a/fish/species/rudd/rudd.tres +++ b/fish/species/rudd/rudd.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"rudd" display_name = "rudd" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e481e52..28daaf3 100644 --- a/fish/species/sablefish/sablefish.tres +++ b/fish/species/sablefish/sablefish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sablefish" display_name = "sablefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 98e958d..7826b0b 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://8rlcnfqx8or0" path="res://fish/species/sailfish/fish_sailfish.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 1c77325..802c177 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" path="res://art/exported/creatures/4401.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://ddbclfu5wtd5r" path="res://fish/species/salmon_atlantic/fish_salmon_atlantic.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 8fcabd0..a41a410 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://dqjkmd6l1a2i4" path="res://fish/species/salmon_chum/fish_salmon_chum.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 b1160b1..89d1ea5 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c4c4e43lbr88c" path="res://fish/species/salmon_coho/fish_salmon_coho.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 bdfa32e..94e2f32 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bk27bsdrtlqap" path="res://fish/species/salmon_pink/fish_salmon_pink.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 7bd4b1a..dd440e1 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cmokm3sra4ai8" path="res://fish/species/salmon_sockeye/fish_salmon_sockeye.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 f780203..3d1b523 100644 --- a/fish/species/sand_dollar/sand_dollar.tres +++ b/fish/species/sand_dollar/sand_dollar.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"sand_dollar" display_name = "sand dollar" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 18f16be..7080235 100644 --- a/fish/species/sand_lance_american/sand_lance_american.tres +++ b/fish/species/sand_lance_american/sand_lance_american.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sand_lance_american" display_name = "American sand lance" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 54008f8..87a64c2 100644 --- a/fish/species/sardine_european/sardine_european.tres +++ b/fish/species/sardine_european/sardine_european.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sardine_european" display_name = "European pilchard" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 bea772d..41c98a0 100644 --- a/fish/species/sardine_pacific/sardine_pacific.tres +++ b/fish/species/sardine_pacific/sardine_pacific.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sardine_pacific" display_name = "Pacific sardine" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 3248bcb..1ccd2b8 100644 --- a/fish/species/sauger/sauger.tres +++ b/fish/species/sauger/sauger.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://8k7qkk4juciy" path="res://fish/species/sauger/fish_sauger.png" id="4_texture"] [sub_resource type="Resource" id="SaugerAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/saugeye/saugeye.tres b/fish/species/saugeye/saugeye.tres index d6f09cf..62baf45 100644 --- a/fish/species/saugeye/saugeye.tres +++ b/fish/species/saugeye/saugeye.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://lom25y0eqcw3" path="res://fish/species/saugeye/fish_saugeye.png" id="4_texture"] [sub_resource type="Resource" id="SaugeyeAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"lake"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/sawfish_largetooth/sawfish_largetooth.tres b/fish/species/sawfish_largetooth/sawfish_largetooth.tres index ac4680b..ce5602d 100644 --- a/fish/species/sawfish_largetooth/sawfish_largetooth.tres +++ b/fish/species/sawfish_largetooth/sawfish_largetooth.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"sawfish_largetooth" display_name = "largetooth sawfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 baf9046..4848d54 100644 --- a/fish/species/scorpionfish_red/scorpionfish_red.tres +++ b/fish/species/scorpionfish_red/scorpionfish_red.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"scorpionfish_red" display_name = "red scorpionfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7a5b567..54581d8 100644 --- a/fish/species/sea_bass_black/sea_bass_black.tres +++ b/fish/species/sea_bass_black/sea_bass_black.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sea_bass_black" display_name = "black sea bass" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 dd9afac..15cf997 100644 --- a/fish/species/sea_bass_chilean/sea_bass_chilean.tres +++ b/fish/species/sea_bass_chilean/sea_bass_chilean.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sea_bass_chilean" display_name = "Patagonian toothfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 bc1ca41..7118382 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,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"sea_cucumber_giant_california" display_name = "giant California sea cucumber" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c5f4bfc..7cf9ebe 100644 --- a/fish/species/sea_otter/sea_otter.tres +++ b/fish/species/sea_otter/sea_otter.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sea_otter" display_name = "sea otter" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 5e73beb..37ecb8d 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,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"sea_star_crown_of_thorns" display_name = "crown-of-thorns sea star" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 6bf1dc2..c1f60eb 100644 --- a/fish/species/sea_star_sunflower/sea_star_sunflower.tres +++ b/fish/species/sea_star_sunflower/sea_star_sunflower.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"sea_star_sunflower" display_name = "sunflower sea star" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 1481d73..0033d9c 100644 --- a/fish/species/seadragon_leafy/seadragon_leafy.tres +++ b/fish/species/seadragon_leafy/seadragon_leafy.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"seadragon_leafy" display_name = "leafy seadragon" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 bc1768b..1b99790 100644 --- a/fish/species/seadragon_weedy/seadragon_weedy.tres +++ b/fish/species/seadragon_weedy/seadragon_weedy.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"seadragon_weedy" display_name = "weedy seadragon" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 0121fab..1f533a0 100644 --- a/fish/species/seahorse_lined/seahorse_lined.tres +++ b/fish/species/seahorse_lined/seahorse_lined.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"seahorse_lined" display_name = "lined seahorse" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5689a14..bdc0e46 100644 --- a/fish/species/seal_harbor/seal_harbor.tres +++ b/fish/species/seal_harbor/seal_harbor.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"seal_harbor" display_name = "harbor seal" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 e7fc4e6..b5d4ca9 100644 --- a/fish/species/shark_blacktip/shark_blacktip.tres +++ b/fish/species/shark_blacktip/shark_blacktip.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shark_blacktip" display_name = "blacktip shark" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 a9b612e..a2edcf0 100644 --- a/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres +++ b/fish/species/shark_great_hammerhead/shark_great_hammerhead.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shark_great_hammerhead" display_name = "great hammerhead shark" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 afd1cd0..80688cd 100644 --- a/fish/species/shark_great_white/shark_great_white.tres +++ b/fish/species/shark_great_white/shark_great_white.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shark_great_white" display_name = "great white shark" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 72e2577..a7a9bcf 100644 --- a/fish/species/shark_tiger/shark_tiger.tres +++ b/fish/species/shark_tiger/shark_tiger.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shark_tiger" display_name = "tiger shark" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 81739db..7c78314 100644 --- a/fish/species/shark_whale/shark_whale.tres +++ b/fish/species/shark_whale/shark_whale.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shark_whale" display_name = "whale shark" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 d4b8cfa..d323533 100644 --- a/fish/species/sheepshead/sheepshead.tres +++ b/fish/species/sheepshead/sheepshead.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"sheepshead" display_name = "sheepshead" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 5a8a2f3..303a4b3 100644 --- a/fish/species/shiner_common/shiner_common.tres +++ b/fish/species/shiner_common/shiner_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shiner_common" display_name = "common shiner" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 8a39e5c..5d654a4 100644 --- a/fish/species/shiner_emerald/shiner_emerald.tres +++ b/fish/species/shiner_emerald/shiner_emerald.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -12,7 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"shiner_emerald" display_name = "emerald shiner" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 af57441..8eb64bb 100644 --- a/fish/species/shiner_golden/shiner_golden.tres +++ b/fish/species/shiner_golden/shiner_golden.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"shiner_golden" display_name = "golden shiner" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 daf7662..d7be4a6 100644 --- a/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres +++ b/fish/species/shrimp_peacock_mantis/shrimp_peacock_mantis.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"shrimp_peacock_mantis" display_name = "peacock mantis shrimp" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 fdd6730..fe9de65 100644 --- a/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres +++ b/fish/species/shrimp_skunk_cleaner/shrimp_skunk_cleaner.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"shrimp_skunk_cleaner" display_name = "skunk cleaner shrimp" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5ccb967..b9c8a5d 100644 --- a/fish/species/skate_barndoor/skate_barndoor.tres +++ b/fish/species/skate_barndoor/skate_barndoor.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"skate_barndoor" display_name = "barndoor skate" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 d840f32..e198b2a 100644 --- a/fish/species/smallmouth_bass/smallmouth_bass.tres +++ b/fish/species/smallmouth_bass/smallmouth_bass.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"smallmouth_bass" display_name = "smallmouth bass" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 f3be455..923d467 100644 --- a/fish/species/smelt_eulachon/smelt_eulachon.tres +++ b/fish/species/smelt_eulachon/smelt_eulachon.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"smelt_eulachon" display_name = "eulachon" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 34691f9..6275187 100644 --- a/fish/species/smelt_rainbow/smelt_rainbow.tres +++ b/fish/species/smelt_rainbow/smelt_rainbow.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"smelt_rainbow" display_name = "rainbow smelt" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 069d723..8efb4d3 100644 --- a/fish/species/snakehead_giant/snakehead_giant.tres +++ b/fish/species/snakehead_giant/snakehead_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"snakehead_giant" display_name = "giant snakehead" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 d91444f..441107c 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" path="res://art/exported/creatures/6001.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://d3d8s30bxq4tp" path="res://fish/species/snapper_lane/fish_snapper_lane.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 9a0ede5..8767a3f 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://v34sdv1v7c2x" path="res://fish/species/snapper_mangrove/fish_snapper_mangrove.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 7c5aee9..4f343c3 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cawvpo8aysw5i" path="res://fish/species/snapper_mutton/fish_snapper_mutton.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 247edc0..7c26926 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://ei5scljuqklk" path="res://fish/species/snapper_red/fish_snapper_red.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 5b84e99..676e3f4 100644 --- a/fish/species/snook_common/snook_common.tres +++ b/fish/species/snook_common/snook_common.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"snook_common" display_name = "common snook" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 2b522a0..6083d96 100644 --- a/fish/species/sole_dover/sole_dover.tres +++ b/fish/species/sole_dover/sole_dover.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sole_dover" display_name = "Dover sole" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 82f4876..61daa00 100644 --- a/fish/species/sprat_european/sprat_european.tres +++ b/fish/species/sprat_european/sprat_european.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sprat_european" display_name = "European sprat" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 68f8993..d6b1201 100644 --- a/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres +++ b/fish/species/squid_bigfin_reef/squid_bigfin_reef.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"squid_bigfin_reef" display_name = "bigfin reef squid" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 4e38896..115ab10 100644 --- a/fish/species/squid_colossal/squid_colossal.tres +++ b/fish/species/squid_colossal/squid_colossal.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"squid_colossal" display_name = "colossal squid" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 4f76512..b95efe9 100644 --- a/fish/species/squid_giant/squid_giant.tres +++ b/fish/species/squid_giant/squid_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"squid_giant" display_name = "giant squid" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 14abcfb..e9a7d2f 100644 --- a/fish/species/squid_humboldt/squid_humboldt.tres +++ b/fish/species/squid_humboldt/squid_humboldt.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"squid_humboldt" display_name = "Humboldt squid" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 10bf3dc..fce4905 100644 --- a/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres +++ b/fish/species/stingray_ocellate_river/stingray_ocellate_river.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"stingray_ocellate_river" display_name = "ocellate river stingray" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c0b03f0..947cf4d 100644 --- a/fish/species/stingray_southern/stingray_southern.tres +++ b/fish/species/stingray_southern/stingray_southern.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"stingray_southern" display_name = "southern stingray" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 eef7789..e4e69a6 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://art/exported/creatures/102.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/sturgeon_lake/sturgeon_lake.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 9f02593..4e078d0 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://art/exported/creatures/105.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/sturgeon_shovelnose/sturgeon_shovelnose.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 961411d..91cab98 100644 --- a/fish/species/sturgeon_white/sturgeon_white.tres +++ b/fish/species/sturgeon_white/sturgeon_white.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"sturgeon_white" display_name = "white sturgeon" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ff48770..25e09c2 100644 --- a/fish/species/sucker_white/sucker_white.tres +++ b/fish/species/sucker_white/sucker_white.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"sucker_white" display_name = "white sucker" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 5efd181..f0ced78 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://art/exported/creatures/5001.png" id="4_texture"] +[ext_resource type="Texture2D" path="res://fish/species/sunfish/fish_sunfish.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 d0a903e..3708547 100644 --- a/fish/species/surgeonfish_blue/surgeonfish_blue.tres +++ b/fish/species/surgeonfish_blue/surgeonfish_blue.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"surgeonfish_blue" display_name = "blue tang" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 24319f1..ea765a3 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cs1qmm4galac4" path="res://fish/species/swordfish/fish_swordfish.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 4bfd4a1..fd8d92f 100644 --- a/fish/species/tambaqui/tambaqui.tres +++ b/fish/species/tambaqui/tambaqui.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"tambaqui" display_name = "tambaqui" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 501f2a3..92ee455 100644 --- a/fish/species/tang_yellow/tang_yellow.tres +++ b/fish/species/tang_yellow/tang_yellow.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"tang_yellow" display_name = "yellow tang" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 0b8c6aa..1aeda05 100644 --- a/fish/species/tarpon_atlantic/tarpon_atlantic.tres +++ b/fish/species/tarpon_atlantic/tarpon_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"tarpon_atlantic" display_name = "atlantic tarpon" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7028401..57bbe3c 100644 --- a/fish/species/tautog/tautog.tres +++ b/fish/species/tautog/tautog.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tautog" display_name = "tautog" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 7ffe273..377db0f 100644 --- a/fish/species/tench/tench.tres +++ b/fish/species/tench/tench.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"tench" display_name = "tench" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 da42e36..265cb39 100644 --- a/fish/species/tetra_neon/tetra_neon.tres +++ b/fish/species/tetra_neon/tetra_neon.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"tetra_neon" display_name = "neon tetra" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 f34d449..89e2525 100644 --- a/fish/species/tigerfish_goliath/tigerfish_goliath.tres +++ b/fish/species/tigerfish_goliath/tigerfish_goliath.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tigerfish_goliath" display_name = "goliath tigerfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 d7a2eed..5d4ccac 100644 --- a/fish/species/tilapia_nile/tilapia_nile.tres +++ b/fish/species/tilapia_nile/tilapia_nile.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilapia_nile" display_name = "Nile tilapia" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 aff98b6..13ea387 100644 --- a/fish/species/tilefish_blueline/tilefish_blueline.tres +++ b/fish/species/tilefish_blueline/tilefish_blueline.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilefish_blueline" display_name = "blueline tilefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 ed203c8..1875b08 100644 --- a/fish/species/tilefish_golden/tilefish_golden.tres +++ b/fish/species/tilefish_golden/tilefish_golden.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"tilefish_golden" display_name = "golden tilefish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 3cf8dee..46971e6 100644 --- a/fish/species/trevally_bluefin/trevally_bluefin.tres +++ b/fish/species/trevally_bluefin/trevally_bluefin.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"trevally_bluefin" display_name = "bluefin trevally" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 62ee42b..43453d5 100644 --- a/fish/species/trevally_giant/trevally_giant.tres +++ b/fish/species/trevally_giant/trevally_giant.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"trevally_giant" display_name = "giant trevally" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 0b205a2..90f96b8 100644 --- a/fish/species/triggerfish_gray/triggerfish_gray.tres +++ b/fish/species/triggerfish_gray/triggerfish_gray.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"triggerfish_gray" display_name = "gray triggerfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 e747f25..d57ede3 100644 --- a/fish/species/triggerfish_queen/triggerfish_queen.tres +++ b/fish/species/triggerfish_queen/triggerfish_queen.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"triggerfish_queen" display_name = "queen triggerfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7bb151b..552e15b 100644 --- a/fish/species/tripletail/tripletail.tres +++ b/fish/species/tripletail/tripletail.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"tripletail" display_name = "tripletail" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 6beb1ba..01a28d5 100644 --- a/fish/species/trout_brown/trout_brown.tres +++ b/fish/species/trout_brown/trout_brown.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_day = false script = ExtResource("1_fish_data") id = &"trout_brown" display_name = "brown trout" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6ea9bff..b2a958d 100644 --- a/fish/species/trout_cutthroat/trout_cutthroat.tres +++ b/fish/species/trout_cutthroat/trout_cutthroat.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://nowggrl8wmr" path="res://fish/species/trout_cutthroat/fish_trout_cutthroat.png" id="4_texture"] [sub_resource type="Resource" id="TroutCutthroatAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/trout_golden/trout_golden.tres b/fish/species/trout_golden/trout_golden.tres index bb6732b..21a16ef 100644 --- a/fish/species/trout_golden/trout_golden.tres +++ b/fish/species/trout_golden/trout_golden.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://b64w3kwf3wins" path="res://fish/species/trout_golden/fish_trout_golden.png" id="4_texture"] [sub_resource type="Resource" id="TroutGoldenAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"lake"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/trout_rainbow/trout_rainbow.tres b/fish/species/trout_rainbow/trout_rainbow.tres index 69d40bd..227bb3a 100644 --- a/fish/species/trout_rainbow/trout_rainbow.tres +++ b/fish/species/trout_rainbow/trout_rainbow.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://mfxehkoxea21" path="res://fish/species/trout_rainbow/fish_trout_rainbow.png" id="4_texture"] [sub_resource type="Resource" id="TroutRainbowAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/trout_steelhead/trout_steelhead.tres b/fish/species/trout_steelhead/trout_steelhead.tres index ed052d9..11e19a7 100644 --- a/fish/species/trout_steelhead/trout_steelhead.tres +++ b/fish/species/trout_steelhead/trout_steelhead.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://cabbpc55sf2gw" path="res://fish/species/trout_steelhead/fish_trout_steelhead.png" id="4_texture"] [sub_resource type="Resource" id="TroutSteelheadAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"river"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres b/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres index 3ff3cc3..eb58032 100644 --- a/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres +++ b/fish/species/trumpetfish_atlantic/trumpetfish_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"trumpetfish_atlantic" display_name = "atlantic trumpetfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 c8cdfdf..69ad32d 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bxebn81i552fg" path="res://fish/species/tuna_albacore/fish_tuna_albacore.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 1c31d1a..6794a75 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bypnhqmkhnm2c" path="res://fish/species/tuna_bigeye/fish_tuna_bigeye.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 4bf5033..7d6f810 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://dg7nafydp4flx" path="res://fish/species/tuna_bluefin/fish_tuna_bluefin.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 cc1988e..cb16b70 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://vvtr81d2aojs" path="res://fish/species/tuna_skipjack/fish_tuna_skipjack.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 665228e..90f9017 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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://bwpdgagaysdsf" path="res://fish/species/tuna_yellowfin/fish_tuna_yellowfin.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 c3ab7bd..9e3e6f3 100644 --- a/fish/species/turbot/turbot.tres +++ b/fish/species/turbot/turbot.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"turbot" display_name = "turbot" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 b1e8e71..b473dad 100644 --- a/fish/species/turtle_green/turtle_green.tres +++ b/fish/species/turtle_green/turtle_green.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"turtle_green" display_name = "green sea turtle" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5b5a5c8..a13910f 100644 --- a/fish/species/turtle_hawksbill/turtle_hawksbill.tres +++ b/fish/species/turtle_hawksbill/turtle_hawksbill.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"turtle_hawksbill" display_name = "hawksbill sea turtle" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 3a8acf3..a19b310 100644 --- a/fish/species/turtle_leatherback/turtle_leatherback.tres +++ b/fish/species/turtle_leatherback/turtle_leatherback.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"turtle_leatherback" display_name = "leatherback sea turtle" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 e4bd898..0317591 100644 --- a/fish/species/turtle_loggerhead/turtle_loggerhead.tres +++ b/fish/species/turtle_loggerhead/turtle_loggerhead.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"turtle_loggerhead" display_name = "loggerhead sea turtle" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 6546627..884055b 100644 --- a/fish/species/urchin_purple/urchin_purple.tres +++ b/fish/species/urchin_purple/urchin_purple.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"urchin_purple" display_name = "purple sea urchin" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 9e045de..cc8488d 100644 --- a/fish/species/wahoo/wahoo.tres +++ b/fish/species/wahoo/wahoo.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"wahoo" display_name = "wahoo" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 277b3d8..e4f483d 100644 --- a/fish/species/walleye/walleye.tres +++ b/fish/species/walleye/walleye.tres @@ -3,11 +3,11 @@ [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" path="res://art/exported/creatures/fish_placeholder.png" id="4_texture"] +[ext_resource type="Texture2D" uid="uid://c10j6jv6fv32r" path="res://fish/species/walleye/fish_walleye.png" id="4_texture"] [sub_resource type="Resource" id="WalleyeAvailability"] script = ExtResource("3_availability_script") -allowed_location_tags = Array[StringName]([&"lake"]) +allowed_location_tags = Array[StringName]([&"starter_pond"]) [resource] script = ExtResource("1_fish_data") diff --git a/fish/species/walrus/walrus.tres b/fish/species/walrus/walrus.tres index ff74bf6..180fe27 100644 --- a/fish/species/walrus/walrus.tres +++ b/fish/species/walrus/walrus.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"walrus" display_name = "walrus" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 c58e8c5..d93c506 100644 --- a/fish/species/warmouth/warmouth.tres +++ b/fish/species/warmouth/warmouth.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"warmouth" display_name = "warmouth" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 83a5f11..6f94da3 100644 --- a/fish/species/weakfish/weakfish.tres +++ b/fish/species/weakfish/weakfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"weakfish" display_name = "weakfish" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 415008e..50f2c53 100644 --- a/fish/species/whale_blue/whale_blue.tres +++ b/fish/species/whale_blue/whale_blue.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"whale_blue" display_name = "blue whale" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7ad7161..7c99516 100644 --- a/fish/species/whale_humpback/whale_humpback.tres +++ b/fish/species/whale_humpback/whale_humpback.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"whale_humpback" display_name = "humpback whale" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 7952089..a1197cd 100644 --- a/fish/species/whale_killer/whale_killer.tres +++ b/fish/species/whale_killer/whale_killer.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_rain = true script = ExtResource("1_fish_data") id = &"whale_killer" display_name = "killer whale" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 eef3aed..019088b 100644 --- a/fish/species/whale_sperm/whale_sperm.tres +++ b/fish/species/whale_sperm/whale_sperm.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"whale_sperm" display_name = "sperm whale" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 5543307..2b45610 100644 --- a/fish/species/white_perch/white_perch.tres +++ b/fish/species/white_perch/white_perch.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"white_perch" display_name = "white perch" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 51246f5..f50e27b 100644 --- a/fish/species/whitefish_lake/whitefish_lake.tres +++ b/fish/species/whitefish_lake/whitefish_lake.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +11,7 @@ script = ExtResource("3_availability") script = ExtResource("1_fish_data") id = &"whitefish_lake" display_name = "lake whitefish" -active = true +active = false 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." @@ -27,4 +26,3 @@ 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 ca67a92..a4c29c1 100644 --- a/fish/species/wolffish_atlantic/wolffish_atlantic.tres +++ b/fish/species/wolffish_atlantic/wolffish_atlantic.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ forbid_rain = true script = ExtResource("1_fish_data") id = &"wolffish_atlantic" display_name = "atlantic wolffish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 36b4575..aa498e6 100644 --- a/fish/species/wolffish_spotted/wolffish_spotted.tres +++ b/fish/species/wolffish_spotted/wolffish_spotted.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"wolffish_spotted" display_name = "spotted wolffish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 a1beebc..b25f40d 100644 --- a/fish/species/wrasse_ballan/wrasse_ballan.tres +++ b/fish/species/wrasse_ballan/wrasse_ballan.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"wrasse_ballan" display_name = "ballan wrasse" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 85db0fc..3f21ff7 100644 --- a/fish/species/wrasse_cleaner/wrasse_cleaner.tres +++ b/fish/species/wrasse_cleaner/wrasse_cleaner.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -14,7 +13,7 @@ forbid_fog = true script = ExtResource("1_fish_data") id = &"wrasse_cleaner" display_name = "cleaner wrasse" -active = true +active = false 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." @@ -29,4 +28,3 @@ 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 345d274..0c258a9 100644 --- a/fish/species/wreckfish/wreckfish.tres +++ b/fish/species/wreckfish/wreckfish.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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 +12,7 @@ require_fog = true script = ExtResource("1_fish_data") id = &"wreckfish" display_name = "wreckfish" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 3e0501f..311280e 100644 --- a/fish/species/yellow_perch/yellow_perch.tres +++ b/fish/species/yellow_perch/yellow_perch.tres @@ -1,9 +1,8 @@ -[gd_resource type="Resource" script_class="FishData" load_steps=5 format=3] +[gd_resource type="Resource" script_class="FishData" load_steps=4 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") @@ -13,7 +12,7 @@ allow_night = false script = ExtResource("1_fish_data") id = &"yellow_perch" display_name = "yellow perch" -active = true +active = false 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." @@ -28,4 +27,3 @@ 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 12cc431..7e75370 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.5 +const CHASE_START_DELAY: float = 1.0 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 fdfad53..e2fdef0 100644 --- a/fishing/fishing_spot.gd +++ b/fishing/fishing_spot.gd @@ -41,6 +41,8 @@ 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" @@ -66,7 +68,6 @@ 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 { @@ -110,9 +111,7 @@ const BITE_QUICK_PROBABILITY: float = 0.30 const BITE_TYPICAL_PROBABILITY: float = 0.65 const BITE_LONG_PROBABILITY: float = 0.04 const NETWORK_INPUT_RESEND_INTERVAL_SECONDS: float = 0.1 -const ALTERNATE_REEL_ACTION: StringName = &"reel_alternate" @export_range(0.1, 10.0, 0.1) var cooldown_duration: float = 1.0 -@export_range(0.1, 5.0, 0.05) var minimum_showcase_duration: float = 0.8 @export_category("Selection") @export_range(0.0, 10.0, 0.05) var undiscovered_weight_multiplier: float = 1.5 @@ -132,7 +131,6 @@ 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,7 +147,6 @@ 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 @@ -175,7 +172,6 @@ var _selected_fish: FishDataType var _pending_catch: FishCatchType var _showcase_ready: bool = false var _put_away_press_armed: bool = false -var _showcase_input_lock_remaining: float = 0.0 var _showcase_restore_generation: int = 0 var _showcase_outcome_completed: bool = false var _network_auto_click_accumulator: float = 0.0 @@ -183,7 +179,6 @@ 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 @@ -222,7 +217,6 @@ 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 @@ -243,7 +237,6 @@ 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( @@ -398,22 +391,6 @@ 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 @@ -437,21 +414,20 @@ func configure_accessibility_auto_click( func begin_water_recovery() -> void: _external_input_blocked = true - if state == FishingState.SHOWING_CATCH: - _secure_showcase_catch_for_recovery() - elif is_fishing_sequence_active(): - if state in [ - FishingState.AIMING_CAST, - FishingState.CASTING, - FishingState.WAITING_FOR_BITE, - FishingState.FIGHTING, - ]: - _cancel_attempt() - # Recovery replaces every in-flight rod return. This includes RETURNING, - # which can be entered by Escape a frame before the water trigger fires. - # Finish cleanup now so recovery never snapshots the cast movement lock. - if state != FishingState.READY or _active_player != null: + if state in [ + FishingState.AIMING_CAST, + FishingState.CASTING, + FishingState.WAITING_FOR_BITE, + FishingState.FIGHTING, + ]: + _cancel_attempt() + # Recovery replaces the normal rod-return presentation. Finish the local + # cleanup now so its temporary movement lock is not captured and restored + # after the player respawns. + if state != FishingState.READY: _finalize_attempt_cleanup("") + elif state == FishingState.SHOWING_CATCH: + _secure_showcase_catch_for_recovery() func end_water_recovery() -> void: @@ -468,7 +444,6 @@ func _secure_showcase_catch_for_recovery() -> void: _pending_catch = null _showcase_ready = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 showcase_changed.emit("", "", 0.0, 0, false) if _active_player != null: _active_player.end_catch_showcase(Callable(), true) @@ -478,7 +453,6 @@ 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 @@ -499,21 +473,14 @@ func _exit_tree() -> void: _selected_fish = null _showcase_ready = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 func _process(delta: float) -> void: if state == FishingState.READY and not Input.is_action_pressed("fish_primary"): _new_cast_press_armed = true - if state == FishingState.SHOWING_CATCH: - _showcase_input_lock_remaining = maxf( - _showcase_input_lock_remaining - delta, - 0.0, - ) if ( state == FishingState.SHOWING_CATCH and _showcase_ready - and _showcase_input_lock_remaining <= 0.0 and not Input.is_action_pressed("fish_primary") ): _put_away_press_armed = true @@ -534,7 +501,7 @@ func _process(delta: float) -> void: _get_effective_reel_speed(), _get_effective_barrier_damage() ) - if not _is_reel_input_pressed(): + if not Input.is_action_pressed("fish_primary"): _catch_controller.set_reel_input(false) else: _resend_network_input_state(delta) @@ -548,36 +515,53 @@ 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() ): return if _local_player == null or not _local_player.is_local_control_enabled(): return - var primary_action: bool = event.is_action("fish_primary") - var alternate_reel: bool = event.is_action(ALTERNATE_REEL_ACTION) - if not primary_action and not ( - alternate_reel and state == FishingState.FIGHTING + if not event.is_action("fish_primary"): + 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 - # 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 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() ): @@ -598,11 +582,7 @@ func _unhandled_input(event: InputEvent) -> void: FishingPresentationType.LineMode.TAUT ) FishingState.SHOWING_CATCH: - if ( - _showcase_ready - and _showcase_input_lock_remaining <= 0.0 - and _put_away_press_armed - ): + if _showcase_ready and _put_away_press_armed: _put_away_catch() else: return @@ -639,55 +619,15 @@ func _unhandled_input(event: InputEvent) -> void: _presentation.set_line_mode(FishingPresentationType.LineMode.SLACK) get_viewport().set_input_as_handled() elif state == FishingState.FIGHTING: - var reel_input_held: bool = _is_reel_input_pressed() if _network_fishing != null: - _network_primary_input_held = reel_input_held + _network_primary_input_held = false _network_input_resend_elapsed = 0.0 - _network_fishing.submit_local_input(reel_input_held, false) + _network_fishing.submit_local_input(false, false) else: - _catch_controller.set_reel_input(reel_input_held) + _catch_controller.set_reel_input(false) 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") - or Input.is_action_pressed(ALTERNATE_REEL_ACTION) - ) - - -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 @@ -803,11 +743,6 @@ 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 @@ -817,32 +752,10 @@ 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 -func is_fishing_sequence_active() -> bool: - return state in [ - FishingState.AIMING_CAST, - FishingState.CASTING, - FishingState.WAITING_FOR_BITE, - FishingState.FIGHTING, - FishingState.SHOWING_CATCH, - FishingState.RETURNING, - ] - - func refresh_active_item_status() -> void: if state == FishingState.READY and has_active_fishing_rod(): status_changed.emit("") @@ -867,7 +780,6 @@ func present_external_catch(fish_catch: FishCatchType) -> bool: _showcase_ready = true _showcase_outcome_completed = true _put_away_press_armed = false - _showcase_input_lock_remaining = minimum_showcase_duration _active_player.begin_catch_showcase(fish_catch) showcase_changed.emit( fish_catch.fish.display_name, @@ -997,6 +909,7 @@ func _on_cast_completed() -> void: if _selected_fish == null: _cleanup_attempt("nothing is biting here.", &"invalid") return + _consume_active_bait() state = FishingState.WAITING_FOR_BITE _active_player.set_fishing_visual(true) @@ -1023,13 +936,11 @@ func _on_cast_completed() -> void: status_changed.emit("") -func _consume_active_bait() -> bool: +func _consume_active_bait() -> void: if _active_player == null or _active_player.active_bait_id.is_empty(): - return true + return if _local_bag == null or not _local_bag.remove_item(_active_player.active_bait_id, 1): _active_player.unequip_bait() - return false - return true func roll_bite_wait_time() -> float: @@ -1180,20 +1091,15 @@ 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(): - _cancel_attempt() - return - if not _consume_active_bait(): - _pending_catch = null - _cleanup_attempt("No bait available.", &"cancel") - return state = FishingState.FIGHTING _active_player.set_fighting_visual(true) _state_time_remaining = 0.0 _withdrawal_input_held = false + _pending_catch = _fish_selector.create_catch(_selected_fish) + if _pending_catch == null or not _pending_catch.is_valid(): + _cancel_attempt() + return _start_fight_audio() bite_activated.emit() status_changed.emit("fish on!") @@ -1206,7 +1112,7 @@ func _activate_bite(confirmation_override: bool = false) -> void: _pending_catch.quality, ) _catch_controller.set_reel_input( - _is_reel_input_pressed() + Input.is_action_pressed("fish_primary") ) _presentation.show_bite() @@ -1291,7 +1197,6 @@ func _on_catch_completed() -> void: _showcase_ready = false _showcase_outcome_completed = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 _catch_controller.reset() _presentation.set_line_mode(FishingPresentationType.LineMode.TAUT) _presentation.play_outcome(&"catch") @@ -1327,7 +1232,6 @@ func _on_outcome_completed(outcome: StringName) -> void: return _showcase_outcome_completed = true _showcase_ready = true - _showcase_input_lock_remaining = minimum_showcase_duration _active_player.begin_catch_showcase(_pending_catch) showcase_changed.emit( _pending_catch.fish.display_name, @@ -1361,7 +1265,6 @@ func _put_away_catch() -> void: _showcase_ready = false _showcase_outcome_completed = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 showcase_changed.emit("", "", 0.0, 0, false) _showcase_restore_generation += 1 var restore_generation: int = _showcase_restore_generation @@ -1389,7 +1292,7 @@ func _store_catch_progression(fish_catch: FishCatchType) -> void: ) ) _local_inventory.add_catch(fish_catch) - _local_collection_log.record_catch( + _local_collection_log.mark_quality_discovered( fish_catch.fish_id, fish_catch.quality, ) @@ -1435,7 +1338,6 @@ func _cleanup_attempt( _showcase_ready = false _showcase_outcome_completed = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 showcase_changed.emit("", "", 0.0, 0, false) _catch_controller.reset() state = FishingState.RETURNING @@ -1457,7 +1359,6 @@ 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) @@ -1486,7 +1387,6 @@ func _finalize_attempt_cleanup( _showcase_ready = false _showcase_outcome_completed = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 showcase_changed.emit("", "", 0.0, 0, false) _catch_controller.reset() _presentation.cleanup() @@ -1502,7 +1402,6 @@ 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: @@ -1511,7 +1410,6 @@ func _return_to_ready() -> void: _cooldown_status = "" status_changed.emit("") ready_for_equipment_refresh.emit() - _set_fishing_input_priority(false) func _cancel_attempt() -> void: @@ -1687,47 +1585,6 @@ 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 [] @@ -1862,13 +1719,12 @@ 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: _active_player.set_fighting_visual(true) _withdrawal_input_held = false - _network_primary_input_held = _is_reel_input_pressed() + _network_primary_input_held = Input.is_action_pressed("fish_primary") _network_input_resend_elapsed = 0.0 _network_auto_click_accumulator = 0.0 _network_active_barrier_index = -1 @@ -1940,7 +1796,7 @@ func _on_network_fishing_snapshot(snapshot: Dictionary) -> void: func _update_network_auto_click(delta: float) -> void: if ( not _catch_controller.auto_click_enabled - or not _is_reel_input_pressed() + or not Input.is_action_pressed("fish_primary") or _network_active_barrier_index < 0 ): _network_auto_click_accumulator = 0.0 @@ -1967,7 +1823,6 @@ func _on_network_catch_received(fish_catch: FishCatchType) -> void: _showcase_ready = false _showcase_outcome_completed = false _put_away_press_armed = false - _showcase_input_lock_remaining = 0.0 catch_display_changed.emit( 0.0, 0.0, PackedFloat32Array(), PackedInt32Array(), PackedInt32Array(), -1, false diff --git a/fishing/remote_fishing_presentation.gd b/fishing/remote_fishing_presentation.gd index 380afdf..06224de 100644 --- a/fishing/remote_fishing_presentation.gd +++ b/fishing/remote_fishing_presentation.gd @@ -18,8 +18,6 @@ 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: @@ -45,11 +43,7 @@ func setup(owning_player: Player) -> void: cleanup() -func show_cast( - origin: Vector3, - target: Vector3, - attempt_id: String = "", -) -> void: +func show_cast(origin: Vector3, target: Vector3) -> void: if ( _owner == null or not origin.is_finite() @@ -58,8 +52,6 @@ func show_cast( 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 @@ -94,48 +86,10 @@ 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) @@ -177,8 +131,6 @@ 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 c8b7d85..118d733 100644 --- a/gathering/catalog/beetle_stag_common.tres +++ b/gathering/catalog/beetle_stag_common.tres @@ -10,8 +10,6 @@ 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 @@ -19,7 +17,7 @@ scare_radius = 0.1 capture_radius = 0.34 interaction_range = 2.8 charge_duration = 1.0 -sprite_pixel_size = 0.0075 +sprite_pixel_size = 0.005 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 705948e..1ccabe8 100644 --- a/gathering/catalog/crab_blue.tres +++ b/gathering/catalog/crab_blue.tres @@ -10,8 +10,5 @@ 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 b27bb7e..83d20c8 100644 --- a/gathering/catalog/crab_brown.tres +++ b/gathering/catalog/crab_brown.tres @@ -10,10 +10,7 @@ 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 41de7fe..9f984cf 100644 --- a/gathering/gatherable_data.gd +++ b/gathering/gatherable_data.gd @@ -10,12 +10,6 @@ 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 @@ -23,20 +17,7 @@ enum SurfaceWaterRelation { @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 @@ -91,21 +72,12 @@ 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 @@ -130,39 +102,6 @@ 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 c061db5..2859145 100644 --- a/gathering/gathering_controller.gd +++ b/gathering/gathering_controller.gd @@ -341,12 +341,10 @@ 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 1a71477..8a07ba0 100644 --- a/gathering/world_gatherable.gd +++ b/gathering/world_gatherable.gd @@ -29,16 +29,12 @@ 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: @@ -54,6 +50,7 @@ func configure( ) ) _sprite.rotation_degrees.x = data.sprite_tilt_degrees + apply_network_state(position, yaw, true) func apply_network_state( @@ -150,6 +147,7 @@ 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: @@ -161,7 +159,6 @@ 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 deleted file mode 100644 index becd54e..0000000 Binary files a/homes/assets/starter_motorcoach.glb and /dev/null differ diff --git a/homes/assets/starter_motorcoach.glb.import b/homes/assets/starter_motorcoach.glb.import deleted file mode 100644 index 5cba35b..0000000 --- a/homes/assets/starter_motorcoach.glb.import +++ /dev/null @@ -1,45 +0,0 @@ -[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 deleted file mode 100644 index 21608ea..0000000 Binary files a/homes/assets/starter_rv_interior.glb and /dev/null differ diff --git a/homes/assets/starter_rv_interior.glb.import b/homes/assets/starter_rv_interior.glb.import deleted file mode 100644 index 947870a..0000000 --- a/homes/assets/starter_rv_interior.glb.import +++ /dev/null @@ -1,45 +0,0 @@ -[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 deleted file mode 100644 index 3ba2b76..0000000 Binary files a/homes/assets/tent_interior.glb and /dev/null differ diff --git a/homes/assets/tent_interior.glb.import b/homes/assets/tent_interior.glb.import deleted file mode 100644 index fc01ba7..0000000 --- a/homes/assets/tent_interior.glb.import +++ /dev/null @@ -1,45 +0,0 @@ -[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 deleted file mode 100644 index 14e5e29..0000000 --- a/homes/decor_catalog.gd +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 10d2530..0000000 --- a/homes/decor_catalog.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bvgwmexas2gps diff --git a/homes/home_decor_controller.gd b/homes/home_decor_controller.gd deleted file mode 100644 index f67207f..0000000 --- a/homes/home_decor_controller.gd +++ /dev/null @@ -1,512 +0,0 @@ -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 deleted file mode 100644 index 1778125..0000000 --- a/homes/home_decor_controller.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://b5j0mqcvhmi54 diff --git a/homes/home_world_service.gd b/homes/home_world_service.gd deleted file mode 100644 index 4ec0645..0000000 --- a/homes/home_world_service.gd +++ /dev/null @@ -1,1504 +0,0 @@ -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 deleted file mode 100644 index 5505d06..0000000 --- a/homes/home_world_service.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cy2kjoxhwxujd diff --git a/homes/player_home_state.gd b/homes/player_home_state.gd deleted file mode 100644 index a89d6a3..0000000 --- a/homes/player_home_state.gd +++ /dev/null @@ -1,841 +0,0 @@ -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 deleted file mode 100644 index 37836c6..0000000 --- a/homes/player_home_state.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ggfdoak2ixxx diff --git a/inventory/player_bag.gd b/inventory/player_bag.gd index d94845d..e33f1e4 100644 --- a/inventory/player_bag.gd +++ b/inventory/player_bag.gd @@ -60,28 +60,6 @@ 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 36068ea..b7d5197 100644 --- a/inventory/player_hotbar.gd +++ b/inventory/player_hotbar.gd @@ -314,25 +314,6 @@ 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 bce726e..244e10b 100644 --- a/inventory/player_inventory_layout.gd +++ b/inventory/player_inventory_layout.gd @@ -37,7 +37,6 @@ 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 @@ -73,44 +72,7 @@ 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 _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 + return _placements.has(key) or _first_free_slot(InventoryContainer.INVENTORY) >= 0 func can_accept_catch(catch_id: StringName = StringName()) -> bool: @@ -370,7 +332,6 @@ func restore_from_save_data(data: Dictionary) -> bool: "container": container, "slot": slot, } - _prepared_item_placements.clear() _placements = restored _reconcile(true) return true @@ -379,7 +340,6 @@ 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: @@ -442,17 +402,8 @@ 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: 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) + var target_slot := _first_free_slot(target_container) if target_slot < 0: target_container = InventoryContainer.STORAGE target_slot = _first_free_slot(target_container) @@ -533,37 +484,6 @@ 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 deleted file mode 100644 index 86a2cf9..0000000 --- a/items/catalog/basic_cube.tres +++ /dev/null @@ -1,17 +0,0 @@ -[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/fishing_net.tres b/items/catalog/fishing_net.tres deleted file mode 100644 index 04b1919..0000000 --- a/items/catalog/fishing_net.tres +++ /dev/null @@ -1,16 +0,0 @@ -[gd_resource type="Resource" script_class="ItemData" load_steps=2 format=3] - -[ext_resource type="Script" path="res://items/item_data.gd" id="1_item"] - -[resource] -script = ExtResource("1_item") -item_id = &"fishing_net" -display_name = "fishing net" -description = "a placeable water net reserved for a future passive fishing system." -active = true -category = 1 -stackable = false -max_stack = 1 -usable = false -equippable = false -hotbar_allowed = false diff --git a/items/catalog/item_catalog.tres b/items/catalog/item_catalog.tres index 2f15e0a..1c006f4 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=42 format=3] +[gd_resource type="Resource" script_class="ItemCatalog" load_steps=40 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"] @@ -39,9 +39,7 @@ [ext_resource type="Resource" path="res://items/catalog/magnet.tres" id="38_magnet"] [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"), ExtResource("42_basic_cube")] +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")] diff --git a/items/icons/equipment/64_cooler_plus.png b/items/icons/equipment/64_cooler_plus.png new file mode 100644 index 0000000..f81648d Binary files /dev/null and b/items/icons/equipment/64_cooler_plus.png differ diff --git a/items/icons/equipment/64_cooler_plus.png.import b/items/icons/equipment/64_cooler_plus.png.import new file mode 100644 index 0000000..44e493a --- /dev/null +++ b/items/icons/equipment/64_cooler_plus.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://baht2hredfky8" +path="res://.godot/imported/64_cooler_plus.png-d0daa39246f92fd9774ec1721970efad.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://items/icons/equipment/64_cooler_plus.png" +dest_files=["res://.godot/imported/64_cooler_plus.png-d0daa39246f92fd9774ec1721970efad.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/items/icons/shop/64_power_plus.png b/items/icons/shop/64_power_plus.png new file mode 100644 index 0000000..7daf62f Binary files /dev/null and b/items/icons/shop/64_power_plus.png differ diff --git a/ui/icons/player_options/clean.png.import b/items/icons/shop/64_power_plus.png.import similarity index 70% rename from ui/icons/player_options/clean.png.import rename to items/icons/shop/64_power_plus.png.import index 86f3fe8..c82907d 100644 --- a/ui/icons/player_options/clean.png.import +++ b/items/icons/shop/64_power_plus.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bmhhqwmx7lxxy" -path="res://.godot/imported/clean.png-762368d1ca0665fa46111797ef3210a1.ctex" +uid="uid://xh2g4eytrjep" +path="res://.godot/imported/64_power_plus.png-98b7e06d3090a4411d56e2046b8c9d4b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://ui/icons/player_options/clean.png" -dest_files=["res://.godot/imported/clean.png-762368d1ca0665fa46111797ef3210a1.ctex"] +source_file="res://items/icons/shop/64_power_plus.png" +dest_files=["res://.godot/imported/64_power_plus.png-98b7e06d3090a4411d56e2046b8c9d4b.ctex"] [params] @@ -36,5 +36,5 @@ process/premult_alpha=false process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false -process/size_limit=64 +process/size_limit=0 detect_3d/compress_to=1 diff --git a/items/icons/shop/64_speed_plus.png b/items/icons/shop/64_speed_plus.png new file mode 100644 index 0000000..de74e81 Binary files /dev/null and b/items/icons/shop/64_speed_plus.png differ diff --git a/ui/icons/player_options/friends.png.import b/items/icons/shop/64_speed_plus.png.import similarity index 70% rename from ui/icons/player_options/friends.png.import rename to items/icons/shop/64_speed_plus.png.import index e38417a..6d330de 100644 --- a/ui/icons/player_options/friends.png.import +++ b/items/icons/shop/64_speed_plus.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://brdj550pntc0t" -path="res://.godot/imported/friends.png-2546aa51ed36f2defc5121467d12527d.ctex" +uid="uid://dk6yx5cbpblo6" +path="res://.godot/imported/64_speed_plus.png-c695fb4021c17dfa94ed7aa48ce262c1.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://ui/icons/player_options/friends.png" -dest_files=["res://.godot/imported/friends.png-2546aa51ed36f2defc5121467d12527d.ctex"] +source_file="res://items/icons/shop/64_speed_plus.png" +dest_files=["res://.godot/imported/64_speed_plus.png-c695fb4021c17dfa94ed7aa48ce262c1.ctex"] [params] @@ -36,5 +36,5 @@ process/premult_alpha=false process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false -process/size_limit=64 +process/size_limit=0 detect_3d/compress_to=1 diff --git a/jobs/job_catalog.gd b/jobs/job_catalog.gd index eb3ea02..754263d 100644 --- a/jobs/job_catalog.gd +++ b/jobs/job_catalog.gd @@ -14,9 +14,6 @@ enum Kind { REACH_LEVEL, DISCOVER_SPECIES, MASTER_QUALITIES, - CATCH_CREATURE_GROUP, - DISCOVER_CREATURE_GROUP, - MASTER_CREATURE_GROUP, } const DAILY_JOB_COUNT: int = 4 @@ -114,28 +111,6 @@ static func generate_daily_jobs( 50, {"fish_id": String(selected.id)}, )) - if _has_creature_group(candidates, FishDataType.CreatureGroup.INSECT): - optional.append(_job( - "insect_roundup", - "bug hunt", - "catch 3 insects", - Kind.CATCH_CREATURE_GROUP, - 3, - 40, - 50, - {"creature_group": int(FishDataType.CreatureGroup.INSECT)}, - )) - if _has_creature_group(candidates, FishDataType.CreatureGroup.SHELLFISH): - optional.append(_job( - "shellfish_search", - "shore patrol", - "catch 3 shellfish", - Kind.CATCH_CREATURE_GROUP, - 3, - 45, - 50, - {"creature_group": int(FishDataType.CreatureGroup.SHELLFISH)}, - )) _shuffle(optional, rng) while jobs.size() < DAILY_JOB_COUNT and not optional.is_empty(): jobs.append(optional.pop_back()) @@ -197,8 +172,6 @@ static func generate_weather_schedule( static func lifetime_chains( registered_species_count: int, - registered_insect_count: int = 0, - registered_shellfish_count: int = 0, ) -> Array[Dictionary]: var chains: Array[Dictionary] = [ _chain("catch", Kind.CATCH_TOTAL, [100, 1000, 5000], [ @@ -224,33 +197,15 @@ static func lifetime_chains( [registered_species_count], [[1500, 2000]], )) - _append_creature_lifetime_chains( - chains, - "insect", - FishDataType.CreatureGroup.INSECT, - registered_insect_count, - ) - _append_creature_lifetime_chains( - chains, - "shellfish", - FishDataType.CreatureGroup.SHELLFISH, - registered_shellfish_count, - ) return chains static func visible_lifetime_jobs( registered_species_count: int, claimed_ids: Array[String], - registered_insect_count: int = 0, - registered_shellfish_count: int = 0, ) -> Array[Dictionary]: var visible: Array[Dictionary] = [] - for chain: Dictionary in lifetime_chains( - registered_species_count, - registered_insect_count, - registered_shellfish_count, - ): + for chain: Dictionary in lifetime_chains(registered_species_count): var targets: Array = chain.get("targets", []) var rewards: Array = chain.get("rewards", []) for tier_index: int in targets.size(): @@ -261,9 +216,6 @@ static func visible_lifetime_jobs( if job_id in claimed_ids: continue var reward: Array = rewards[tier_index] - var extra: Dictionary = {} - if chain.has("creature_group"): - extra["creature_group"] = int(chain["creature_group"]) visible.append(_job( job_id, _lifetime_title(str(chain.get("id", "")), int(targets[tier_index])), @@ -274,7 +226,6 @@ static func visible_lifetime_jobs( int(targets[tier_index]), int(reward[0]), int(reward[1]), - extra, )) break return visible @@ -305,10 +256,10 @@ static func is_valid_job(value: Variant) -> bool: and typeof(job.get("description")) == TYPE_STRING and str(job["description"]).length() <= 160 and is_bounded_integer( - job.get("kind"), Kind.CATCH_TOTAL, Kind.MASTER_CREATURE_GROUP + job.get("kind"), Kind.CATCH_TOTAL, Kind.MASTER_QUALITIES ) and kind >= Kind.CATCH_TOTAL - and kind <= Kind.MASTER_CREATURE_GROUP + and kind <= Kind.MASTER_QUALITIES and is_bounded_integer(job.get("target"), 1, 1000000000) and is_bounded_integer( job.get("fish_coin"), 0, MAX_JOB_REWARD_COINS @@ -367,12 +318,6 @@ static func is_valid_job(value: Variant) -> bool: and not str(job.get("fish_id", "")).is_empty() and str(job.get("fish_id", "")).length() <= 96 ) - Kind.CATCH_CREATURE_GROUP, Kind.DISCOVER_CREATURE_GROUP, Kind.MASTER_CREATURE_GROUP: - return is_bounded_integer( - job.get("creature_group"), - FishDataType.CreatureGroup.FISH, - FishDataType.CreatureGroup.SHELLFISH, - ) return true @@ -456,16 +401,13 @@ static func _chain( kind: Kind, targets: Array[int], rewards: Array, - extra: Dictionary = {}, ) -> Dictionary: - var result: Dictionary = { + return { "id": id, "kind": int(kind), "targets": targets, "rewards": rewards, } - result.merge(extra, true) - return result static func _lifetime_title(chain_id: String, target: int) -> String: @@ -480,18 +422,6 @@ static func _lifetime_title(chain_id: String, target: int) -> String: return "complete the catalog" "master": return "quality master" - "insect_catch": - return "seasoned bug catcher" - "insect_discover": - return "complete the insect catalog" - "insect_master": - return "insect quality master" - "shellfish_catch": - return "seasoned beachcomber" - "shellfish_discover": - return "complete the shellfish catalog" - "shellfish_master": - return "shellfish quality master" return "long-term job" @@ -507,67 +437,9 @@ static func _lifetime_description(chain_id: String, target: int) -> String: return "discover all %d cataloged fish" % target "master": return "collect every quality of all %d fish" % target - "insect_catch": - return "catch %d insects" % target - "insect_discover": - return "discover all %d cataloged insects" % target - "insect_master": - return "collect every quality of all %d insects" % target - "shellfish_catch": - return "catch %d shellfish" % target - "shellfish_discover": - return "discover all %d cataloged shellfish" % target - "shellfish_master": - return "collect every quality of all %d shellfish" % target return "keep fishing" -static func _has_creature_group( - candidates: Array[FishDataType], - creature_group: FishDataType.CreatureGroup, -) -> bool: - for fish: FishDataType in candidates: - if ( - fish != null - and fish.is_selectable() - and fish.get_creature_group() == creature_group - ): - return true - return false - - -static func _append_creature_lifetime_chains( - chains: Array[Dictionary], - id_prefix: String, - creature_group: FishDataType.CreatureGroup, - registered_count: int, -) -> void: - if registered_count <= 0: - return - var group_data := {"creature_group": int(creature_group)} - chains.append(_chain( - "%s_catch" % id_prefix, - Kind.CATCH_CREATURE_GROUP, - [10, 50, 250], - [[75, 100], [250, 350], [900, 1100]], - group_data, - )) - chains.append(_chain( - "%s_discover" % id_prefix, - Kind.DISCOVER_CREATURE_GROUP, - [registered_count], - [[250, 350]], - group_data, - )) - chains.append(_chain( - "%s_master" % id_prefix, - Kind.MASTER_CREATURE_GROUP, - [registered_count], - [[750, 1000]], - group_data, - )) - - static func _shuffle(values: Array[Dictionary], rng: RandomNumberGenerator) -> void: for index: int in range(values.size() - 1, 0, -1): var swap_index: int = rng.randi_range(0, index) diff --git a/jobs/player_job_service.gd b/jobs/player_job_service.gd index 7ede866..7b19cc6 100644 --- a/jobs/player_job_service.gd +++ b/jobs/player_job_service.gd @@ -25,7 +25,6 @@ var _session: NetworkSession var _save_manager: PlayerSaveManager var _network_fishing: NetworkFishingService var _network_sale: NetworkSaleService -var _network_world_spawns: NetworkWorldSpawnService var _progression_ready: bool = false var _host_board: Dictionary = {} @@ -36,8 +35,6 @@ var _daily_completions: Dictionary[String, int] = {} var _pending_rewards: Array[Dictionary] = [] var _lifetime_claimed: Array[String] = [] var _total_catches: int = 0 -var _total_insects: int = 0 -var _total_shellfish: int = 0 var _total_sold: int = 0 var _daily_clock_hour: float = WorldTimeService.DEFAULT_START_HOUR @@ -68,11 +65,9 @@ func setup( func bind_authoritative_services( network_fishing: NetworkFishingService, network_sale: NetworkSaleService, - network_world_spawns: NetworkWorldSpawnService, ) -> void: _network_fishing = network_fishing _network_sale = network_sale - _network_world_spawns = network_world_spawns if not _network_fishing.local_catch_received.is_connected( _on_authoritative_catch ): @@ -83,12 +78,6 @@ func bind_authoritative_services( _network_sale.local_sale_finished.connect( _on_authoritative_sale_finished ) - if not _network_world_spawns.local_capture_received.is_connected( - _on_authoritative_catch - ): - _network_world_spawns.local_capture_received.connect( - _on_authoritative_catch - ) func set_save_manager(save_manager: PlayerSaveManager) -> void: @@ -134,10 +123,7 @@ func get_daily_jobs() -> Array[Dictionary]: func get_lifetime_jobs() -> Array[Dictionary]: var result: Array[Dictionary] = JobCatalog.visible_lifetime_jobs( - _registered_species_count(), - _lifetime_claimed, - _registered_creature_count(FishDataType.CreatureGroup.INSECT), - _registered_creature_count(FishDataType.CreatureGroup.SHELLFISH), + _registered_species_count(), _lifetime_claimed ) for job: Dictionary in result: var progress: int = _lifetime_progress(job) @@ -250,8 +236,6 @@ func to_save_data() -> Dictionary: "lifetime_claimed": _lifetime_claimed.duplicate(), "statistics": { "fish_caught": _total_catches, - "insects_caught": _total_insects, - "shellfish_caught": _total_shellfish, "fish_sold": _total_sold, }, } @@ -310,8 +294,6 @@ func restore_from_save_data(data: Dictionary) -> bool: _lifetime_claimed.append(str(value)) var statistics: Dictionary = data.get("statistics", {}) _total_catches = int(statistics.get("fish_caught", 0)) - _total_insects = int(statistics.get("insects_caught", 0)) - _total_shellfish = int(statistics.get("shellfish_caught", 0)) _total_sold = int(statistics.get("fish_sold", 0)) if _session != null and _session.is_host(): _active_board = _host_board.duplicate(true) @@ -336,8 +318,6 @@ func reset_to_defaults() -> void: _pending_rewards.clear() _lifetime_claimed.clear() _total_catches = 0 - _total_insects = 0 - _total_shellfish = 0 _total_sold = 0 _daily_clock_hour = WorldTimeService.DEFAULT_START_HOUR changed.emit() @@ -353,12 +333,7 @@ static func default_save_data() -> Dictionary: "daily_clock_hour": WorldTimeService.DEFAULT_START_HOUR, "pending_rewards": [], "lifetime_claimed": [], - "statistics": { - "fish_caught": 0, - "insects_caught": 0, - "shellfish_caught": 0, - "fish_sold": 0, - }, + "statistics": {"fish_caught": 0, "fish_sold": 0}, } @@ -481,12 +456,6 @@ static func validate_save_data(value: Variant) -> bool: JobCatalog.is_bounded_integer( statistics.get("fish_caught"), 0, MAX_PROGRESS_VALUE ) - and JobCatalog.is_bounded_integer( - statistics.get("insects_caught", 0), 0, MAX_PROGRESS_VALUE - ) - and JobCatalog.is_bounded_integer( - statistics.get("shellfish_caught", 0), 0, MAX_PROGRESS_VALUE - ) and JobCatalog.is_bounded_integer( statistics.get("fish_sold"), 0, MAX_PROGRESS_VALUE ) @@ -545,7 +514,7 @@ func _generate_host_board(cycle: int) -> void: var candidates: Array[FishDataType] = [] if _catalog != null: for fish: FishDataType in _catalog.candidates: - if fish != null and fish.is_selectable(): + if fish != null and fish.is_fishable(): candidates.append(fish) var schedule_anchor_index: int = _current_weather_segment() var allow_weather_jobs: bool = ( @@ -639,13 +608,7 @@ func _on_session_state_changed(state: NetworkSession.State) -> void: func _on_authoritative_catch(fish_catch: FishCatchType) -> void: if not _progression_ready or fish_catch == null or not fish_catch.is_valid(): return - match fish_catch.fish.get_creature_group(): - FishDataType.CreatureGroup.FISH: - _total_catches = mini(_total_catches + 1, MAX_PROGRESS_VALUE) - FishDataType.CreatureGroup.INSECT: - _total_insects = mini(_total_insects + 1, MAX_PROGRESS_VALUE) - FishDataType.CreatureGroup.SHELLFISH: - _total_shellfish = mini(_total_shellfish + 1, MAX_PROGRESS_VALUE) + _total_catches = mini(_total_catches + 1, MAX_PROGRESS_VALUE) _update_daily_for_catch(fish_catch) changed.emit() @@ -667,40 +630,23 @@ func _on_authoritative_sale_finished( func _update_daily_for_catch(fish_catch: FishCatchType) -> void: - var creature_group: int = int(fish_catch.fish.get_creature_group()) - var is_fish: bool = creature_group == FishDataType.CreatureGroup.FISH for job: Dictionary in get_daily_jobs(): var matches: bool = false match int(job.get("kind", -1)): JobCatalog.Kind.CATCH_TOTAL: - matches = is_fish + matches = true JobCatalog.Kind.CATCH_WATER: - matches = is_fish and fish_catch.fish.is_allowed_in_water( + matches = fish_catch.fish.is_allowed_in_water( int(job.get("water_type", WaterType.Type.OTHER)) as WaterType.Type ) JobCatalog.Kind.CATCH_QUALITY: - matches = ( - is_fish - and fish_catch.quality >= int(job.get("minimum_quality", 0)) - ) + matches = fish_catch.quality >= int(job.get("minimum_quality", 0)) JobCatalog.Kind.CATCH_PHASE: - matches = ( - is_fish - and int(_world_time.get_phase()) == int(job.get("phase", -1)) - ) + matches = int(_world_time.get_phase()) == int(job.get("phase", -1)) JobCatalog.Kind.CATCH_WEATHER: - matches = ( - is_fish - and int(_world_weather.get_weather()) - == int(job.get("weather", -1)) - ) + matches = int(_world_weather.get_weather()) == int(job.get("weather", -1)) JobCatalog.Kind.CATCH_SPECIES: - matches = ( - is_fish - and String(fish_catch.fish_id) == str(job.get("fish_id", "")) - ) - JobCatalog.Kind.CATCH_CREATURE_GROUP: - matches = creature_group == int(job.get("creature_group", -1)) + matches = String(fish_catch.fish_id) == str(job.get("fish_id", "")) if matches: _advance_daily(job, 1) @@ -795,74 +741,26 @@ func _lifetime_progress(job: Dictionary) -> int: JobCatalog.Kind.REACH_LEVEL: return _experience.get_level() if _experience != null else 0 JobCatalog.Kind.DISCOVER_SPECIES: - return _collection_progress( - FishDataType.CreatureGroup.FISH, false - ) + return _collection.get_discovered_ids().size() if _collection != null else 0 JobCatalog.Kind.MASTER_QUALITIES: - return _collection_progress( - FishDataType.CreatureGroup.FISH, true - ) - JobCatalog.Kind.CATCH_CREATURE_GROUP: - match int(job.get("creature_group", -1)): - FishDataType.CreatureGroup.INSECT: - return _total_insects - FishDataType.CreatureGroup.SHELLFISH: - return _total_shellfish - JobCatalog.Kind.DISCOVER_CREATURE_GROUP: - return _collection_progress( - int(job.get("creature_group", -1)) as FishDataType.CreatureGroup, - false, - ) - JobCatalog.Kind.MASTER_CREATURE_GROUP: - return _collection_progress( - int(job.get("creature_group", -1)) as FishDataType.CreatureGroup, - true, - ) + var mastered: int = 0 + if _collection != null and _catalog != null: + for fish: FishDataType in _catalog.candidates: + if fish != null and _collection.has_mastered(fish.id): + mastered += 1 + return mastered return 0 func _registered_species_count() -> int: - return _registered_creature_count(FishDataType.CreatureGroup.FISH) - - -func _registered_creature_count( - creature_group: FishDataType.CreatureGroup, -) -> int: var count: int = 0 if _catalog != null: for fish: FishDataType in _catalog.candidates: - if ( - fish != null - and fish.is_selectable() - and fish.get_creature_group() == creature_group - ): + if fish != null and fish.is_fishable(): count += 1 return count -func _collection_progress( - creature_group: FishDataType.CreatureGroup, - require_mastery: bool, -) -> int: - var progress: int = 0 - if _collection == null or _catalog == null: - return progress - for fish: FishDataType in _catalog.candidates: - if ( - fish == null - or not fish.is_selectable() - or fish.get_creature_group() != creature_group - ): - continue - if ( - _collection.has_mastered(fish.id) - if require_mastery - else _collection.has_discovered(fish.id) - ): - progress += 1 - return progress - - func _expire_incomplete_daily_jobs() -> void: _daily_progress.clear() _daily_completions.clear() @@ -897,7 +795,7 @@ func _matches_canonical_board(board: Dictionary) -> bool: var candidates: Array[FishDataType] = [] if _catalog != null: for fish: FishDataType in _catalog.candidates: - if fish != null and fish.is_selectable(): + if fish != null and fish.is_fishable(): candidates.append(fish) var anchor_index: int = int(board.get("schedule_anchor_index", -1)) var allow_weather_jobs: bool = ( diff --git a/main/main.gd b/main/main.gd index 324c268..1e68247 100644 --- a/main/main.gd +++ b/main/main.gd @@ -6,16 +6,12 @@ const FishPoolType = preload("res://fish/fish_pool.gd") const GameUIType = preload("res://ui/game_ui.gd") const PlayerType = preload("res://player/player.gd") const TestWorldType = preload("res://world/test_world.gd") -const WorldLayoutType = preload("res://world/world_layout.gd") const WaterRecoveryControllerType = preload( "res://world/water_recovery_controller.gd" ) 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" ) @@ -37,12 +33,6 @@ 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" ) @@ -76,7 +66,6 @@ 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" ) @@ -130,34 +119,16 @@ 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 = ( "res://audio/music/title/as_in_four_wolves.ogg" ) -const NEW_GAME_MUSIC_PATH: String = "res://audio/music/world/tulips.wav" const DUSK_MUSIC_PATH: String = "res://audio/music/world/craft.mp3" 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 @@ -167,7 +138,6 @@ const HOME_EXIT_WALK_DURATION: float = 0.62 @export_category("Title Music") @export_range(-40.0, 0.0, 0.5) var title_music_volume_db: float = -6.0 @export_range(0.0, 10.0, 0.05) var title_music_fade_out_seconds: float = 5.0 -@export_range(-40.0, 0.0, 0.5) var new_game_music_volume_db: float = -6.0 @onready var _test_world: TestWorldType = $TestWorld @onready var _player: PlayerType = %Player @@ -175,7 +145,6 @@ const HOME_EXIT_WALK_DURATION: float = 0.62 @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 @@ -185,7 +154,6 @@ const HOME_EXIT_WALK_DURATION: float = 0.62 ) @onready var _interface_fonts: InterfaceFontController = %InterfaceFontController @onready var _title_music: AudioStreamPlayer = %TitleMusic -@onready var _new_game_music: AudioStreamPlayer = %NewGameMusic @onready var _dusk_music: AudioStreamPlayer = %DuskMusic @onready var _ui_pixelation: UIPixelationPresenterType = %UIPresentation @onready var _pixelation_reset: PixelationResetOverlayType = ( @@ -235,10 +203,6 @@ const HOME_EXIT_WALK_DURATION: float = 0.62 ) @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 ) @@ -261,16 +225,12 @@ const HOME_EXIT_WALK_DURATION: float = 0.62 @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 @@ -282,10 +242,6 @@ 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 @@ -300,26 +256,15 @@ 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( @@ -331,7 +276,7 @@ func _ready() -> void: _configure_presentation_performance_profile( _performance_profile.is_light() ) - DisplayServer.window_set_title("straywild") + DisplayServer.window_set_title("NETfishing") _rain_ambience = RainAmbienceType.new() _rain_ambience.name = "RainAmbience" add_child(_rain_ambience) @@ -361,12 +306,11 @@ 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_background_material := ( - _title_background.material as ShaderMaterial - ) - if title_background_material != null: - title_background_material.set_shader_parameter( + var title_water_material := _title_background.material as ShaderMaterial + if title_water_material != null: + title_water_material.set_shader_parameter( "animation_enabled", not light_profile, ) @@ -412,7 +356,6 @@ func _configure_presentation_performance_profile(light_profile: bool) -> void: func _configure_audio_performance_profile(light_profile: bool) -> void: _title_music.stream = _load_optional_audio_stream(TITLE_MUSIC_PATH) - _new_game_music.stream = _load_optional_audio_stream(NEW_GAME_MUSIC_PATH) _dusk_music.stream = _load_optional_audio_stream(DUSK_MUSIC_PATH) if light_profile: _shoreline_ambience.set_audio_enabled(false) @@ -434,81 +377,16 @@ 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 - if not _data_root.has_data_manifest(data_path): + var manifest_path: String = data_path.path_join( + PlayerDataRoot.MANIFEST_FILENAME + ) + if not FileAccess.file_exists(manifest_path): var created: Dictionary = _data_root.create_unbound_root(data_path) if not bool(created.get("ok", false)): _fail_dedicated_server(str(created.get( @@ -531,45 +409,16 @@ func _start_dedicated_server() -> void: ): _fail_dedicated_server("The server operator list is invalid.") return - if not _network_chat.configure_dedicated_history( - config.chat_logging, - config.chat_log_path, - ): - _fail_dedicated_server( - "The dedicated-server chat privacy configuration is invalid." - ) - return - if not _apply_world( - WorldLayoutType.GENERATED, - config.world_seed, - false, - ): - _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, - ): - _fail_dedicated_server("The configured world seed is invalid.") - return _configure_portable_stores() if not _discovery.configure_dedicated_runtime(config.server_name): _fail_dedicated_server("The server room name is invalid.") 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, @@ -581,17 +430,13 @@ 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( - "straywild dedicated server ready: %s on %s:%d (%d players, %s, timezone %s)" + "NETfishing dedicated server ready: %s on %s:%d (%d players, %s, timezone %s)" % [ config.server_name, config.bind_address, @@ -607,34 +452,15 @@ 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: - 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() - ) + _save_manager.configure_storage( + _data_root.path_for(&"player_save"), _data_root + ) _network_profile.configure_storage( _data_root.path_for(&"network_profile"), _data_root ) @@ -671,8 +497,7 @@ func _initialize_application(dedicated: bool) -> void: _player_spawn_service.setup( _players_root, _player, - _test_world.get_player_spawn_transform(), - dedicated, + _test_world.get_player_spawn_transform() ) _network_session.setup( _network_profile, @@ -685,7 +510,7 @@ func _initialize_application(dedicated: bool) -> void: _host_bans, dedicated, ) - _discovery.setup(_network_session, _relationships) + _discovery.setup(_network_session) if not dedicated: _world_time_visuals.setup( _world_time, @@ -760,7 +585,6 @@ 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, @@ -777,24 +601,14 @@ 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 ) - _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 + _game_ui.set_shop_npc_player_in_range( + _shop_interaction.is_local_player_in_range() ) _storage_interaction.setup_local_player(_player) _storage_interaction.local_player_range_changed.connect( @@ -816,24 +630,6 @@ func _initialize_application(dedicated: bool) -> void: _world_time, _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) @@ -876,7 +672,6 @@ func _initialize_application(dedicated: bool) -> void: _save_manager, _network_item_use, _world_time, - not dedicated, ) _gathering_controller.setup( _player, @@ -907,7 +702,6 @@ func _initialize_application(dedicated: bool) -> void: _player.bag, _player.hotbar, _player.art_unlocks, - _data_root, ) _network_player_list.set_surface_drawing_service( _network_surface_drawing @@ -925,8 +719,7 @@ func _initialize_application(dedicated: bool) -> void: _save_manager, item_catalog, fish_catalog, - _network_item_use, - not dedicated, + _network_item_use ) var sale_buyers: Array[FishBuyerProfileType] = [ pelican_buyer_profile, @@ -948,11 +741,7 @@ func _initialize_application(dedicated: bool) -> void: _asset_reservations, _player.inventory_layout, ) - _player_jobs.bind_authoritative_services( - _network_fishing, - _network_sale, - _network_world_spawns, - ) + _player_jobs.bind_authoritative_services(_network_fishing, _network_sale) _network_shop.setup( _network_session, _player_spawn_service, @@ -967,10 +756,6 @@ 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, @@ -988,7 +773,6 @@ func _initialize_application(dedicated: bool) -> void: _network_fishing, _world_time, _world_weather, - Callable(_test_world, "get_fishable_water_regions"), ) if dedicated: return @@ -1010,14 +794,11 @@ 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, @@ -1035,27 +816,6 @@ 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, _identity_backups, @@ -1064,22 +824,9 @@ func _initialize_application(dedicated: bool) -> void: _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( @@ -1099,8 +846,7 @@ 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(), - Callable(_test_world, "get_water_recovery_position"), + _test_world.get_safe_respawn_points() ) _ui_pixelation.effective_pixel_size_changed.connect( _on_effective_ui_pixel_size_changed @@ -1130,19 +876,16 @@ 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.slot_play_requested.connect(_on_slot_play_requested) - title_screen.new_slot_requested.connect(_on_new_slot_requested) + title_screen.new_game_requested.connect(_on_new_game_requested) + title_screen.continue_game_requested.connect(_on_continue_game_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( @@ -1190,7 +933,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 = "straywild player data" + _data_setup_dialog.title = "NETfishing 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) @@ -1207,14 +950,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 straywild data to an easy-to-find folder." - if legacy else "Choose where straywild stores your player data.") + ("Move your existing NETfishing data to an easy-to-find folder." + if legacy else "Choose where NETfishing 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/straywild" + "Move to Documents/NETFISHING" if legacy else "Use This Folder" ) if not default_path.is_empty() @@ -1223,7 +966,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 straywild data folder is unavailable.\n\n%s" + "Your NETfishing data folder is unavailable.\n\n%s" % _data_root.error_message ) _data_setup_dialog.popup_centered(Vector2i(640, 360)) @@ -1359,11 +1102,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 straywild data" + dialog.title = "Existing NETfishing data" dialog.ok_button_text = "Use Data Already in Selected Folder" dialog.cancel_button_text = "Cancel" dialog.dialog_text = ( - "This folder already contains straywild player data.\n\n" + "This folder already contains NETfishing player data.\n\n" + "Choose which complete data set to use. Data is never merged automatically." ) dialog.add_button( @@ -1437,18 +1180,6 @@ 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, @@ -1567,12 +1298,6 @@ 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 @@ -1671,54 +1396,19 @@ 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 ( - _rv_upgrade_shop_interaction != null - and _rv_upgrade_shop_interaction.is_local_player_in_range() + _storage_interaction != null + and _storage_interaction.is_local_player_in_range() and _fishing_spot.can_open_fishing_shop() - and _game_ui.get_rv_upgrade_shop().open_shop() + and _game_ui.get_player_storage().open_storage() ): - _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) + _game_ui.set_storage_prompt_visible(false) get_viewport().set_input_as_handled() return if ( @@ -1731,58 +1421,40 @@ 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 - _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 show_shop_prompt := _can_show_shop_prompt() var shop_prompt_anchor := ( - _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 - ) - ) + _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 home_prompt := _get_home_prompt() - _refresh_home_door_prompt(home_prompt) - _game_ui.set_rv_storage_button_visible( - _can_show_rv_storage_button() + 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, ) func _apply_runtime_settings(settings: PlayerSettingsType) -> void: if settings == null: return - var current_window_mode: DisplayServer.WindowMode = ( - DisplayServer.window_get_mode() + var requested_window_mode: DisplayServer.WindowMode = ( + DisplayServer.WINDOW_MODE_FULLSCREEN + if settings.fullscreen_enabled + else DisplayServer.WINDOW_MODE_WINDOWED ) - var requested_window_mode: DisplayServer.WindowMode = resolve_window_mode( - settings.fullscreen_enabled, - current_window_mode, - ) - if current_window_mode != requested_window_mode: + if DisplayServer.window_get_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) @@ -1795,8 +1467,7 @@ func _apply_runtime_settings(settings: PlayerSettingsType) -> void: _player.apply_camera_settings( settings.mouse_camera_sensitivity, settings.controller_camera_sensitivity, - settings.invert_camera_y, - settings.swap_hotbar_camera_scroll, + settings.invert_camera_y ) _fishing_spot.configure_accessibility_auto_click( settings.auto_click_enabled, @@ -1809,25 +1480,6 @@ 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 @@ -1913,10 +1565,7 @@ func _on_natural_time_advanced(advanced_hours: float) -> void: ) ): _dusk_music_played_for_natural_day = true - if ( - _dusk_music.stream != null - and not _new_game_music.playing - ): + if _dusk_music.stream != null: _dusk_music.play(0.0) @@ -2017,34 +1666,16 @@ func _resize_native_overlays() -> void: _shop_backdrop.size = Vector2(get_window().size) -func _on_new_game_requested( - world_layout: StringName, - world_seed: int, -) -> void: +func _on_new_game_requested() -> void: if _gameplay_started or _quit_in_progress: 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) + or not _save_manager.initialize_new_game() ): _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. Existing data was preserved where possible." ) @@ -2055,114 +1686,14 @@ func _on_new_game_requested( func _on_continue_game_requested() -> void: if _gameplay_started or _quit_in_progress: return + if not _prepare_private_host(): + return if not _save_manager.load_player_data(): + _network_session.disconnect_session("Continue failed.") _game_ui.get_title_screen().report_network_error( "Failed to load save. 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 - _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() @@ -2185,18 +1716,6 @@ func _prepare_private_host() -> bool: return true -func _prepare_host_world( - world_layout: StringName, - world_seed: int, -) -> bool: - if _network_session.state in [ - NetworkSessionType.State.CONNECTION_FAILED, - NetworkSessionType.State.SERVER_LOST, - ]: - _network_session.reset_failure() - return _network_session.set_host_world(world_layout, world_seed) - - func _enter_gameplay() -> void: _fade_out_title_music() _game_ui.get_title_screen().hide() @@ -2222,12 +1741,6 @@ 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 @@ -2261,135 +1774,6 @@ 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() @@ -2421,15 +1805,10 @@ 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() _game_ui.get_title_screen().hide() _set_gameplay_active(true) elif _join_requested_from_pause: - if not _apply_joined_world(server_metadata): - return _set_gameplay_active(true) _join_requested_from_title = false _join_requested_from_pause = false @@ -2509,9 +1888,17 @@ func _on_remote_recovery_requested( peer_id, "Fishing attempt ended." ) - var target_position := _test_world.get_water_recovery_position( - entry_position - ) + 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 target_position.y += _water_recovery.respawn_height_offset avatar.global_position = target_position avatar.velocity = Vector3.ZERO @@ -2525,15 +1912,7 @@ func _on_reset_progress_requested() -> void: if not _save_manager.delete_progression_save(): pause_menu.report_reset_failure() return - var world_seed: int = PlayerSaveManager.roll_world_seed() - if not _save_manager.initialize_new_game( - world_seed, - WorldLayoutType.GENERATED, - ): - pause_menu.report_reset_failure() - return - _network_session.disconnect_session("Progress reset.") - if not _apply_world(WorldLayoutType.GENERATED, world_seed, true): + if not _save_manager.initialize_new_game(): pause_menu.report_reset_failure() return pause_menu.close_for_title_transition() @@ -2542,148 +1921,6 @@ func _on_reset_progress_requested() -> void: _show_title_music(true) -func _apply_joined_world(server_metadata: Dictionary) -> bool: - var world_layout: StringName = WorldLayoutType.normalized( - server_metadata.get( - "world_layout", - String(WorldLayoutType.GENERATED), - ), - &"", - ) - var world_seed: int = int(server_metadata.get("world_seed", 0)) - if ( - not world_layout.is_empty() - and _apply_world(world_layout, world_seed, true) - ): - return true - _network_session.disconnect_session("World generation failed.") - _join_requested_from_title = false - _join_requested_from_pause = false - _set_gameplay_active(false) - var title_screen: TitleScreenType = _game_ui.get_title_screen() - title_screen.reopen_to_menu() - title_screen.report_network_error( - "The host's world could not be built locally." - ) - _show_title_music(true) - return false - - -func _apply_world( - world_layout: StringName, - world_seed: int, - reposition_player: bool, -) -> bool: - if not _test_world.activate_world(world_layout, world_seed): - return false - var spawn_transform: Transform3D = _test_world.get_player_spawn_transform() - _player_spawn_service.set_spawn_transform(spawn_transform) - if reposition_player: - _player.global_transform = spawn_transform - _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, - _test_world.get_saltwater_shoreline_mesh(), - ) - return true - - -func _refresh_active_world_bindings() -> void: - if is_instance_valid(_shop_interaction): - if _shop_interaction.local_player_range_changed.is_connected( - _on_shop_range_changed - ): - _shop_interaction.local_player_range_changed.disconnect( - _on_shop_range_changed - ) - if is_instance_valid(_storage_interaction): - if _storage_interaction.local_player_range_changed.is_connected( - _on_storage_range_changed - ): - _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: - _shop_interaction.setup_local_player(_player) - _shop_interaction.local_player_range_changed.connect( - _on_shop_range_changed - ) - if _storage_interaction != null: - _storage_interaction.setup_local_player(_player) - _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 - and _shop_interaction.is_local_player_in_range() - ) - _on_storage_range_changed( - _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: _local_recovery_attempt_id = ( "recovery:%s" @@ -2695,8 +1932,6 @@ 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() @@ -2745,7 +1980,6 @@ 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 @@ -2759,12 +1993,6 @@ 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, @@ -2775,7 +2003,6 @@ 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) @@ -2813,7 +2040,6 @@ func _on_quit_requested() -> void: func _show_title_music(restart_from_beginning: bool = false) -> void: - _new_game_music.stop() _title_music_requested = true _replace_title_music_transition() if _title_music.stream == null: @@ -2825,19 +2051,6 @@ func _show_title_music(restart_from_beginning: bool = false) -> void: _title_music.play(0.0) -func _start_new_game_music() -> void: - if _new_game_music.stream == null: - return - _title_music_requested = false - _replace_title_music_transition() - _title_music.stop() - _title_music.volume_db = title_music_volume_db - _dusk_music.stop() - _new_game_music.stop() - _new_game_music.volume_db = new_game_music_volume_db - _new_game_music.play(0.0) - - func _fade_out_title_music(on_complete: Callable = Callable()) -> void: _title_music_requested = false var generation: int = _replace_title_music_transition() @@ -2895,8 +2108,6 @@ 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: @@ -2905,233 +2116,22 @@ func _exit_tree() -> void: if is_instance_valid(_title_music): _title_music.stop() _title_music.stream = null - if is_instance_valid(_new_game_music): - _new_game_music.stop() - _new_game_music.stream = null if is_instance_valid(_dusk_music): _dusk_music.stop() _dusk_music.stream = null func _on_shop_range_changed(in_range: bool) -> void: - _refresh_shop_npc_speech_state() + _game_ui.set_shop_npc_player_in_range(in_range) if not in_range: _game_ui.get_fishing_shop().close_for_range_exit() - _game_ui.set_shop_prompt_visible(_can_show_any_shop_prompt()) + _game_ui.set_shop_prompt_visible(_can_show_shop_prompt()) func _on_storage_range_changed(in_range: bool) -> void: if not in_range: _game_ui.get_player_storage().close_for_range_exit() - 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) + _game_ui.set_storage_prompt_visible(_can_show_storage_prompt()) func _can_show_shop_prompt() -> bool: @@ -3140,141 +2140,18 @@ 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 not _network_home.get_local_home_owner_fingerprint().is_empty() - and _network_home.can_local_decorate() + 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 _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 778a1d4..d48f42e 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="Texture2D" uid="uid://doju2lbj2ghwa" path="res://world/generation/chunks/assets/chunk_0000_grass_lite.png" id="40_title_grass"] +[ext_resource type="Shader" uid="uid://c8s1g7tn771du" path="res://ui/title_water_background.gdshader" id="40_title_water"] [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,17 +58,19 @@ [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_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_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_player_menu_pattern"] shader = ExtResource("42_menu_pattern") @@ -137,7 +139,7 @@ layer = -1 [node name="TitleBackground" type="ColorRect" parent="TitleBackgroundLayer" unique_id=1768697365] unique_name_in_owner = true -material = SubResource("ShaderMaterial_title_grass_native") +material = SubResource("ShaderMaterial_title_water_native") anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -263,14 +265,6 @@ 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") @@ -304,11 +298,48 @@ unique_name_in_owner = true script = ExtResource("36_player_list") [node name="TestWorld" parent="." unique_id=1334932296 instance=ExtResource("1_world")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.4475808, 0, -1.8959346) [node name="Sun" parent="TestWorld/Environment" index="1"] transform = Transform3D(0.8480481, 0.4287137, -0.31147876, 0, 0.5877853, 0.809017, 0.52991927, -0.68608534, 0.49847022, 0, 0, 0) +[node name="Shape" parent="TestWorld/Regions/StarterIslandRegion/Terrain/Collision" index="0" unique_id=674742331] +shape = SubResource("ConcavePolygonShape3D_hifdc") + +[node name="Pond" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies" index="0" unique_id=995477450] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.4, 2.51, 2.1) + +[node name="VisualWater" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond" index="0" unique_id=1034265960] +mesh = SubResource("PlaneMesh_7ny4s") + +[node name="Shape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond/FishingRegion" index="0" unique_id=1185360438] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0) +shape = SubResource("BoxShape3D_agj3o") + +[node name="Shape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond/RecoveryRegion" index="0" unique_id=1718808476] +shape = SubResource("BoxShape3D_l6210") + +[node name="VisualWater" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean" index="0" unique_id=1176408937] +mesh = SubResource("PlaneMesh_6upbg") + +[node name="Shape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/FishingRegions/OceanFishingRegion" index="0" unique_id=357406062] +shape = SubResource("BoxShape3D_umo15") + +[node name="WestShape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/RecoveryRegions/OceanRecoveryRegion" index="0" unique_id=1183368645] +shape = SubResource("BoxShape3D_1fdkm") + +[node name="EastShape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/RecoveryRegions/OceanRecoveryRegion" index="1" unique_id=1742419808] +shape = SubResource("BoxShape3D_y2c0j") + +[node name="NorthShape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/RecoveryRegions/OceanRecoveryRegion" index="2" unique_id=1844920260] +shape = SubResource("BoxShape3D_uwwqy") + +[node name="SouthShape" parent="TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/RecoveryRegions/OceanRecoveryRegion" index="3" unique_id=1316495770] +shape = SubResource("BoxShape3D_hf28p") + +[node name="FishingShopWorld" parent="TestWorld/Regions/StarterIslandRegion/Interactables" index="0" unique_id=1255373524] +transform = Transform3D(-0.9976046, 0, -0.06917416, 0, 1, 0, 0.06917416, 0, -0.9976046, 7.3292284, 3.4012775, 14.888193) + [node name="BelowWorldFailsafe" parent="TestWorld/Safety" index="0"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -7, 0) @@ -334,10 +365,6 @@ 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") @@ -354,10 +381,6 @@ 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") @@ -375,10 +398,6 @@ unique_name_in_owner = true volume_db = -80.0 bus = &"Music" -[node name="NewGameMusic" type="AudioStreamPlayer" parent="."] -unique_name_in_owner = true -bus = &"Music" - [node name="DuskMusic" type="AudioStreamPlayer" parent="." unique_id=992744241] unique_name_in_owner = true bus = &"Music" @@ -417,3 +436,4 @@ unique_name_in_owner = true unique_name_in_owner = true [editable path="TestWorld"] +[editable path="TestWorld/Regions/StarterIslandRegion"] diff --git a/main/runtime_performance_profile.gd b/main/runtime_performance_profile.gd index f18e63a..ee2581d 100644 --- a/main/runtime_performance_profile.gd +++ b/main/runtime_performance_profile.gd @@ -2,13 +2,9 @@ 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 NETFISHING_LIGHT_ENVIRONMENT_VARIABLE := "NETFISHING_LOW_END" +const LEGACY_LIGHT_ENVIRONMENT_VARIABLE: String = "NETFISHING_LOW_END" const NORMAL_PROFILE: StringName = &"normal" const LIGHT_PROFILE: StringName = &"light" const NORMAL_WORLD_RENDER_SCALE: float = 1.0 @@ -18,19 +14,9 @@ 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(profile_name), - ( - OS.get_environment(LEGACY_LIGHT_ENVIRONMENT_VARIABLE) == "1" - or OS.get_environment(NETFISHING_LIGHT_ENVIRONMENT_VARIABLE) == "1" - ), + StringName(OS.get_environment(PROFILE_ENVIRONMENT_VARIABLE)), + OS.get_environment(LEGACY_LIGHT_ENVIRONMENT_VARIABLE) == "1", ) diff --git a/main/texture_sampling_policy.gd b/main/texture_sampling_policy.gd index 35a92a0..3d041d0 100644 --- a/main/texture_sampling_policy.gd +++ b/main/texture_sampling_policy.gd @@ -1,6 +1,6 @@ extends Node -## Enforces straywild's nearest-neighbor-only artwork policy at runtime. +## Enforces NETfishing'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,12 +15,8 @@ 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 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)) + # add_child(). Recheck once deferred so those resources are covered too. + call_deferred("_enforce_deferred_node", weakref(node)) func _enforce_existing_tree() -> void: @@ -33,15 +29,6 @@ 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 d8e602a..bf15bbf 100644 --- a/network/discovery_client.gd +++ b/network/discovery_client.gd @@ -9,24 +9,14 @@ 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 = "straywild_DISCOVERY_URL" -const LEGACY_BASE_URL_ENVIRONMENT: String = "NETFISHING_DISCOVERY_URL" +const 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 = "straywild Room" +const LEGACY_DEFAULT_ROOM_NAME: String = "NETfishing Room" const LEGACY_DEDICATED_DEFAULT_ROOM_NAME: String = ( - "straywild Dedicated Server" + "NETfishing Dedicated Server" ) const ROOM_NAME_SUFFIX: String = "'s Server" const MAX_ROOM_NAME_LENGTH: int = 48 @@ -34,11 +24,10 @@ 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 = "straywild_TRAVERSAL_V1 " +const TRAVERSAL_PACKET_PREFIX: String = "NETFISHING_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, @@ -66,7 +55,6 @@ 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 @@ -104,18 +92,6 @@ 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: @@ -171,48 +147,16 @@ 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, - relationships: PlayerRelationshipStore = null, -) -> void: +func setup(session: NetworkSession) -> 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): @@ -229,9 +173,6 @@ func setup( 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: @@ -242,112 +183,6 @@ 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("/"): @@ -510,7 +345,7 @@ func prepare_public_join(room: Dictionary) -> bool: func request_rooms() -> bool: if not is_configured(): - rooms_updated.emit(_empty_rooms()) + rooms_updated.emit([]) browse_status_changed.emit( "Public room discovery is not configured in this build.", true ) @@ -527,7 +362,7 @@ func request_rooms() -> bool: ] var error: Error = _browse_request.request(url) if error != OK: - rooms_updated.emit(_empty_rooms()) + rooms_updated.emit([]) browse_status_changed.emit("Could not request public rooms.", true) return false _browse_request_in_flight = true @@ -554,10 +389,6 @@ 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("/"): @@ -565,7 +396,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 straywild discovery URL.") + push_warning("Ignored invalid NETfishing discovery URL.") return "" return value @@ -814,7 +645,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 = "straywild_PUNCH_V1".to_utf8_buffer() + var punch: PackedByteArray = "NETFISHING_PUNCH_V1".to_utf8_buffer() for _attempt: int in 3: _session.send_traversal_packet(address, port, punch) @@ -900,13 +731,13 @@ func _configure_upnp_mapping(port: int) -> Dictionary: var mapping_result: int = upnp.add_port_mapping( port, port, - "straywild", + "NETfishing", "UDP", UPNP_MAPPING_DURATION_SECONDS, ) if mapping_result == UPNP.UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED: mapping_result = upnp.add_port_mapping( - port, port, "straywild", "UDP", 0 + port, port, "NETfishing", "UDP", 0 ) return { "success": mapping_result == UPNP.UPNP_RESULT_SUCCESS, @@ -982,12 +813,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(_empty_rooms()) + rooms_updated.emit([]) 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(_empty_rooms()) + rooms_updated.emit([]) browse_status_changed.emit("Discovery returned an invalid room list.", true) return var rooms: Array[Dictionary] = [] @@ -1042,309 +873,6 @@ 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 {} @@ -1379,38 +907,23 @@ func _discovery_version_mismatch_message(required_version: String) -> String: match rejection: NetworkProtocol.RejectionCode.CLIENT_OUTDATED: return ( - "Your straywild version is out of date. Update to %s to " + "Your NETfishing 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 straywild %s. This room " + "Public discovery is still on NETfishing %s. This room " + "will not be listed until discovery is updated for %s." ) % [required_version, local_version] _: return ( - "Public discovery requires straywild %s. This room will " + "Public discovery requires NETfishing %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) @@ -1466,7 +979,6 @@ 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: @@ -1527,10 +1039,6 @@ 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", " ") @@ -1557,7 +1065,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 [ @@ -1565,9 +1073,6 @@ func _load_settings() -> void: LEGACY_DEFAULT_ROOM_NAME, LEGACY_DEDICATED_DEFAULT_ROOM_NAME, ], - )) - _presence_sharing = bool(config.get_value( - "social", "share_presence", false )) @@ -1579,7 +1084,6 @@ 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 local straywild discovery settings.") + push_warning("Could not save the local NETfishing room name.") diff --git a/network/host_ban_store.gd b/network/host_ban_store.gd index 1251846..f8c4bf9 100644 --- a/network/host_ban_store.gd +++ b/network/host_ban_store.gd @@ -17,10 +17,6 @@ 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 c383e7b..ff7396c 100644 --- a/network/identity_backup_service.gd +++ b/network/identity_backup_service.gd @@ -3,8 +3,7 @@ extends Node signal operation_finished(success: bool, message: String) -const MAGIC := "straywild_IDENTITY_BACKUP" -const LEGACY_MAGIC := "NETFISHING_IDENTITY_BACKUP" +const MAGIC := "NETFISHING_IDENTITY_BACKUP" const FORMAT_VERSION := 1 const MAX_BACKUP_BYTES := 256 * 1024 const MIN_PASSPHRASE_LENGTH := 12 @@ -111,9 +110,8 @@ 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") not in [MAGIC, LEGACY_MAGIC] + data.get("magic") != MAGIC or data.get("format_version") != FORMAT_VERSION or data.get("identity_type") != expected_type or data.get("algorithm") != NetworkIdentityCrypto.ALGORITHM @@ -136,23 +134,12 @@ func inspect_backup( var signature: PackedByteArray = Marshalls.base64_to_raw( str(data.get("self_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: + if not NetworkIdentityCrypto.verify_fields( + NetworkIdentityCrypto.load_public_key(public_pem), + "identity_backup_self_test", + [expected_type, fingerprint], + signature, + ): return {"ok": false} var fresh: PackedByteArray = NetworkIdentityCrypto.sign_fields( key, "identity_import_self_test", [fingerprint] @@ -202,7 +189,7 @@ func import_backup( ) _finish( bool(result.get("ok", false)), - "Identity imported. Restart straywild before multiplayer." + "Identity imported. Restart NETfishing 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 1118656..0c6b859 100644 --- a/network/known_player_store.gd +++ b/network/known_player_store.gd @@ -15,10 +15,6 @@ 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_protocol.gd b/network/network_chat_protocol.gd index 2e91432..ef7294d 100644 --- a/network/network_chat_protocol.gd +++ b/network/network_chat_protocol.gd @@ -9,13 +9,6 @@ const MAX_HISTORY: int = 100 const LATE_JOIN_HISTORY: int = 50 const MAX_ID_LENGTH: int = 96 -static var _invisible_edge_pattern: RegEx = RegEx.create_from_string( - "^[\\s\\p{Z}\\p{Cf}\\x{2800}]+|[\\s\\p{Z}\\p{Cf}\\x{2800}]+$" -) -static var _visible_content_pattern: RegEx = RegEx.create_from_string( - "[^\\s\\p{Z}\\p{Cf}\\x{2800}]" -) - enum Kind { PLAYER, SYSTEM } @@ -23,13 +16,8 @@ static func sanitize_body(value: Variant) -> String: if typeof(value) != TYPE_STRING: return "" var result: String = str(value).replace("\r", " ").replace("\n", " ") - result = result.replace("\t", " ") - result = _invisible_edge_pattern.sub(result, "", true) - if ( - result.is_empty() - or _visible_content_pattern.search(result) == null - or result.length() > MAX_VISIBLE_CHARACTERS - ): + result = result.replace("\t", " ").strip_edges() + if result.is_empty() or result.length() > MAX_VISIBLE_CHARACTERS: return "" if result.to_utf8_buffer().size() > MAX_UTF8_BYTES: return "" diff --git a/network/network_chat_service.gd b/network/network_chat_service.gd index 55ba768..0502a38 100644 --- a/network/network_chat_service.gd +++ b/network/network_chat_service.gd @@ -4,11 +4,7 @@ extends Node 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." -) +const CALL_COOLDOWN_MILLISECONDS: int = 180 const CALL_PITCH_VARIANTS: Array[float] = [ 0.96, 1.03, @@ -41,34 +37,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 = "" - - -func configure_dedicated_history(enabled: bool, log_path: String) -> bool: - _dedicated_history_enabled = false - _chat_log_path = "" - if not enabled: - return true - var normalized_path: String = log_path.strip_edges() - if normalized_path.is_empty() or not normalized_path.is_absolute_path(): - return false - var directory: String = normalized_path.get_base_dir() - if DirAccess.make_dir_recursive_absolute(directory) != OK: - return false - var file: FileAccess - if FileAccess.file_exists(normalized_path): - file = FileAccess.open(normalized_path, FileAccess.READ_WRITE) - else: - file = FileAccess.open(normalized_path, FileAccess.WRITE) - if file == null: - return false - file.close() - _dedicated_history_enabled = true - _chat_log_path = normalized_path - return true func setup(session: NetworkSession) -> void: @@ -319,8 +288,7 @@ func _handle_request(peer_id: int, data: Dictionary) -> void: var request_id: String = data["request_id"] var ledger: Dictionary = _request_ledgers.get(peer_id, {}) if ledger.has(request_id): - if typeof(ledger[request_id]) == TYPE_DICTIONARY: - _send_message(peer_id, ledger[request_id]) + _send_message(peer_id, ledger[request_id]) return if not _consume_rate(peer_id): _send_rejection(peer_id, "Slow down.") @@ -340,11 +308,7 @@ func _handle_request(peer_id: int, data: Dictionary) -> void: message["request_id"] = request_id message["sender_fingerprint"] = data["sender_fingerprint"] message["sender_signature"] = data["sender_signature"] - ledger[request_id] = ( - message.duplicate(true) - if _should_store_host_history() - else true - ) + ledger[request_id] = message.duplicate(true) while ledger.size() > 64: ledger.erase(ledger.keys().front()) _request_ledgers[peer_id] = ledger @@ -420,11 +384,9 @@ 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.identity_fingerprint == str(data["sender_fingerprint"]) + record != null + and record.identity_fingerprint == str(data["sender_fingerprint"]) and _session.verify_peer_action( sender_id, "chat_send", @@ -442,12 +404,9 @@ func _apply_message( kind == NetworkChatProtocol.Kind.PLAYER and is_sender_filtered(str(data.get("sender_fingerprint", ""))) ) - if _should_store_local_history(): - _history.append(stored_message) - while _history.size() > NetworkChatProtocol.MAX_HISTORY: - _history.pop_front() - if _should_log_message(stored_message): - _append_chat_log(stored_message) + _history.append(stored_message) + while _history.size() > NetworkChatProtocol.MAX_HISTORY: + _history.pop_front() if emit_live_signals and _message_is_visible(stored_message): message_received.emit(stored_message.duplicate(true)) if ( @@ -470,70 +429,12 @@ 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 - var history: Array[Dictionary] = [] - if _dedicated_history_enabled and _session.is_dedicated_host(): - var start := maxi( - 0, - _history.size() - NetworkChatProtocol.LATE_JOIN_HISTORY, - ) - history = _history.slice(start) - # An explicit empty replacement is intentional for player-hosted rooms and - # dedicated servers without logging. It destroys any stale client scrollback - # instead of replaying another player's live-session chat on reconnect. - receive_chat_history.rpc_id(peer_id, history) - if _dedicated_history_enabled and _session.is_dedicated_host(): - # Deliver the disclosure as a live system message after scrollback. This - # raises the normal unread indicator without creating speech or audio. - _send_message(peer_id, _make_message( - NetworkChatProtocol.Kind.SYSTEM, - 0, - "", - DEDICATED_CHAT_WARNING, - )) + var start := maxi(0, _history.size() - NetworkChatProtocol.LATE_JOIN_HISTORY) + receive_chat_history.rpc_id(peer_id, _history.slice(start)) _broadcast(_make_message( NetworkChatProtocol.Kind.SYSTEM, 0, "", "%s joined." % display_name )) @@ -544,7 +445,6 @@ 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") @@ -594,44 +494,6 @@ func _consume_rate(peer_id: int) -> bool: return true -func _should_store_host_history() -> bool: - return ( - _session == null - or not _session.is_dedicated_host() - or _dedicated_history_enabled - ) - - -func _should_store_local_history() -> bool: - return _should_store_host_history() - - -func _should_log_message(message: Dictionary) -> bool: - return ( - _dedicated_history_enabled - and not _chat_log_path.is_empty() - and _session != null - and _session.is_dedicated_host() - and int(message.get("kind", -1)) == NetworkChatProtocol.Kind.PLAYER - ) - - -func _append_chat_log(message: Dictionary) -> void: - var file := FileAccess.open(_chat_log_path, FileAccess.READ_WRITE) - if file == null: - push_error("The configured dedicated-server chat log is unavailable.") - return - file.seek_end() - file.store_line(JSON.stringify({ - "recorded_at_utc": ( - Time.get_datetime_string_from_system(true, false) + "Z" - ), - "sender_display_name": str(message.get("sender_display_name", "")), - "body": str(message.get("body", "")), - })) - file.close() - - func _on_session_state_changed(state: NetworkSession.State) -> void: if state in [ NetworkSession.State.INACTIVE, @@ -646,7 +508,6 @@ 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 2ecd1ee..d69e9dd 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.SHOWCASE_RELIABLE_CHANNEL +const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_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 d956240..068ee7d 100644 --- a/network/network_fish_showcase_service.gd +++ b/network/network_fish_showcase_service.gd @@ -7,7 +7,6 @@ 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 @@ -16,8 +15,6 @@ 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 @@ -57,30 +54,6 @@ 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 @@ -105,7 +78,6 @@ 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 ) @@ -194,11 +166,6 @@ 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 @@ -300,8 +267,6 @@ 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_attempt.gd b/network/network_fishing_attempt.gd index 638b4da..84511db 100644 --- a/network/network_fishing_attempt.gd +++ b/network/network_fishing_attempt.gd @@ -22,7 +22,6 @@ var target: Vector3 var bobber_position: Vector3 var fish_id: StringName var rod_id: StringName -var bait_id: StringName var bait_tags: Array[StringName] = [] var lure_effects: Array[StringName] = [] var encounter_seed: int = 0 diff --git a/network/network_fishing_protocol.gd b/network/network_fishing_protocol.gd index 7f15fdd..8df59b7 100644 --- a/network/network_fishing_protocol.gd +++ b/network/network_fishing_protocol.gd @@ -8,8 +8,6 @@ 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 @@ -37,7 +35,6 @@ 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." @@ -54,16 +51,11 @@ 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"] @@ -100,8 +92,6 @@ 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 8c9c798..e1dfe56 100644 --- a/network/network_fishing_service.gd +++ b/network/network_fishing_service.gd @@ -21,8 +21,6 @@ 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) @@ -53,13 +51,7 @@ 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( @@ -75,7 +67,6 @@ func setup( item_catalog: ItemCatalog, fish_catalog: FishPoolType, item_use: NetworkItemUseService, - presentation_enabled: bool = true, ) -> void: _session = session _spawn_service = spawn_service @@ -89,7 +80,6 @@ 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): @@ -140,7 +130,6 @@ 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) @@ -179,7 +168,6 @@ func cancel_local_attempt(reason: String = "Fishing attempt ended.") -> void: if _session.is_host(): _cancel_attempt(peer_id, reason) else: - _pending_local_bait_by_request.erase(attempt.request_id) submit_cancel_request.rpc_id(1, attempt.attempt_id) @@ -224,27 +212,15 @@ 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_owner_snapshots() - if _observer_snapshot_accumulator >= OBSERVER_SNAPSHOT_INTERVAL: - _observer_snapshot_accumulator = fmod( - _observer_snapshot_accumulator, - OBSERVER_SNAPSHOT_INTERVAL, - ) - _broadcast_observer_snapshots() + _broadcast_snapshots() -@rpc( - "any_peer", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("any_peer", "call_remote", "reliable", 0) 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): @@ -291,13 +267,7 @@ 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 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(), - ) + var authoritative_origin: Vector3 = 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 @@ -308,10 +278,7 @@ func _handle_cast_request(peer_id: int, data: Dictionary) -> void: _fishing_spot.maximum_cast_distance, float(data["charge"]) ) - var facing: Vector3 = movement_state.get( - "facing", - avatar.get_facing_direction(), - ) + var facing: Vector3 = avatar.get_facing_direction() facing.y = 0.0 if ( cast_offset.length() < _fishing_spot.minimum_cast_distance - 0.25 @@ -394,7 +361,7 @@ func _handle_cast_request(peer_id: int, data: Dictionary) -> void: owns_authoritative_bag and ( avatar_bag == null - or not avatar_bag.owns_item(bait_id) + or not avatar_bag.remove_item(bait_id, 1) ) ) ): @@ -411,7 +378,6 @@ func _handle_cast_request(peer_id: int, data: Dictionary) -> void: attempt.bobber_position = authoritative_target attempt.fish_id = selected_fish.id attempt.rod_id = rod.item_id - attempt.bait_id = bait_id attempt.bait_tags = _bait_tags_for_request(data) attempt.lure_effects.clear() if lure != null: @@ -598,6 +564,7 @@ func _start_bite(attempt: NetworkFishingAttempt) -> void: _cancel_attempt(attempt.owner_peer_id, "Fishing attempt ended.") return attempt.bite_confirmation_pending = false + attempt.phase = NetworkFishingAttempt.Phase.FIGHTING attempt.encounter_seed = _new_seed() var selector := FishSelectorType.new() selector.active_rod = rod @@ -608,17 +575,6 @@ func _start_bite(attempt: NetworkFishingAttempt) -> void: if fish_catch == null or not fish_catch.is_valid(): _cancel_attempt(attempt.owner_peer_id, "Fishing attempt ended.") return - if ( - attempt.owner_peer_id == _session.get_local_peer_id() - and not attempt.bait_id.is_empty() - and ( - _local_bag == null - or not _local_bag.remove_item(attempt.bait_id, 1) - ) - ): - _cancel_attempt(attempt.owner_peer_id, "No bait available.") - return - attempt.phase = NetworkFishingAttempt.Phase.FIGHTING attempt.catch_payload = fish_catch.to_network_dict() attempt.controller.start_authoritative_encounter( fish.catch_profile, @@ -674,12 +630,7 @@ func _handle_fishing_input(peer_id: int, data: Dictionary) -> void: attempt.controller.handle_primary_pressed() -@rpc( - "any_peer", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("any_peer", "call_remote", "reliable", 0) func submit_cancel_request(attempt_id: String) -> void: var sender_id: int = multiplayer.get_remote_sender_id() var attempt: NetworkFishingAttempt = _attempts.get(sender_id) @@ -724,59 +675,16 @@ func _on_encounter_updated( }) -func _broadcast_owner_snapshots() -> void: +func _broadcast_snapshots() -> void: + var snapshots: Array[Dictionary] = [] for attempt: NetworkFishingAttempt in _attempts.values(): var snapshot: Dictionary = attempt.get_meta("snapshot", {}) - 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(): + if not snapshot.is_empty(): + snapshots.append(snapshot) + if snapshots.is_empty(): return - 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() + _apply_snapshots(snapshots) + receive_fishing_snapshots.rpc(snapshots) @rpc("authority", "call_remote", "unreliable_ordered", 4) @@ -784,55 +692,6 @@ 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: @@ -939,12 +798,7 @@ func _on_attempt_caught(peer_id: int) -> void: receive_capacity_probe.rpc_id(peer_id, probe) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_capacity_probe(data: Dictionary) -> void: _handle_local_capacity_probe(data) @@ -978,12 +832,7 @@ func _handle_local_capacity_probe(data: Dictionary) -> void: ) -@rpc( - "any_peer", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("any_peer", "call_remote", "reliable", 0) func submit_capacity_response( attempt_id: String, capacity_nonce: String, @@ -1041,12 +890,7 @@ func _finalize_catch(attempt: NetworkFishingAttempt) -> void: _dispose_attempt(attempt.owner_peer_id) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_target_outcome(data: Dictionary) -> void: _apply_target_outcome(data) @@ -1078,7 +922,7 @@ func _apply_target_outcome(data: Dictionary) -> void: ) ) _local_inventory.add_catch(fish_catch) - _local_collection.record_catch( + _local_collection.mark_quality_discovered( fish_id, fish_catch.quality, ) @@ -1114,12 +958,7 @@ 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", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("any_peer", "call_remote", "reliable", 0) func acknowledge_fishing_result(result_id: String, catch_id: String) -> void: var sender_id: int = multiplayer.get_remote_sender_id() if ( @@ -1176,12 +1015,7 @@ func _broadcast_public_outcome( receive_public_outcome.rpc(data) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_public_outcome(data: Dictionary) -> void: _apply_public_outcome(data) @@ -1197,13 +1031,6 @@ func _apply_public_outcome(data: Dictionary) -> void: if peer_id == _session.get_local_peer_id(): if str(data["outcome"]) != "catch": if not _session.is_host(): - var local_attempt: NetworkFishingAttempt = _attempts.get( - peer_id - ) - if local_attempt != null: - _pending_local_bait_by_request.erase( - local_attempt.request_id - ) _attempts.erase(peer_id) local_attempt_ended.emit( StringName(str(data["outcome"])), @@ -1233,12 +1060,7 @@ func _broadcast_cast_accepted(data: Dictionary) -> void: receive_cast_accepted.rpc(data) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_cast_accepted(data: Dictionary) -> void: _apply_cast_accepted(data) @@ -1269,23 +1091,28 @@ func _apply_cast_accepted(data: Dictionary) -> void: # On the host this replaces the same authoritative value with itself. if not _session.is_host(): _attempts[peer_id] = attempt + var pending_bait_id: StringName = ( + _pending_local_bait_by_request.get( + attempt.request_id, + StringName(), + ) + ) + _pending_local_bait_by_request.erase(attempt.request_id) + if not pending_bait_id.is_empty() and ( + _local_bag == null + or not _local_bag.remove_item(pending_bait_id, 1) + ): + cancel_local_attempt("No bait available.") + local_cast_rejected.emit("No bait available.") + return local_cast_accepted.emit(attempt.attempt_id, target) else: var presentation := _get_remote_presentation(peer_id) if presentation != null: - presentation.show_cast( - origin, - target, - str(data["attempt_id"]), - ) + presentation.show_cast(origin, target) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_bite_pending(data: Dictionary) -> void: _apply_bite_pending(data) @@ -1300,12 +1127,7 @@ func _apply_bite_pending(data: Dictionary) -> void: local_bite_pending.emit(str(data["attempt_id"])) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_bite_started(data: Dictionary) -> void: _apply_bite_started(data) @@ -1318,22 +1140,6 @@ func _apply_bite_started(data: Dictionary) -> void: return var peer_id: int = data["owner_peer_id"] if peer_id == _session.get_local_peer_id(): - if not _session.is_host(): - var attempt: NetworkFishingAttempt = _attempts.get(peer_id) - var pending_bait_id := StringName() - if attempt != null: - pending_bait_id = _pending_local_bait_by_request.get( - attempt.request_id, - StringName(), - ) - _pending_local_bait_by_request.erase(attempt.request_id) - if not pending_bait_id.is_empty() and ( - _local_bag == null - or not _local_bag.remove_item(pending_bait_id, 1) - ): - cancel_local_attempt("No bait available.") - local_cast_rejected.emit("No bait available.") - return local_bite_started.emit(str(data["attempt_id"])) else: var presentation := _get_remote_presentation(peer_id) @@ -1366,12 +1172,7 @@ func _send_cast_rejected( receive_cast_rejected.rpc_id(peer_id, request_id, message.left(128)) -@rpc( - "authority", - "call_remote", - "reliable", - NetworkFishingProtocol.RELIABLE_CHANNEL, -) +@rpc("authority", "call_remote", "reliable", 0) func receive_cast_rejected(request_id: String, message: String) -> void: _pending_local_bait_by_request.erase(request_id) local_cast_rejected.emit(message) @@ -1406,8 +1207,6 @@ 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 @@ -1461,12 +1260,12 @@ func _dispose_attempt(peer_id: int) -> void: attempt.controller.reset() attempt.controller.queue_free() var avatar: Player = _spawn_service.get_avatar(peer_id) - var local_fishing_sequence_is_active: bool = ( + var local_return_is_active: bool = ( peer_id == _session.get_local_peer_id() and _fishing_spot != null - and _fishing_spot.is_fishing_sequence_active() + and _fishing_spot.is_returning() ) - if avatar != null and not local_fishing_sequence_is_active: + if avatar != null and not local_return_is_active: avatar.set_movement_enabled(true) @@ -1508,23 +1307,10 @@ func _clear_all() -> void: _result_acknowledgements.clear() _last_cast_time.clear() _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 deleted file mode 100644 index 96756e9..0000000 --- a/network/network_home_protocol.gd +++ /dev/null @@ -1,188 +0,0 @@ -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 deleted file mode 100644 index 24b6aae..0000000 --- a/network/network_home_protocol.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://fl3qwiluejhm diff --git a/network/network_home_service.gd b/network/network_home_service.gd deleted file mode 100644 index 4885961..0000000 --- a/network/network_home_service.gd +++ /dev/null @@ -1,1450 +0,0 @@ -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 deleted file mode 100644 index be233ed..0000000 --- a/network/network_home_service.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ong8kug36ku7 diff --git a/network/network_identity_crypto.gd b/network/network_identity_crypto.gd index 9d4f09c..4886cca 100644 --- a/network/network_identity_crypto.gd +++ b/network/network_identity_crypto.gd @@ -5,8 +5,7 @@ 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 = "straywild" -const LEGACY_DOMAIN_PREFIX: String = "NETFISHING" +const DOMAIN_PREFIX: String = "NETFISHING" const IDENTITY_VERSION: String = "identity_v1" @@ -51,16 +50,8 @@ 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, prefix) + _append_string(output, DOMAIN_PREFIX) _append_string(output, IDENTITY_VERSION) _append_string(output, domain) for value: Variant in fields: @@ -126,37 +117,6 @@ 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 024eca9..7ae0f92 100644 --- a/network/network_item_use_service.gd +++ b/network/network_item_use_service.gd @@ -5,7 +5,6 @@ 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 @@ -48,7 +47,6 @@ 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: @@ -395,10 +393,6 @@ 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"]) ) @@ -442,12 +436,6 @@ 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 677df05..4742d14 100644 --- a/network/network_player_list_service.gd +++ b/network/network_player_list_service.gd @@ -3,15 +3,6 @@ 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 @@ -27,9 +18,6 @@ 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( @@ -86,18 +74,6 @@ 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 @@ -105,7 +81,6 @@ func get_entries() -> Array[PlayerListEntry]: and (_session.is_host() or not entry.is_operator) ) entry.can_ban = entry.can_kick - entry.can_clear_art = entry.can_kick entry.can_manage_operator = ( _session.can_manage_operators() and peer_id != local_id @@ -149,10 +124,6 @@ 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()) @@ -208,160 +179,6 @@ 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) @@ -372,20 +189,6 @@ func kick(peer_id: int, fingerprint: String, revision: int) -> bool: return true -func clear_art(peer_id: int, fingerprint: String, revision: int) -> bool: - if _session.is_host(): - return _clear_art_on_host( - peer_id, fingerprint, revision, true - ) - if not _session.is_local_operator(): - moderation_finished.emit( - false, "Only the host or an operator can clear player artwork." - ) - return false - request_clear_art.rpc_id(1, peer_id, fingerprint) - return true - - func ban( peer_id: int, fingerprint: String, @@ -454,23 +257,6 @@ func request_kick(peer_id: int, fingerprint: String) -> void: ) -@rpc("any_peer", "call_remote", "reliable", 0) -func request_clear_art(peer_id: int, fingerprint: String) -> void: - var sender_id: int = multiplayer.get_remote_sender_id() - if not _valid_operator_sender(sender_id): - return - var ok: bool = _clear_art_on_host( - peer_id, fingerprint, -1, false - ) - _send_moderation_result( - sender_id, - ok, - "Player artwork cleared." - if ok - else "Player artwork could not be cleared.", - ) - - @rpc("any_peer", "call_remote", "reliable", 0) func request_ban(peer_id: int, fingerprint: String) -> void: var sender_id: int = multiplayer.get_remote_sender_id() @@ -636,32 +422,6 @@ 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() @@ -677,9 +437,6 @@ 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() @@ -717,245 +474,6 @@ 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, @@ -1033,54 +551,12 @@ func _ban_on_host( if local_host_request: moderation_finished.emit(false, "Ban could not be saved.") return false - if _surface_drawing != null: - _surface_drawing.clear_artwork_by_fingerprint(fingerprint) var ok: bool = _session.kick_authenticated_peer(peer_id, fingerprint, true) if local_host_request: moderation_finished.emit(ok, "Player banned." if ok else "Ban saved.") return true -func _clear_art_on_host( - peer_id: int, - fingerprint: String, - revision: int, - local_host_request: bool, -) -> bool: - if not _valid_moderation_target( - peer_id, - fingerprint, - revision, - local_host_request, - local_host_request, - ): - if local_host_request: - moderation_finished.emit( - false, "That player is no longer connected." - ) - return false - if _surface_drawing == null: - if local_host_request: - moderation_finished.emit( - false, "Player artwork could not be cleared." - ) - return false - var affected_layers: int = ( - _surface_drawing.clear_artwork_by_fingerprint(fingerprint) - ) - var ok: bool = affected_layers >= 0 - if local_host_request: - moderation_finished.emit( - ok, - "Player artwork cleared." - if affected_layers > 0 - else "No shared artwork from that player was found." - if ok - else "Player artwork could not be cleared.", - ) - return ok - - func _reset_session_artwork_on_host( emit_local_result: bool = true, ) -> bool: diff --git a/network/network_profile_preferences.gd b/network/network_profile_preferences.gd index b6cac63..3c4996b 100644 --- a/network/network_profile_preferences.gd +++ b/network/network_profile_preferences.gd @@ -21,8 +21,6 @@ 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 ff967f1..da26d86 100644 --- a/network/network_profile_service.gd +++ b/network/network_profile_service.gd @@ -51,17 +51,6 @@ 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 @@ -108,10 +97,6 @@ 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, @@ -120,27 +105,20 @@ func preview_appearance(appearance: Dictionary) -> bool: elif _session.supports_server_capability( NetworkProtocol.APPEARANCE_PREVIEW_CAPABILITY ): - submit_appearance_preview.rpc_id(1, authorization) + 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) 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()) @@ -296,9 +274,6 @@ 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, @@ -507,16 +482,23 @@ func broadcast_profile_snapshot( or not CharacterCustomizationCatalog.validate_snapshot(appearance) ): return - if ( - not authorization.is_empty() - and not _session.verify_profile_authorization( - peer_id, - display_name, - appearance, - authorization, - ) - ): - 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 _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 5b3ca89..352fcc5 100644 --- a/network/network_protocol.gd +++ b/network/network_protocol.gd @@ -1,9 +1,7 @@ class_name NetworkProtocol extends RefCounted -const WorldLayoutType = preload("res://world/world_layout.gd") - -const PROTOCOL_VERSION: int = 12 +const PROTOCOL_VERSION: int = 8 const GAME_BUILD: String = "prealpha" const MAX_GAME_VERSION_LENGTH: int = 64 const MAX_DISPLAY_NAME_LENGTH: int = 24 @@ -13,25 +11,14 @@ 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, -# 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. +# 6 reliable shop transactions, 7 reliable item/equipment/showcase/drawing, +# 8 reliable ordered session chat, 9 reliable private session mail. 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 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 ENET_CHANNEL_COUNT: int = 10 const SURFACE_DRAWING_CAPABILITY: String = "surface_drawing_v2" const ART_SHOP_CAPABILITY: String = "art_shop_v1" const BACKPACK_SHOP_CAPABILITY: String = "backpack_shop_v1" @@ -41,15 +28,6 @@ const FISH_QUALITY_CAPABILITY: String = "fish_quality_v1" const JOBS_CAPABILITY: String = "jobs_v1" 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 enum RejectionCode { NONE, @@ -200,13 +178,6 @@ static func make_client_hello( WORLD_SPAWN_CAPABILITY, APPEARANCE_PREVIEW_CAPABILITY, 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, @@ -309,9 +280,7 @@ static func make_server_hello( assigned_peer_id: int, player_count: int, max_players: int, - server_display_name: String = "straywild", - world_seed: int = DEFAULT_WORLD_SEED, - world_layout: StringName = WorldLayoutType.GENERATED, + server_display_name: String = "NETfishing", ) -> Dictionary: return { "accepted": accepted, @@ -323,8 +292,6 @@ static func make_server_hello( "server_display_name": server_display_name, "player_count": player_count, "max_players": max_players, - "world_seed": world_seed, - "world_layout": String(world_layout), "capability_flags": PackedStringArray([ "movement_v1", "fishing_v1", @@ -342,13 +309,6 @@ static func make_server_hello( JOBS_CAPABILITY, WORLD_SPAWN_CAPABILITY, 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", @@ -379,17 +339,17 @@ static func rejection_text(code: int) -> String: return "You are not permitted to join this server." RejectionCode.CLIENT_OUTDATED: return ( - "Your straywild version is out of date. " + "Your NETfishing 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 straywild." + + "The host needs to update NETfishing." ) RejectionCode.VERSION_MISMATCH: return ( - "This game and server use different straywild versions. " + "This game and server use different NETfishing versions. " + "Update both to the latest release." ) _: diff --git a/network/network_sale_service.gd b/network/network_sale_service.gd index a80f221..9207266 100644 --- a/network/network_sale_service.gd +++ b/network/network_sale_service.gd @@ -14,7 +14,6 @@ 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" @@ -46,8 +45,6 @@ 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 @@ -55,25 +52,6 @@ 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, @@ -113,10 +91,6 @@ func setup( _session.state_changed.connect(_on_session_state_changed) -func set_shop_interaction(interaction: FishingShopInteraction) -> void: - _shop_interaction = interaction - - func is_local_sale_pending() -> bool: return not _pending_local_request_id.is_empty() @@ -230,8 +204,6 @@ 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 @@ -619,8 +591,6 @@ 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() @@ -756,8 +726,6 @@ 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 7c259e0..cc564b2 100644 --- a/network/network_session.gd +++ b/network/network_session.gd @@ -7,51 +7,12 @@ 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_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 MOVEMENT_SNAPSHOT_FIELD_COUNT: int = 13 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) @@ -119,33 +80,12 @@ 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 = "" 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 @@ -165,14 +105,12 @@ var _local_appearance_snapshot: Dictionary = ( ) var _moderation_disconnect_message := "" var _host_port: int = 0 -var _session_display_name: String = "straywild Room" +var _session_display_name: String = "NETfishing Room" var _dedicated_host: bool = false var _configured_operator_fingerprints: Dictionary[String, bool] = {} var _session_operator_fingerprints: Dictionary[String, bool] = {} var _operator_peer_ids: Dictionary[int, bool] = {} var _local_operator: bool = false -var _host_world_seed: int = NetworkProtocol.DEFAULT_WORLD_SEED -var _host_world_layout: StringName = WorldLayout.GENERATED func _ready() -> void: @@ -334,13 +272,6 @@ func _register_player_host() -> void: NetworkProtocol.JOBS_CAPABILITY, NetworkProtocol.WORLD_SPAWN_CAPABILITY, 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) @@ -439,7 +370,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 = "straywild Room" + cleaned = "NETfishing Room" if cleaned == _session_display_name: return _session_display_name = cleaned @@ -596,40 +527,9 @@ func get_last_server_metadata() -> Dictionary: "protocol_version": _last_server_protocol_version, "player_count": _last_server_player_count, "max_players": _last_server_max_players, - "world_seed": _last_server_world_seed, - "world_layout": String(_last_server_world_layout), } -func set_host_world_seed(seed: int) -> bool: - return set_host_world(WorldLayout.GENERATED, seed) - - -func set_host_world(world_layout: StringName, seed: int) -> bool: - if ( - state != State.INACTIVE - or not WorldLayout.is_valid(world_layout) - or seed <= 0 - or seed > NetworkProtocol.MAX_WORLD_SEED - ): - return false - _host_world_layout = world_layout - _host_world_seed = seed - return true - - -func get_authoritative_world_layout() -> StringName: - return ( - _last_server_world_layout - if is_joined_client() - else _host_world_layout - ) - - -func get_authoritative_world_seed() -> int: - return _last_server_world_seed if is_joined_client() else _host_world_seed - - func can_use_host_gameplay() -> bool: return is_host() @@ -663,13 +563,6 @@ func supports_server_capability(capability: StringName) -> bool: NetworkProtocol.WORLD_WEATHER_CAPABILITY, NetworkProtocol.WORLD_SPAWN_CAPABILITY, 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", @@ -694,55 +587,6 @@ 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 @@ -766,18 +610,6 @@ 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, @@ -942,10 +774,6 @@ 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 ( @@ -966,13 +794,9 @@ 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) - _idle_input_accumulator += elapsed_input_time - _maybe_send_local_animation_action() - _maybe_send_local_input() + _send_local_input() if is_host() and _snapshot_accumulator >= SNAPSHOT_INTERVAL: _snapshot_accumulator = fmod(_snapshot_accumulator, SNAPSHOT_INTERVAL) _broadcast_movement_snapshots() @@ -1010,7 +834,6 @@ 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 ) @@ -1019,7 +842,6 @@ 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( @@ -1031,24 +853,6 @@ 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, @@ -1088,9 +892,6 @@ 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) @@ -1246,7 +1047,7 @@ func resolve_server_trust(accepted: bool) -> void: if not _server_trust.trust( get_current_endpoint(), str(_pending_server_proof["server_fingerprint"]), - "straywild", + "NETfishing", ): _fail_identity("The server identity could not be pinned.") return @@ -1363,32 +1164,6 @@ func submit_client_hello(data: Dictionary) -> void: NetworkProtocol.RejectionCode.UNSUPPORTED_CLIENT, ) return - if NetworkProtocol.WORLD_GENERATION_CAPABILITY not in client_capabilities: - _reject_peer( - sender_id, - 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 - ): - _reject_peer( - sender_id, - NetworkProtocol.RejectionCode.UNSUPPORTED_CLIENT, - ) - return var identity: Dictionary = _authenticated_identity_cache.get(sender_id, {}) if identity.is_empty(): _reject_peer(sender_id, NetworkProtocol.RejectionCode.INVALID_IDENTITY_PROOF) @@ -1476,8 +1251,6 @@ func submit_client_hello(data: Dictionary) -> void: _registry.size(), session_max_players, _session_display_name, - _host_world_seed, - _host_world_layout, ) ) receive_spawn_list.rpc_id(sender_id, _build_spawn_list()) @@ -1531,10 +1304,6 @@ func receive_server_hello(data: Dictionary) -> void: or typeof(data.get("protocol_version")) != TYPE_INT or typeof(data.get("game_version")) != TYPE_STRING or typeof(data.get("rejection_code")) != TYPE_INT - or typeof(data.get("world_seed")) != TYPE_INT - or typeof( - data.get("world_layout", String(WorldLayout.GENERATED)) - ) not in [TYPE_STRING, TYPE_STRING_NAME] ): _teardown_peer() _fail("The server sent an invalid handshake response.") @@ -1560,19 +1329,6 @@ func receive_server_hello(data: Dictionary) -> void: _teardown_peer() _fail("The server uses a different network protocol.") return - var received_world_seed := int(data["world_seed"]) - if received_world_seed <= 0 or received_world_seed > NetworkProtocol.MAX_WORLD_SEED: - _teardown_peer() - _fail("The server sent an invalid world seed.") - return - var received_world_layout := WorldLayout.normalized( - data.get("world_layout", String(WorldLayout.GENERATED)), - &"", - ) - if received_world_layout.is_empty(): - _teardown_peer() - _fail("The server sent an invalid world layout.") - return _session_id = str(data.get("session_id", "")) _last_server_max_players = int(data.get( "max_players", @@ -1583,8 +1339,6 @@ func receive_server_hello(data: Dictionary) -> void: _last_server_protocol_version = int(data.get( "protocol_version", NetworkProtocol.PROTOCOL_VERSION )) - _last_server_world_seed = received_world_seed - _last_server_world_layout = received_world_layout _server_capabilities = PackedStringArray() var advertised_capabilities: Variant = data.get( "capability_flags", PackedStringArray() @@ -1599,26 +1353,6 @@ func receive_server_hello(data: Dictionary) -> void: _teardown_peer() _fail("This server does not support fish quality data.") return - if NetworkProtocol.WORLD_GENERATION_CAPABILITY not in _server_capabilities: - _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 - ): - _teardown_peer() - _fail("This server does not support selectable world layouts.") - return var local_peer_id: int = multiplayer.get_unique_id() _registry.clear() _registry.add_peer( @@ -1634,13 +1368,6 @@ func receive_server_hello(data: Dictionary) -> void: NetworkProtocol.WORLD_TIME_CAPABILITY, NetworkProtocol.WORLD_WEATHER_CAPABILITY, 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) @@ -1686,9 +1413,6 @@ 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) @@ -1730,10 +1454,6 @@ 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): @@ -1749,12 +1469,10 @@ 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): - if not _registry.add_peer( + _registry.add_peer( peer_id, entry["profile_id"], entry["display_name"], @@ -1762,14 +1480,8 @@ 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( @@ -1796,20 +1508,6 @@ 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]: @@ -1832,15 +1530,6 @@ 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 "", @@ -1851,12 +1540,6 @@ 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 @@ -1924,62 +1607,25 @@ func _update_local_operator() -> void: _local_operator = bool(_operator_peer_ids.get(local_peer_id, false)) -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 fingerprint := str(entry.get("identity_fingerprint", "")) var public_pem := NetworkIdentityCrypto.normalize_public_pem( - identity_public_key + str(entry.get("identity_public_key", "")) ) - if NetworkIdentityCrypto.fingerprint_public_pem(public_pem) != fingerprint: + if ( + NetworkIdentityCrypto.fingerprint_public_pem(public_pem) != fingerprint + or typeof(entry.get("profile_authorization")) != TYPE_DICTIONARY + ): return false + var authorization: Dictionary = entry["profile_authorization"] if authorization.is_empty(): - return peer_id == 1 + return int(entry.get("peer_id", 0)) == 1 if authorization.get("domain") == "handshake_client_profile": var hello := NetworkProtocol.make_client_hello( - profile_id, - display_name, + str(entry.get("profile_id", "")), + str(entry.get("display_name", "")), str(authorization.get("client_nonce", "")), - appearance, + Dictionary(entry.get("appearance", {})), fingerprint, authorization.get("signature", PackedByteArray()), ) @@ -1989,23 +1635,10 @@ func _verify_profile_authorization_fields( 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"] = display_name - signed["appearance"] = appearance + signed["display_name"] = entry.get("display_name", "") + signed["appearance"] = entry.get("appearance", {}) return NetworkIdentityCrypto.verify_fields( NetworkIdentityCrypto.load_public_key(public_pem), "profile_update", @@ -2082,69 +1715,14 @@ 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 - if _input_sequence >= MAX_MOVEMENT_INPUT_SEQUENCE - else _input_sequence + 1 - ) + _input_sequence += 1 var input: Dictionary = avatar.capture_network_input(_input_sequence) - 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) + submit_movement_input.rpc_id(1, input) func submit_neutral_local_movement() -> void: @@ -2154,112 +1732,17 @@ func submit_neutral_local_movement() -> void: @rpc("any_peer", "call_remote", "unreliable_ordered", 1) -func submit_movement_input(encoded: Array) -> void: +func submit_movement_input(data: Dictionary) -> 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 data: Dictionary = _decode_movement_input(encoded) - if avatar == null or data.is_empty(): + if avatar == null or not _is_valid_movement_input(data): return - _movement_inputs_received += 1 - avatar.apply_authoritative_network_input( - data, - Player.resolve_network_input_stale_timeout_seconds( - get_peer_rtt_ms(sender_id) - ), - ) + avatar.apply_authoritative_network_input(data) -@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: +func _is_valid_movement_input(data: Dictionary) -> bool: if ( typeof(data.get("sequence")) != TYPE_INT or typeof(data.get("axis")) != TYPE_ARRAY @@ -2299,153 +1782,49 @@ static func _is_valid_movement_input(data: Dictionary) -> bool: func _broadcast_movement_snapshots() -> void: - _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: + var snapshots: Array = [] + for peer_id: int in _registry.get_peer_ids(): + var avatar: Player = _spawn_service.get_avatar(peer_id) + if avatar == null: continue - 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: + 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. for start_index: int in range( 0, snapshots.size(), MOVEMENT_SNAPSHOT_BATCH_SIZE, ): - var batch: Array = snapshots.slice( - start_index, - mini( - start_index + MOVEMENT_SNAPSHOT_BATCH_SIZE, - snapshots.size(), - ), + receive_movement_snapshots.rpc( + 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 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 + var animation: Dictionary = animation_value + var action: Dictionary = animation["action"] return [ int(snapshot.get("peer_id", 0)), int(snapshot.get("acknowledged_input", 0)), @@ -2456,7 +1835,14 @@ static func _encode_movement_snapshot(snapshot: Dictionary) -> Array: float(snapshot_velocity[2]), ), float(snapshot.get("visual_yaw", 0.0)), - flags, + 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)), ] @@ -2471,22 +1857,18 @@ 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]) != 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 ): 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]), @@ -2497,100 +1879,19 @@ static func _decode_movement_snapshot(value: Variant) -> Dictionary: snapshot_velocity.z, ], "visual_yaw": float(fields[4]), - "grounded": bool(flags & SNAPSHOT_FLAG_GROUNDED), - "sitting": bool(flags & SNAPSHOT_FLAG_SITTING), - "casting": bool(flags & SNAPSHOT_FLAG_CASTING), + "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]), } -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: @@ -2610,17 +1911,11 @@ 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( @@ -2629,80 +1924,6 @@ 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 @@ -2978,21 +2199,8 @@ 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 e58556e..2de9cc1 100644 --- a/network/network_shop_protocol.gd +++ b/network/network_shop_protocol.gd @@ -4,8 +4,6 @@ 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 @@ -16,11 +14,10 @@ enum ProductCategory { ROD, REEL_SPEED_UPGRADE, BARRIER_POWER_UPGRADE, - HOME_UPGRADE, + COOLER_CAPACITY_UPGRADE, ART_KIT, ART_UPGRADE, BACKPACK_CAPACITY_UPGRADE, - DECOR, } diff --git a/network/network_shop_service.gd b/network/network_shop_service.gd index e4d6f9c..f30c1da 100644 --- a/network/network_shop_service.gd +++ b/network/network_shop_service.gd @@ -8,14 +8,11 @@ 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 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 SHOP_ID: StringName = &"main_fishing_shop" const REEL_PRODUCT_ID: StringName = &"reel_speed_upgrade" const BARRIER_PRODUCT_ID: StringName = &"barrier_power_upgrade" -const HOME_UPGRADE_PRODUCT_ID: StringName = &"starter_rv_upgrade" +const COOLER_PRODUCT_ID: StringName = &"cooler_capacity_upgrade" const BACKPACK_PRODUCT_ID: StringName = &"backpack_capacity_upgrade" const MAX_LEDGER_ENTRIES_PER_PEER: int = 64 @@ -34,8 +31,6 @@ 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 @@ -52,8 +47,6 @@ 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( @@ -70,10 +63,6 @@ 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 @@ -88,32 +77,12 @@ 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): _session.state_changed.connect(_on_session_state_changed) -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 @@ -151,32 +120,6 @@ 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() @@ -227,12 +170,12 @@ func request_barrier_power_upgrade() -> String: ) -func request_home_upgrade() -> String: +func request_cooler_capacity_upgrade() -> String: return _request_purchase( - HOME_UPGRADE_PRODUCT_ID, - NetworkShopProtocol.ProductCategory.HOME_UPGRADE, + COOLER_PRODUCT_ID, + NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE, 1, - _home_state.get_tier() if _home_state != null else 0 + _cooler_capacity.get_level() if _cooler_capacity != null else 0 ) @@ -246,15 +189,6 @@ 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, @@ -331,30 +265,11 @@ 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, @@ -426,38 +341,16 @@ func _handle_purchase_request(peer_id: int, data: Dictionary) -> void: _rejected_result(data, "A purchase is already pending.") ) return - var requested_shop_id := StringName(str(data["shop_id"])) - if not _is_shop_available_for_peer(peer_id, requested_shop_id): + if not _is_shop_available_for_peer(peer_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 requested_interaction == null + if avatar == null or _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) @@ -471,29 +364,10 @@ 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 = "" - var expected_shop_id: StringName = _shop_id_for_category(category) - if StringName(str(request["shop_id"])) != expected_shop_id: + if StringName(str(request["shop_id"])) != SHOP_ID: rejection = "The shop is unavailable." elif quantity < 1: rejection = "Purchase could not be completed." @@ -606,14 +480,18 @@ func _build_authoritative_result( ] ) resulting_state = current_state + 1 - NetworkShopProtocol.ProductCategory.HOME_UPGRADE: + NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE: if ( - product_id != HOME_UPGRADE_PRODUCT_ID - or current_state >= PlayerHomeState.MAX_TIER + product_id != COOLER_PRODUCT_ID + or current_state >= PlayerCoolerCapacity.MAX_LEVEL ): rejection = "Upgrade is already at maximum." else: - cost = PlayerHomeState.HOME_UPGRADE_COSTS[current_state] + cost = ( + PlayerCoolerCapacity.EXPANSION_COSTS[ + current_state + ] + ) resulting_state = current_state + 1 NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: if ( @@ -663,19 +541,6 @@ 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(): @@ -798,9 +663,6 @@ 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) @@ -810,8 +672,6 @@ 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.") @@ -832,7 +692,6 @@ 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", "")) @@ -907,12 +766,10 @@ 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.HOME_UPGRADE: - if ( - product_id != HOME_UPGRADE_PRODUCT_ID - or _home_state.get_tier() != expected_state - or _home_state.get_next_upgrade_cost() != cost - ): + 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: return "Purchase could not be completed." NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: if ( @@ -945,20 +802,6 @@ 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 "" @@ -982,11 +825,8 @@ 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.HOME_UPGRADE: - return ( - _wallet.debit(int(data["total_cost"])) - and _home_state.upgrade_to_next_tier() - ) + NetworkShopProtocol.ProductCategory.COOLER_CAPACITY_UPGRADE: + return _cooler_capacity.purchase(_wallet) NetworkShopProtocol.ProductCategory.BACKPACK_CAPACITY_UPGRADE: return ( _inventory_layout != null @@ -1001,12 +841,6 @@ 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 @@ -1083,7 +917,7 @@ func _handle_acknowledgement( peer_id: int, result_id: String, request_id: String, - applied: bool, + _applied: bool, message: String, ) -> void: if ( @@ -1095,31 +929,20 @@ 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, - shop_id: StringName, -) -> bool: - var interaction: FishingShopInteraction = _interaction_for_shop(shop_id) +func _is_shop_available_for_peer(peer_id: int) -> bool: 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) @@ -1130,28 +953,10 @@ func _is_shop_available_for_peer( _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 485dfaa..e42519c 100644 --- a/network/network_surface_drawing_service.gd +++ b/network/network_surface_drawing_service.gd @@ -27,9 +27,6 @@ const MAX_REQUESTS_PER_WINDOW: int = 32 const MAX_RECENT_REQUEST_IDS: int = 64 const GRID_PREVIEW_SURFACE_OFFSET: float = 0.03 const POINTER_EDGE_MARGIN: float = 2.0 -const ARTWORK_DIRECTORY_NAME: String = "artwork" -const STAMP_ALPHA_THRESHOLD: float = 0.5 -const STAMP_COLOR_TOLERANCE: float = 0.012 const INVALID_POINTER_SCREEN_POSITION := Vector2(-1.0, -1.0) enum GuideAction { @@ -46,26 +43,17 @@ var _local_player: Player var _bag: PlayerBag var _hotbar: PlayerHotbar var _art_unlocks: PlayerArtUnlocks -var _data_root: PlayerDataRoot var _drawing_root: Node3D 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 var _placement_preview: MeshInstance3D var _placement_preview_material: StandardMaterial3D -var _stamp_preview: MeshInstance3D -var _stamp_preview_material: StandardMaterial3D var _active: bool = false var _placing_grid: bool = false -var _stamp_mode: bool = false -var _stamp_path: String = "" -var _stamp_pixels := PackedByteArray() -var _stamp_image: Image var _brush_size: int = 1 var _grid_size: int = SurfaceDrawingProtocol.DEFAULT_GRID_SIZE var _color_ids: Array[StringName] = [] @@ -102,7 +90,6 @@ func setup( bag: PlayerBag, hotbar: PlayerHotbar, art_unlocks: PlayerArtUnlocks, - data_root: PlayerDataRoot = null, ) -> void: _session = session _spawn_service = spawn_service @@ -112,7 +99,6 @@ func setup( _bag = bag _hotbar = hotbar _art_unlocks = art_unlocks - _data_root = data_root _refresh_local_unlocks() if _session != null: _session.state_changed.connect(_on_session_state_changed) @@ -192,8 +178,6 @@ func handle_input( if mouse_event.pressed: if _armed_guide_action != GuideAction.NONE: _execute_armed_guide_action() - elif _stamp_mode: - _request_stamp_at_aim() elif mouse_event.shift_pressed and mouse_event.ctrl_pressed: _finalize_selected_guide() elif mouse_event.shift_pressed: @@ -237,8 +221,6 @@ func activate( return _active = true _placing_grid = false - _last_hovered_canvas_id = "" - _clear_stamp_mode() _eraser_mode = false _clear_armed_guide_action(false) _refresh_local_unlocks() @@ -250,11 +232,7 @@ func activate( _pointer_screen_position = _clamped_pointer_position( initial_pointer_position ) - # 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) + _prior_mouse_mode = Input.mouse_mode Input.mouse_mode = Input.MOUSE_MODE_VISIBLE _update_aim() _refresh_stencil_visibility() @@ -266,39 +244,18 @@ func deactivate() -> void: return _active = false _placing_grid = false - _clear_stamp_mode() _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 = _get_restorable_mouse_mode(_prior_mouse_mode) + Input.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 @@ -324,7 +281,6 @@ func set_color_id(color_id: StringName) -> bool: if color_index < 0: return false _clear_armed_guide_action(true) - _clear_stamp_mode() _eraser_mode = false _color_index = color_index _reset_stroke() @@ -336,7 +292,6 @@ func set_eraser_mode(enabled: bool) -> void: if not _active: return _clear_armed_guide_action(true) - _clear_stamp_mode() _eraser_mode = enabled if _eraser_mode and _placing_grid: _placing_grid = false @@ -363,7 +318,6 @@ func arm_guide_action(action: int) -> bool: if _armed_guide_action == GuideAction.NONE: _armed_return_placement_mode = _placing_grid _armed_return_eraser_mode = _eraser_mode - _clear_stamp_mode() _armed_guide_action = action _placing_grid = true _eraser_mode = false @@ -395,7 +349,6 @@ func set_grid_size(value: int) -> bool: return false if _grid_size == value: return true - _clear_stamp_mode() _grid_size = value _rebuild_placement_preview() _update_previews() @@ -523,28 +476,6 @@ func _peer_can_place_grid(peer_id: int, grid_size: int) -> bool: ) -func _peer_can_stamp(peer_id: int, request: Dictionary) -> bool: - var entitlement: Dictionary = _peer_entitlement(peer_id) - var unlock_mask: int = int(entitlement.get("unlock_mask", 0)) - if ( - not bool(entitlement.get("has_kit", false)) - or not _mask_owns_product( - unlock_mask, PlayerArtUnlocks.STAMP_PRODUCT_ID - ) - or not _mask_unlocks_grid(unlock_mask, int(request["width"])) - ): - return false - var palette_ids: Array[StringName] = SurfaceDrawingPalette.get_color_ids() - var pixels: PackedByteArray = request["pixels"] - for palette_index: int in pixels: - if palette_index <= 0: - continue - var color_id: StringName = palette_ids[palette_index - 1] - if not _mask_unlocks_color(unlock_mask, color_id): - return false - return true - - func _peer_can_edit(peer_id: int, request: Dictionary) -> bool: var entitlement: Dictionary = _peer_entitlement(peer_id) if not bool(entitlement.get("has_kit", false)): @@ -633,42 +564,6 @@ func request_canvas_at_surface( return true -func request_stamp_at_surface( - origin: Vector3, - normal: Vector3, - tangent: Vector3, -) -> bool: - if ( - not can_activate() - or not _stamp_mode - or _stamp_pixels.size() != _grid_size * _grid_size - or _art_unlocks == null - or not _art_unlocks.is_stamp_unlocked() - or not _art_unlocks.is_grid_size_unlocked(_grid_size) - or normal.is_zero_approx() - or tangent.is_zero_approx() - ): - return false - var data: Dictionary = { - "request_id": _new_request_id("stamp"), - "session_id": _session.get_session_id(), - "origin": SurfaceDrawingProtocol.vector_to_array(origin), - "normal": SurfaceDrawingProtocol.vector_to_array(normal.normalized()), - "tangent": SurfaceDrawingProtocol.vector_to_array(tangent.normalized()), - "width": _grid_size, - "height": _grid_size, - "cell_size": SurfaceDrawingProtocol.CELL_SIZE, - "pixels": _stamp_pixels, - } - if not SurfaceDrawingProtocol.validate_stamp_request(data): - return false - if _session.is_host(): - _handle_stamp_request(_session.get_local_peer_id(), data) - else: - submit_stamp_request.rpc_id(1, data) - return true - - func request_cell_edits( canvas_id: String, edits: Array[Dictionary], @@ -775,29 +670,6 @@ func clear_session_artwork() -> bool: return true -func clear_artwork_by_fingerprint(fingerprint: String) -> int: - if ( - not _drawing_available() - or not _session.is_host() - or not NetworkIdentityCrypto.valid_fingerprint(fingerprint) - ): - return -1 - var affected_layers: int = _apply_artwork_fingerprint_clear(fingerprint) - for peer_id: int in _session.get_authenticated_peer_ids(): - if ( - peer_id != _session.get_local_peer_id() - and _session.peer_supports_capability( - peer_id, SurfaceDrawingProtocol.CAPABILITY - ) - ): - receive_artwork_fingerprint_clear.rpc_id( - peer_id, - _session.get_session_id(), - fingerprint, - ) - return affected_layers - - func get_canvas_ids() -> Array[String]: var result: Array[String] = [] for canvas_id: String in _canvas_states: @@ -810,224 +682,6 @@ func get_canvas_state(canvas_id: String) -> Dictionary: return Dictionary(_canvas_states.get(canvas_id, {})).duplicate(true) -func is_stamp_mode() -> bool: - return _stamp_mode - - -func get_saved_stamp_entries() -> Array[Dictionary]: - var result: Array[Dictionary] = [] - var directory: String = _artwork_directory() - if directory.is_empty() or not DirAccess.dir_exists_absolute(directory): - return result - var file_names: PackedStringArray = DirAccess.get_files_at(directory) - file_names.sort() - file_names.reverse() - for file_name: String in file_names: - if file_name.get_extension().to_lower() != "png": - continue - var entry: Dictionary = _decode_stamp_file( - directory.path_join(file_name) - ) - if entry.is_empty(): - continue - entry["available"] = _stamp_entry_is_unlocked(entry) - result.append(entry) - if result.size() >= 64: - break - return result - - -func select_saved_stamp(path: String) -> bool: - if ( - not _active - or _art_unlocks == null - or not _art_unlocks.is_stamp_unlocked() - ): - _emit_hud_state("unlock the stamp tool in Art Supplies") - return false - var entry: Dictionary = _decode_stamp_file(path) - if entry.is_empty(): - _emit_hud_state("this artwork PNG cannot be used as a stamp") - return false - if not _stamp_entry_is_unlocked(entry): - _emit_hud_state("this stamp uses an art supply that is still locked") - return false - _clear_armed_guide_action(true) - _stamp_path = str(entry["path"]) - _stamp_pixels = entry["pixels"] - _stamp_image = entry["image"] - _stamp_mode = true - _placing_grid = true - _eraser_mode = false - _grid_size = int(entry["grid_size"]) - _reset_stroke() - _selected_canvas_id = "" - _rebuild_placement_preview() - _rebuild_stamp_preview() - _update_aim() - _refresh_stencil_visibility() - _emit_hud_state( - "stamp selected • click a solid surface to place finalized artwork" - ) - return true - - -func export_aimed_canvas() -> String: - _update_aim() - 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(canvas_id) - - -func export_canvas_png(canvas_id: String) -> String: - var canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) - if canvas == null or not is_instance_valid(canvas): - _emit_hud_state("artwork is no longer available") - return "" - if canvas.get_rendered_pixel_count() <= 0: - _emit_hud_state("paint something before exporting") - return "" - if _data_root == null or _data_root.root_path.is_empty(): - _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: - _emit_hud_state("the artwork folder could not be created") - return "" - var image: Image = canvas.get_export_image() - if image == null or image.is_empty(): - _emit_hud_state("the artwork image could not be prepared") - return "" - var export_path: String = _next_artwork_export_path(export_directory) - if image.save_png(export_path) != OK: - _emit_hud_state("the artwork PNG could not be saved") - return "" - print("Art Kit artwork exported: ", export_path) - _emit_hud_state("artwork exported to the data folder • artwork") - return export_path - - -func _artwork_directory() -> String: - if _data_root == null or _data_root.root_path.is_empty(): - return "" - return _data_root.root_path.path_join(ARTWORK_DIRECTORY_NAME) - - -func _decode_stamp_file(path: String) -> Dictionary: - var directory: String = _artwork_directory() - if directory.is_empty(): - return {} - var normalized_directory: String = directory.simplify_path().trim_suffix( - "/" - ) - var normalized_path: String = path.simplify_path() - if not normalized_path.begins_with(normalized_directory + "/"): - return {} - if normalized_path.get_extension().to_lower() != "png": - return {} - var image: Image = Image.load_from_file(normalized_path) - if image == null or image.is_empty(): - return {} - if ( - image.get_width() != image.get_height() - or image.get_width() not in SurfaceDrawingProtocol.GRID_SIZES - ): - return {} - if image.is_compressed() and image.decompress() != OK: - return {} - image.convert(Image.FORMAT_RGBA8) - var grid_size: int = image.get_width() - var pixels := PackedByteArray() - pixels.resize(grid_size * grid_size) - var used_color_ids: Array[StringName] = [] - var painted_count: int = 0 - for cell_y: int in range(grid_size): - var image_y: int = grid_size - 1 - cell_y - for x: int in range(grid_size): - var color: Color = image.get_pixel(x, image_y) - var palette_index: int = 0 - if color.a >= STAMP_ALPHA_THRESHOLD: - palette_index = _stamp_palette_index(color) - if palette_index <= 0: - return {} - painted_count += 1 - var color_id: StringName = SurfaceDrawingPalette.get_color_ids()[ - palette_index - 1 - ] - if color_id not in used_color_ids: - used_color_ids.append(color_id) - pixels[cell_y * grid_size + x] = palette_index - if painted_count <= 0: - return {} - return { - "path": normalized_path, - "file_name": normalized_path.get_file(), - "grid_size": grid_size, - "painted_count": painted_count, - "used_color_ids": used_color_ids, - "pixels": pixels, - "image": image, - } - - -func _stamp_palette_index(color: Color) -> int: - var palette_ids: Array[StringName] = SurfaceDrawingPalette.get_color_ids() - for index: int in range(palette_ids.size()): - var palette_color: Color = SurfaceDrawingPalette.get_color( - palette_ids[index] - ) - var difference := Vector3( - color.r - palette_color.r, - color.g - palette_color.g, - color.b - palette_color.b, - ) - if difference.length() <= STAMP_COLOR_TOLERANCE: - return index + 1 - return 0 - - -func _stamp_entry_is_unlocked(entry: Dictionary) -> bool: - if _art_unlocks == null or not _art_unlocks.is_stamp_unlocked(): - return false - if not _art_unlocks.is_grid_size_unlocked(int(entry.get("grid_size", 0))): - return false - for color_id: StringName in entry.get("used_color_ids", []): - if not _art_unlocks.is_color_unlocked(color_id): - return false - return true - - -func _next_artwork_export_path(directory: String) -> String: - var date_time: Dictionary = Time.get_datetime_dict_from_system() - 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)), - int(date_time.get("hour", 0)), - int(date_time.get("minute", 0)), - int(date_time.get("second", 0)), - ] - var candidate: String = directory.path_join(stem + ".png") - var suffix: int = 2 - while FileAccess.file_exists(candidate): - candidate = directory.path_join("%s-%d.png" % [stem, suffix]) - suffix += 1 - return candidate - - func _process(_delta: float) -> void: if not _active: return @@ -1060,55 +714,26 @@ func _update_aim() -> void: _aim_hit = _raycast_from_pointer() var previous_canvas_id: String = _selected_canvas_id var found_canvas_id: String = "" - var found_hovered_canvas_id: String = "" var nearest_plane_distance: float = INF - var nearest_hovered_plane_distance: float = INF - var selected_layer: int = -1 - var hovered_layer: int = -1 if not _aim_hit.is_empty(): var hit_position: Vector3 = _aim_hit["position"] for canvas_id: String in _canvas_nodes: var canvas: SurfaceDrawingCanvas = _canvas_nodes[canvas_id] - if canvas.is_hidden_by_relationship(): + if canvas.is_finalized(): continue var plane_distance: float = canvas.get_surface_plane_distance( hit_position ) - if not canvas.contains_world_point( - hit_position, - SurfaceDrawingCanvas.SURFACE_SAMPLE_DEPTH + 0.05, - ): - continue - var state: Dictionary = _canvas_states.get(canvas_id, {}) - var layer: int = int(state.get("layer", 0)) if ( - plane_distance < nearest_hovered_plane_distance - or ( - is_equal_approx( - plane_distance, nearest_hovered_plane_distance - ) - and layer > hovered_layer - ) - ): - found_hovered_canvas_id = canvas_id - nearest_hovered_plane_distance = plane_distance - hovered_layer = layer - if canvas.is_finalized(): - continue - if ( - plane_distance < nearest_plane_distance - or ( - is_equal_approx(plane_distance, nearest_plane_distance) - and layer > selected_layer + canvas.contains_world_point( + hit_position, + SurfaceDrawingCanvas.SURFACE_SAMPLE_DEPTH + 0.05, ) + and plane_distance < nearest_plane_distance ): found_canvas_id = canvas_id nearest_plane_distance = plane_distance - 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() @@ -1146,8 +771,6 @@ func _update_previews() -> void: return if _placement_preview != null: _placement_preview.hide() - if _stamp_preview != null: - _stamp_preview.hide() _update_brush_preview() @@ -1155,8 +778,6 @@ func _update_placement_preview() -> void: if _placement_preview == null or _aim_hit.is_empty(): if _placement_preview != null: _placement_preview.hide() - if _stamp_preview != null: - _stamp_preview.hide() return var placement: Dictionary = _resolved_placement() var normal: Vector3 = placement["normal"] @@ -1167,11 +788,6 @@ func _update_placement_preview() -> void: Basis(tangent, bitangent, normal), hit_position + normal * GRID_PREVIEW_SURFACE_OFFSET, ) - if _stamp_preview != null: - _stamp_preview.global_transform = Transform3D( - Basis(tangent, bitangent, normal), - hit_position + normal * (GRID_PREVIEW_SURFACE_OFFSET + 0.001), - ) if _placement_preview_material != null: _placement_preview_material.albedo_color = ( Color(0.34, 1.0, 0.72, 0.88) @@ -1179,8 +795,6 @@ func _update_placement_preview() -> void: else Color(0.46, 0.91, 0.95, 0.72) ) _placement_preview.show() - if _stamp_preview != null: - _stamp_preview.visible = _stamp_mode func _update_brush_preview() -> void: @@ -1227,8 +841,6 @@ func _hide_previews() -> void: _hide_brush_preview() if _placement_preview != null: _placement_preview.hide() - if _stamp_preview != null: - _stamp_preview.hide() func _resolved_placement() -> Dictionary: @@ -1277,20 +889,6 @@ func _request_canvas_at_aim() -> void: ) -func _request_stamp_at_aim() -> void: - if _aim_hit.is_empty(): - _emit_hud_state("aim at a solid surface before placing a stamp") - return - var placement: Dictionary = _resolved_placement() - var normal: Vector3 = placement["normal"] - var origin: Vector3 = placement["origin"] - if _overlaps_existing_canvas(origin, normal, _grid_size): - _emit_hud_state("an active shared grid already covers this area") - return - if request_stamp_at_surface(origin, normal, placement["tangent"]): - _emit_hud_state("placing finalized stamp...") - - @rpc( "any_peer", "call_remote", @@ -1371,7 +969,6 @@ func _handle_canvas_request(peer_id: int, data: Dictionary) -> void: "finalized": false, "layer": _canvas_sequence, "creator_fingerprint": record.identity_fingerprint, - "participant_fingerprints": [record.identity_fingerprint], "cells": [], } _apply_canvas_state(state) @@ -1379,117 +976,6 @@ func _handle_canvas_request(peer_id: int, data: Dictionary) -> void: _emit_hud_state("shared grid placed • everyone can draw here") -@rpc( - "any_peer", - "call_remote", - "reliable", - SurfaceDrawingProtocol.RELIABLE_CHANNEL, -) -func submit_stamp_request(data: Dictionary) -> void: - var sender_id: int = multiplayer.get_remote_sender_id() - if _session.is_host() and _session.is_authenticated_peer(sender_id): - _handle_stamp_request(sender_id, data) - - -func _handle_stamp_request(peer_id: int, data: Dictionary) -> void: - var requested_size: int = int(data.get("width", 0)) - if ( - not _session.is_host() - or not SurfaceDrawingProtocol.validate_stamp_request(data) - or str(data["session_id"]) != _session.get_session_id() - or not _accept_request(peer_id, str(data["request_id"])) - or not _peer_can_stamp(peer_id, data) - or _canvas_states.size() >= SurfaceDrawingProtocol.MAX_CANVASES - or _allocated_grid_cells() + requested_size * requested_size - > SurfaceDrawingProtocol.MAX_SESSION_GRID_CELLS - ): - return - var avatar: Player = _spawn_service.get_avatar(peer_id) - var requested_origin: Vector3 = SurfaceDrawingProtocol.array_to_vector( - data["origin"] - ) - if ( - avatar == null - or avatar.global_position.distance_to(requested_origin) - > MAX_DRAW_DISTANCE + 2.0 - ): - return - var requested_normal: Vector3 = SurfaceDrawingProtocol.array_to_vector( - data["normal"] - ).normalized() - var surface_hit: Dictionary = _validate_surface( - requested_origin, requested_normal - ) - if surface_hit.is_empty(): - return - var normal: Vector3 = _normalized_or( - surface_hit.get("normal", requested_normal), requested_normal - ) - if _overlaps_existing_canvas( - surface_hit["position"], normal, requested_size - ): - return - var tangent: Vector3 = SurfaceDrawingProtocol.array_to_vector( - data["tangent"] - ) - tangent = (tangent - normal * tangent.dot(normal)).normalized() - if tangent.is_zero_approx(): - tangent = _surface_tangent(normal) - var record: PeerRegistry.PeerRecord = _session.get_peer_record(peer_id) - if record == null or not record.identity_authenticated: - return - _canvas_sequence += 1 - var canvas_id: String = "%s-%d" % [ - _session.get_session_id().left(16), _canvas_sequence, - ] - var state: Dictionary = { - "session_id": _session.get_session_id(), - "canvas_id": canvas_id, - "origin": SurfaceDrawingProtocol.vector_to_array( - surface_hit["position"] - ), - "normal": SurfaceDrawingProtocol.vector_to_array(normal), - "tangent": SurfaceDrawingProtocol.vector_to_array(tangent), - "width": requested_size, - "height": requested_size, - "cell_size": SurfaceDrawingProtocol.CELL_SIZE, - "revision": 1, - "guide_visible": false, - "finalized": true, - "layer": _canvas_sequence, - "creator_fingerprint": record.identity_fingerprint, - "participant_fingerprints": [record.identity_fingerprint], - "cells": _stamp_cells( - data["pixels"], requested_size, record.identity_fingerprint - ), - "stamp": true, - } - _apply_canvas_state(state) - _broadcast_canvas_state(state) - _emit_hud_state("stamp placed • finalized artwork shared with everyone") - - -func _stamp_cells( - pixels: PackedByteArray, - grid_size: int, - author_fingerprint: String, -) -> Array[Dictionary]: - var result: Array[Dictionary] = [] - var palette_ids: Array[StringName] = SurfaceDrawingPalette.get_color_ids() - for cell_key: int in range(pixels.size()): - var palette_index: int = pixels[cell_key] - if palette_index <= 0: - continue - var cell_y: int = floori(float(cell_key) / float(grid_size)) - result.append({ - "x": cell_key % grid_size, - "y": cell_y, - "color_id": str(palette_ids[palette_index - 1]), - "author_fingerprint": author_fingerprint, - }) - return result - - @rpc( "any_peer", "call_remote", @@ -1514,13 +1000,7 @@ func _handle_guide_request(peer_id: int, data: Dictionary) -> void: var canvas_id: String = str(data["canvas_id"]) var state: Dictionary = _canvas_states.get(canvas_id, {}) var avatar: Player = _spawn_service.get_avatar(peer_id) - var record: PeerRegistry.PeerRecord = _session.get_peer_record(peer_id) - if ( - state.is_empty() - or avatar == null - or record == null - or not record.identity_authenticated - ): + if state.is_empty() or avatar == null: return var origin: Vector3 = SurfaceDrawingProtocol.array_to_vector(state["origin"]) if avatar.global_position.distance_to(origin) > MAX_DRAW_DISTANCE + 2.0: @@ -1535,11 +1015,6 @@ func _handle_guide_request(peer_id: int, data: Dictionary) -> void: and was_finalized == finalized ): return - if not _register_canvas_participant( - canvas_id, record.identity_fingerprint - ): - return - state = _canvas_states.get(canvas_id, {}) state["revision"] = int(state["revision"]) + 1 state["guide_visible"] = guide_visible state["finalized"] = finalized @@ -1550,9 +1025,6 @@ func _handle_guide_request(peer_id: int, data: Dictionary) -> void: "revision": int(state["revision"]), "guide_visible": guide_visible, "finalized": finalized, - "participant_fingerprints": state.get( - "participant_fingerprints", [] - ), } var canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) if canvas != null: @@ -1733,15 +1205,6 @@ func _queue_cell_mutation( var next: Dictionary = _cell_value_from_edit(edit) if _same_cell_value(current, next): return - var record: PeerRegistry.PeerRecord = _session.get_peer_record(peer_id) - if ( - record == null - or not record.identity_authenticated - or not _register_canvas_participant( - canvas_id, record.identity_fingerprint - ) - ): - return _record_stroke_change( peer_id, stroke_id, canvas_id, x, y, current, next ) @@ -1883,18 +1346,12 @@ func _publish_cell_mutations( continue state["revision"] = int(state["revision"]) + 1 state["cells"] = _sorted_cells(cells) - state["participant_fingerprints"] = _merged_participants( - state, {"edits": edits} - ) _canvas_states[canvas_id] = state var update: Dictionary = { "session_id": _session.get_session_id(), "canvas_id": canvas_id, "revision": int(state["revision"]), "edits": edits, - "participant_fingerprints": state.get( - "participant_fingerprints", [] - ), } var local_canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) if local_canvas != null: @@ -2032,23 +1489,6 @@ func receive_session_artwork_reset(session_id: String) -> void: _clear_session_artwork_state() -@rpc( - "authority", - "call_remote", - "reliable", - SurfaceDrawingProtocol.RELIABLE_CHANNEL, -) -func receive_artwork_fingerprint_clear( - session_id: String, - fingerprint: String, -) -> void: - if ( - session_id == _session.get_session_id() - and NetworkIdentityCrypto.valid_fingerprint(fingerprint) - ): - _apply_artwork_fingerprint_clear(fingerprint) - - @rpc( "any_peer", "call_remote", @@ -2085,28 +1525,7 @@ func _apply_canvas_state(data: Dictionary) -> void: and int(data["revision"]) <= int(previous_state["revision"]) ): return - var normalized_state: Dictionary = data.duplicate(true) - normalized_state["participant_fingerprints"] = _state_participants( - normalized_state - ) - _canvas_states[canvas_id] = normalized_state - _rebuild_canvas_node(normalized_state) - _refresh_stencil_visibility() - _emit_artwork_changed() - if ( - _active - and str(normalized_state.get("creator_fingerprint", "")) - == _session.get_local_identity_fingerprint() - ): - _emit_hud_state( - "stamp placed • move and click to place another" - if bool(normalized_state.get("stamp", false)) - else "shared grid placed • move and click to place another" - ) - - -func _rebuild_canvas_node(data: Dictionary) -> void: - var canvas_id: String = str(data["canvas_id"]) + _canvas_states[canvas_id] = data.duplicate(true) var previous_canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) if previous_canvas != null: previous_canvas.queue_free() @@ -2117,6 +1536,14 @@ func _rebuild_canvas_node(data: Dictionary) -> void: canvas.queue_free() return _canvas_nodes[canvas_id] = canvas + _refresh_stencil_visibility() + _emit_artwork_changed() + if ( + _active + and str(data.get("creator_fingerprint", "")) + == _session.get_local_identity_fingerprint() + ): + _emit_hud_state("shared grid placed • move and click to place another") func _apply_canvas_update(data: Dictionary) -> void: @@ -2148,9 +1575,6 @@ func _apply_canvas_update(data: Dictionary) -> void: cells[key] = edit.duplicate(true) state["revision"] = int(data["revision"]) state["cells"] = _sorted_cells(cells) - state["participant_fingerprints"] = _merged_participants( - state, data - ) _canvas_states[canvas_id] = state canvas.apply_update(data) _emit_artwork_changed() @@ -2176,9 +1600,6 @@ func _apply_guide_update(data: Dictionary) -> void: state["guide_visible"] = ( bool(data["guide_visible"]) and not bool(data["finalized"]) ) - state["participant_fingerprints"] = _merged_participants( - state, data - ) _canvas_states[canvas_id] = state canvas.apply_guide_update(data) if _active: @@ -2413,46 +1834,10 @@ func _rebuild_placement_preview() -> void: _drawing_root.add_child(_placement_preview) -func _rebuild_stamp_preview() -> void: - if _stamp_preview != null: - _stamp_preview.queue_free() - _stamp_preview = null - _stamp_preview_material = null - if ( - _drawing_root == null - or not _stamp_mode - or _stamp_image == null - or _stamp_image.is_empty() - ): - return - var quad := QuadMesh.new() - quad.size = Vector2.ONE * ( - float(_grid_size) * SurfaceDrawingProtocol.CELL_SIZE - ) - _stamp_preview_material = StandardMaterial3D.new() - _stamp_preview_material.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED - _stamp_preview_material.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA - _stamp_preview_material.texture_filter = BaseMaterial3D.TEXTURE_FILTER_NEAREST - _stamp_preview_material.cull_mode = BaseMaterial3D.CULL_DISABLED - _stamp_preview_material.albedo_color = Color(1.0, 1.0, 1.0, 0.72) - _stamp_preview_material.albedo_texture = ImageTexture.create_from_image( - _stamp_image - ) - quad.material = _stamp_preview_material - _stamp_preview = MeshInstance3D.new() - _stamp_preview.name = "ArtworkStampPlacementPreview" - _stamp_preview.mesh = quad - _stamp_preview.cast_shadow = GeometryInstance3D.SHADOW_CASTING_SETTING_OFF - _stamp_preview.hide() - _drawing_root.add_child(_stamp_preview) - - func _set_placement_mode(enabled: bool) -> void: if not _active: return _clear_armed_guide_action(true) - if _stamp_mode: - _clear_stamp_mode() if _placing_grid == enabled: _emit_hud_state("") return @@ -2470,17 +1855,6 @@ func _set_placement_mode(enabled: bool) -> void: ) -func _clear_stamp_mode() -> void: - _stamp_mode = false - _stamp_path = "" - _stamp_pixels = PackedByteArray() - _stamp_image = null - if _stamp_preview != null: - _stamp_preview.queue_free() - _stamp_preview = null - _stamp_preview_material = null - - func _execute_armed_guide_action() -> void: var action: int = _armed_guide_action match action: @@ -2639,11 +2013,7 @@ func _current_color() -> Color: func _emit_hud_state(status: String) -> void: hud_state_changed.emit( _active, - ( - "stamp" - if _stamp_mode - else "place grid" if _placing_grid else "marker" - ), + "place grid" if _placing_grid else "marker", SurfaceDrawingPalette.get_display_name(_current_color_id()), _current_color(), _brush_size, @@ -2704,68 +2074,6 @@ func _state_cell(state: Dictionary, x: int, y: int) -> Dictionary: ).duplicate(true) -func _register_canvas_participant( - canvas_id: String, - fingerprint: String, -) -> bool: - if not NetworkIdentityCrypto.valid_fingerprint(fingerprint): - return false - var state: Dictionary = _canvas_states.get(canvas_id, {}) - if state.is_empty(): - return false - var participants: Array[String] = _state_participants(state) - if fingerprint in participants: - return true - if participants.size() >= SurfaceDrawingProtocol.MAX_PARTICIPANTS: - return false - participants.append(fingerprint) - state["participant_fingerprints"] = participants - _canvas_states[canvas_id] = state - return true - - -func _merged_participants( - state: Dictionary, - update: Dictionary, -) -> Array[String]: - var result: Array[String] = _state_participants(state) - for value: Variant in update.get("participant_fingerprints", []): - _append_participant(result, str(value)) - for edit_value: Variant in update.get("edits", []): - var edit: Dictionary = edit_value - _append_participant( - result, str(edit.get("author_fingerprint", "")) - ) - return result - - -func _state_participants(state: Dictionary) -> Array[String]: - var result: Array[String] = [] - _append_participant( - result, str(state.get("creator_fingerprint", "")) - ) - for value: Variant in state.get("participant_fingerprints", []): - _append_participant(result, str(value)) - for cell_value: Variant in state.get("cells", []): - var cell: Dictionary = cell_value - _append_participant( - result, str(cell.get("author_fingerprint", "")) - ) - return result - - -func _append_participant( - participants: Array[String], - fingerprint: String, -) -> void: - if ( - NetworkIdentityCrypto.valid_fingerprint(fingerprint) - and fingerprint not in participants - and participants.size() < SurfaceDrawingProtocol.MAX_PARTICIPANTS - ): - participants.append(fingerprint) - - func _cell_value_from_edit(edit: Dictionary) -> Dictionary: if edit.is_empty() or str(edit.get("color_id", "")).is_empty(): return {} @@ -2903,8 +2211,6 @@ func _clear_session_artwork_state() -> void: _canvas_nodes.clear() _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 = "" @@ -2912,38 +2218,6 @@ func _clear_session_artwork_state() -> void: _emit_artwork_changed() -func _apply_artwork_fingerprint_clear(fingerprint: String) -> int: - var affected_canvas_ids: Array[String] = [] - for canvas_id: String in _canvas_states: - var state: Dictionary = _canvas_states[canvas_id] - if fingerprint in _state_participants(state): - affected_canvas_ids.append(canvas_id) - if affected_canvas_ids.is_empty(): - return 0 - for canvas_id: String in affected_canvas_ids: - _remove_canvas_state(canvas_id) - _stroke_history_by_peer.clear() - _cell_last_stroke.clear() - _last_local_stroke_id = "" - _hide_previews() - _emit_artwork_changed() - return affected_canvas_ids.size() - - -func _remove_canvas_state(canvas_id: String) -> void: - _canvas_states.erase(canvas_id) - var canvas: SurfaceDrawingCanvas = _canvas_nodes.get(canvas_id) - if canvas != null: - canvas.queue_free() - _canvas_nodes.erase(canvas_id) - if _selected_canvas_id == canvas_id: - _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: session_artwork_changed.emit( get_canvas_count(), get_painted_cell_count() diff --git a/network/network_transport.gd b/network/network_transport.gd index 5aed6ca..ce68172 100644 --- a/network/network_transport.gd +++ b/network/network_transport.gd @@ -22,25 +22,6 @@ 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 4bd15b0..4d0a55d 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.WORLD_SPAWN_RELIABLE_CHANNEL -const SNAPSHOT_CHANNEL: int = 15 +const RELIABLE_CHANNEL: int = NetworkProtocol.ITEM_RELIABLE_CHANNEL +const SNAPSHOT_CHANNEL: int = 4 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 8981237..db4afad 100644 --- a/network/network_world_spawn_service.gd +++ b/network/network_world_spawn_service.gd @@ -16,9 +16,7 @@ const CalendarSeasonType = preload("res://world/calendar_season.gd") signal local_capture_received(fish_catch: FishCatch) signal local_interaction_finished(accepted: bool, message: String) -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 SNAPSHOT_INTERVAL_SECONDS: float = 0.2 const CAPACITY_RESPONSE_TIMEOUT_SECONDS: float = 3.0 const MAX_REQUEST_ID_LENGTH: int = 128 const MAX_LEDGER_ENTRIES: int = 96 @@ -43,7 +41,6 @@ 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] = {} @@ -52,16 +49,8 @@ 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() @@ -79,7 +68,6 @@ func setup( save_manager: PlayerSaveManager, item_use: NetworkItemUseService, world_time: WorldTimeService = null, - presentation_enabled: bool = true, ) -> void: _session = session _spawn_service = spawn_service @@ -94,7 +82,6 @@ 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) @@ -149,7 +136,6 @@ 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) @@ -231,13 +217,6 @@ 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 @@ -246,27 +225,11 @@ 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() - _rebuild_moving_player_spatial_index() - _update_host_entities(simulation_delta) + _update_host_entities(delta) + _snapshot_elapsed += delta if _snapshot_elapsed >= SNAPSHOT_INTERVAL_SECONDS: _snapshot_elapsed = fmod( _snapshot_elapsed, @@ -283,7 +246,6 @@ 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() @@ -295,7 +257,7 @@ func _begin_population_if_ready() -> void: _current_season() ): _cache_spawn_surface(entry) - for _spawn_index: int in _target_population(entry): + for _spawn_index: int in entry.population: _spawn_entity(entry) @@ -311,10 +273,7 @@ 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() - and _world.get_world_layout() == WorldLayout.GENERATED - ): + if anchor_positions.is_empty(): push_warning( "No gatherable spawn anchors were found for %s." % entry.type_id ) @@ -323,14 +282,10 @@ 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, - height_range.x, - 0.6, - height_range.y, + entry.minimum_surface_y, ) - _surface_height_ranges[entry.type_id] = height_range var areas := PackedFloat32Array() var total_area: float = 0.0 for triangle: PackedVector3Array in triangles: @@ -344,10 +299,7 @@ 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() - and _world.get_world_layout() == WorldLayout.GENERATED - ): + if triangles.is_empty(): push_warning( "No valid spawn surface was found for %s." % entry.type_id ) @@ -389,7 +341,6 @@ 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: @@ -441,8 +392,6 @@ 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): @@ -456,34 +405,6 @@ 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 ( @@ -492,17 +413,13 @@ func _rebuild_moving_player_spatial_index() -> void: or avatar.is_sneaking() ): continue - 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), - ) + 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 func _sample_surface_position( @@ -523,21 +440,7 @@ func _sample_surface_position( ) if triangles.is_empty() or total_area <= 0.0: return Vector3(INF, INF, INF) - 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 attempts: int = 48 if 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 @@ -553,33 +456,12 @@ func _sample_surface_position( + triangle[2] * barycentric_c ) fallback = point - var within_requested_distance := ( + if ( 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 @@ -624,69 +506,28 @@ func _anchor_is_occupied(type_id: StringName, anchor: Vector3) -> bool: func _broadcast_entity_snapshots() -> void: - if _dirty_entity_ids.is_empty() or not _can_broadcast_snapshots(): + if _entities.is_empty(): return - var has_remote_recipients: bool = _has_authenticated_remote_peers() var snapshots: Array[Dictionary] = [] - 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, - ): + 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(): var chunk: Array[Dictionary] = [] - for value: Dictionary in snapshots.slice( - start_index, - mini(start_index + maximum_chunk_size, snapshots.size()), - ): - chunk.append(value) + var chunk_size: int = mini( + NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE, + snapshots.size(), + ) + for _index: int in chunk_size: + chunk.append(snapshots.pop_front()) 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( @@ -700,7 +541,6 @@ 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", { @@ -711,7 +551,6 @@ 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, @@ -794,7 +633,6 @@ 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() @@ -802,9 +640,6 @@ 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)): @@ -815,28 +650,14 @@ 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( - compensated_position.x - entity_position.x, - compensated_position.z - entity_position.z, + avatar.global_position.x - entity_position.x, + avatar.global_position.z - entity_position.z, ).length() if target_distance > entry.capture_radius: error = "The gathering tool missed." @@ -1082,7 +903,7 @@ func _apply_capture_result(data: Dictionary) -> void: _local_collection, ) _local_inventory.add_catch(fish_catch) - _local_collection.record_catch( + _local_collection.mark_quality_discovered( fish_catch.fish_id, fish_catch.quality, ) @@ -1257,9 +1078,6 @@ 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() @@ -1309,8 +1127,6 @@ 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 @@ -1423,45 +1239,11 @@ 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) - var target_population := _target_population(entry) - while current_population < target_population: + while current_population < entry.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(): @@ -1486,36 +1268,20 @@ 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 e173577..9e50fe7 100644 --- a/network/player_data_root.gd +++ b/network/player_data_root.gd @@ -9,42 +9,12 @@ 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 := "straywild_data.json" -const LEGACY_MANIFEST_FILENAME := "netfishing_data.json" +const MANIFEST_FILENAME := "netfishing_data.json" const README_FILENAME := "README.txt" -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 ENVIRONMENT_VARIABLE := "NETFISHING_DATA_DIR" +const CREATE_ENVIRONMENT_VARIABLE := "NETFISHING_CREATE_DATA_DIR" +const 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" @@ -67,29 +37,23 @@ 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) - var environment_variable: String = _available_environment_variable( - ENVIRONMENT_VARIABLE, - LEGACY_ENVIRONMENT_VARIABLE, - ) - if not environment_variable.is_empty(): + if OS.has_environment(ENVIRONMENT_VARIABLE): 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("straywild_DATA_DIR must be an absolute path.") + return _fail("NETFISHING_DATA_DIR must be an absolute path.") if ( - _environment_flag( - CREATE_ENVIRONMENT_VARIABLE, - LEGACY_CREATE_ENVIRONMENT_VARIABLE, + OS.get_environment(CREATE_ENVIRONMENT_VARIABLE) == "1" + and not FileAccess.file_exists( + environment_path.path_join(MANIFEST_FILENAME) ) - and not has_data_manifest(environment_path) ): var created: Dictionary = create_unbound_root(environment_path) if not bool(created.get("ok", false)): @@ -116,35 +80,11 @@ 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("straywild")) + var candidate: String = _normalize(documents.path_join("NETFISHING")) if not candidate.is_absolute_path(): return "" var classification: StringName = classify_candidate_path( @@ -165,22 +105,20 @@ 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 = _existing_manifest_path(normalized) - if not manifest_path.is_empty(): + var manifest_path: String = normalized.path_join(MANIFEST_FILENAME) + if FileAccess.file_exists(manifest_path): var manifest: Dictionary = _read_json(manifest_path) if not _valid_manifest(manifest): - return _fail("The selected folder has a malformed straywild manifest.") + return _fail("The selected folder has a malformed NETfishing 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 straywild data folder." + "Choose an empty folder or an existing NETfishing data folder." ) root_id = Crypto.new().generate_random_bytes(16).hex_encode() if not _create_layout(normalized, root_id): - return _fail("The straywild data folder could not be created.") + return _fail("The NETfishing 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 @@ -207,14 +145,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 = _existing_manifest_path(normalized) - if not manifest_path.is_empty(): + var manifest_path: String = normalized.path_join(MANIFEST_FILENAME) + if FileAccess.file_exists(manifest_path): var manifest: Dictionary = _read_json(manifest_path) - 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", ""))} + return ( + {"ok": true, "root_id": str(manifest.get("root_id", ""))} + if _valid_manifest(manifest) + else {"ok": false, "message": "The app-data manifest is malformed."} + ) 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."} @@ -250,8 +188,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", + &"player_save": "player/player_save.json", &"network_profile": "player/network_profile.json", &"player_appearance": "player/player_appearance.json", &"saved_servers": "social/saved_servers.json", @@ -271,10 +208,6 @@ func identity_backup_directory() -> String: return root_path.path_join("identity-backups") -func progression_backup_directory() -> String: - return root_path.path_join("progression-backups") - - func migration_backup_directory() -> String: return root_path.path_join("backups/migrations") @@ -298,19 +231,17 @@ 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 = _existing_manifest_path(normalized) - if manifest_path.is_empty(): - return _fail("The selected folder is not a straywild data folder.") + 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: Dictionary = _read_json(manifest_path) if not _valid_manifest(manifest): - 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.") + return _fail("The NETfishing data-folder manifest is malformed.") 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 straywild data folder is unavailable or unwritable.") + return _fail("The NETfishing data folder is unavailable or unwritable.") root_path = normalized root_id = found_id requires_selection = false @@ -403,7 +334,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( - ".straywild-write-%s.tmp" % device_id.left(12) + ".netfishing-write-%s.tmp" % device_id.left(12) ) var file: FileAccess = FileAccess.open(probe, FileAccess.WRITE) if file == null: @@ -415,8 +346,8 @@ func _test_writable(path: String) -> bool: func _create_layout(path: String, id: String) -> bool: for relative: String in [ - "player", "player/saves", "social", "backups/saves", "backups/migrations", - "backups/conflicts", "identity-backups", "progression-backups", + "player", "social", "backups/saves", "backups/migrations", + "backups/conflicts", "identity-backups", ]: if DirAccess.make_dir_recursive_absolute(path.path_join(relative)) != OK: return false @@ -434,11 +365,10 @@ func _create_layout(path: String, id: String) -> bool: ): return false var readme: String = ( - "straywild player data\n\n" + "NETfishing 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" - + "Progression exports do not contain identity keys or social data.\n" + "Chat and Session Mail are not stored here.\n" + "Do not play the same profile on two devices at the same time.\n" + "Conflicting edits are preserved under backups/conflicts; they are not merged.\n" @@ -486,71 +416,12 @@ func _valid_manifest(data: Dictionary) -> bool: return ( data.get("format_version") == MANIFEST_VERSION and data.get("layout_version") == LAYOUT_VERSION - and data.get("application") in [APPLICATION_ID, LEGACY_APPLICATION_ID] + and data.get("application") == 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 c75832a..f401da6 100644 --- a/network/player_list_entry.gd +++ b/network/player_list_entry.gd @@ -12,10 +12,7 @@ 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 var can_manage_operator := false var revision := 0 diff --git a/network/player_relationship_store.gd b/network/player_relationship_store.gd index de04d49..2ea4502 100644 --- a/network/player_relationship_store.gd +++ b/network/player_relationship_store.gd @@ -3,12 +3,8 @@ extends Node signal relationship_changed(fingerprint: String) -const FORMAT_VERSION := 2 +const FORMAT_VERSION := 1 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 @@ -21,10 +17,6 @@ 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: @@ -37,11 +29,6 @@ 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 @@ -61,101 +48,20 @@ 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)) - _sort_records(result) + 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 + ) return result @@ -166,7 +72,6 @@ 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 @@ -177,11 +82,7 @@ func _commit(fingerprint: String, record: Dictionary) -> bool: if _write_blocked: return false var previous: Dictionary = _records.duplicate(true) - if ( - not bool(record.get("muted", false)) - and not bool(record.get("blocked", false)) - and not bool(record.get("friend", false)) - ): + if not bool(record["muted"]) and not bool(record["blocked"]): _records.erase(fingerprint) else: _records[fingerprint] = record @@ -214,8 +115,7 @@ func _ensure_loaded() -> void: if json.parse(file.get_as_text()) != OK or typeof(json.data) != TYPE_DICTIONARY: return var data: Dictionary = json.data - var format_version: int = int(data.get("format_version", 0)) - if format_version not in [1, FORMAT_VERSION]: + if data.get("format_version") != FORMAT_VERSION: _write_blocked = true return for value: Variant in data.get("records", []): @@ -227,13 +127,6 @@ 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) @@ -252,69 +145,3 @@ 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 1d1c292..ae6ee00 100644 --- a/network/player_spawn_service.gd +++ b/network/player_spawn_service.gd @@ -11,23 +11,16 @@ 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: - _spawn_transform = spawn_transform func register_local_player(peer_id: int) -> void: @@ -59,10 +52,7 @@ 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, - _dedicated_runtime and authoritative_simulation, - ) + avatar.configure_network_remote(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 2de0acb..ab8f21d 100644 --- a/network/portable_data_migration.gd +++ b/network/portable_data_migration.gd @@ -26,16 +26,19 @@ static func migrate_legacy_to( ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") if DirAccess.dir_exists_absolute(normalized): - if data_root.has_data_manifest(normalized): + var existing_manifest: String = normalized.path_join( + PlayerDataRoot.MANIFEST_FILENAME + ) + if FileAccess.file_exists(existing_manifest): return { "ok": false, "requires_existing_root_decision": true, - "message": "The selected folder already contains straywild data.", + "message": "The selected folder already contains NETfishing data.", } if not _directory_empty(normalized): return { "ok": false, - "message": "Choose an empty folder or create a straywild subfolder.", + "message": "Choose an empty folder or create a NETfishing subfolder.", } var staging: String = "%s.migration-%s" % [ normalized, Crypto.new().generate_random_bytes(8).hex_encode() @@ -97,22 +100,18 @@ static func migrate_active_to( ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") if normalized == data_root.root_path: - return { - "ok": true, - "changed": false, - "message": "This data folder is already active.", - } + return {"ok": true, "message": "This data folder is already active."} if DirAccess.dir_exists_absolute(normalized) and not _directory_empty(normalized): - if data_root.has_data_manifest(normalized): + if FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)): return { "ok": false, "requires_existing_root_decision": true, "message": ( - "The selected folder already contains straywild data. " + "The selected folder already contains NETfishing data. " + "Choose it through the existing-data recovery flow." ), } - return {"ok": false, "message": "Choose an empty folder or a straywild subfolder."} + return {"ok": false, "message": "Choose an empty folder or a NETfishing subfolder."} var staging: String = "%s.migration-%s" % [ normalized, Crypto.new().generate_random_bytes(8).hex_encode() ] @@ -123,9 +122,7 @@ static func migrate_active_to( _remove_tree(staging) return {"ok": false, "message": str(created.get("message", ""))} 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", @@ -137,23 +134,9 @@ static func migrate_active_to( var source: String = data_root.root_path.path_join(relative) if not FileAccess.file_exists(source): continue - if not bool( - _copy_verified_owned_file( - source, staging.path_join(relative) - ).get("ok", false) - ): + if not bool(_copy_verified_json(source, staging.path_join(relative)).get("ok", false)): _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: @@ -164,7 +147,6 @@ 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, } @@ -204,8 +186,9 @@ static func replace_existing_with_legacy( destination: String, ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") - if not data_root.has_data_manifest(normalized): - return {"ok": false, "message": "The selected folder is not a straywild data root."} + 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."} var recovery: String = ProjectSettings.globalize_path( "user://migration-recovery" ).path_join( @@ -225,8 +208,8 @@ static func replace_existing_with_active( destination: String, ) -> Dictionary: var normalized: String = destination.simplify_path().trim_suffix("/") - if not data_root.has_data_manifest(normalized): - return {"ok": false, "message": "The selected folder is not a straywild data root."} + if not FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)): + return {"ok": false, "message": "The selected folder is not a NETfishing data root."} var recovery: String = ProjectSettings.globalize_path( "user://migration-recovery" ).path_join( @@ -265,70 +248,16 @@ static func _copy_verified_json(source: String, destination: String) -> Dictiona } -static func _copy_verified_owned_file( - source: String, - destination: String, -) -> Dictionary: - 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)): - return {"ok": false} - var save_data: Dictionary = decoded["data"] - var version: int = int(save_data.get("save_version", -1)) - if version < 1 or version > PlayerSaveManager.SAVE_VERSION: - return {"ok": false} - var bytes: PackedByteArray = PortableFileGuard.read_bytes(source) - if bytes.is_empty() or not _write_bytes(destination, bytes): - return {"ok": false} - return { - "ok": ( - PortableFileGuard.hash_file(destination) - == PortableFileGuard.hash_bytes(bytes) - ) - } - - 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 4e00259..de48c2c 100644 --- a/network/saved_server_store.gd +++ b/network/saved_server_store.gd @@ -22,12 +22,6 @@ 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 1d4dd29..fda774b 100644 --- a/network/server_trust_store.gd +++ b/network/server_trust_store.gd @@ -19,10 +19,6 @@ 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/player.gd b/player/player.gd index 78dac3d..7f3e7d2 100644 --- a/player/player.gd +++ b/player/player.gd @@ -85,12 +85,10 @@ const CHARACTER_NET_STRIKE_ANIMATION: StringName = &"strike" const CATCH_PRESENTATION_REFERENCE_LONG_SIDE_PX: float = 1280.0 const CATCH_PRESENTATION_MIN_TEXTURE_SCALE: float = 0.1 const CATCH_PRESENTATION_MAX_TEXTURE_SCALE: float = 20.0 -const CATCH_SHOWCASE_INPUT_OWNER: StringName = &"catch_showcase" # Add future networked emote animation IDs here. The protocol accepts unknown # 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, @@ -124,13 +122,6 @@ const BLINK_INTERVAL_SECONDS := Vector2(2.8, 7.5) const BLINK_DURATION_SECONDS: float = 0.11 const CHARACTER_CALL_MOUTH_ID: String = "open_ah" const CHARACTER_CALL_MOUTH_DURATION_SECONDS: float = 0.16 -const SPEECH_MOUTH_IDS: Array[String] = [ - "open_ah", - "open_oh", - "open_small", - "open_smile", -] -const SPEECH_MOUTH_FRAME_SECONDS: float = 0.09 const BASE_REEL_SPEED: float = 0.16 const LANDING_DUST_MIN_FALL_SPEED: float = 2.5 const NETWORK_EXTRAPOLATION_LIMIT_SECONDS: float = 0.25 @@ -140,20 +131,11 @@ 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 = 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 +const LOCAL_PREDICTION_CORRECTION_THRESHOLD: float = 0.12 +const LOCAL_PREDICTION_SNAP_DISTANCE: float = 2.0 +const LOCAL_PREDICTION_CORRECTION_WEIGHT: float = 0.18 # 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. @@ -245,42 +227,6 @@ func play_character_call_visual() -> void: _apply_presented_appearance() -func play_speech_visual(duration_seconds: float) -> void: - stop_speech_visual() - if duration_seconds <= 0.0 or SPEECH_MOUTH_IDS.is_empty(): - return - var generation: int = _speech_visual_generation - var elapsed: float = 0.0 - var frame_index: int = 0 - _speech_mouth_active = true - while elapsed < duration_seconds: - _speech_mouth_id = SPEECH_MOUTH_IDS[ - frame_index % SPEECH_MOUTH_IDS.size() - ] - _apply_presented_appearance() - var frame_duration := minf( - SPEECH_MOUTH_FRAME_SECONDS, - duration_seconds - elapsed, - ) - await get_tree().create_timer(frame_duration).timeout - if generation != _speech_visual_generation: - return - elapsed += frame_duration - frame_index += 1 - _speech_mouth_active = false - _speech_mouth_id = "" - _apply_presented_appearance() - - -func stop_speech_visual() -> void: - _speech_visual_generation += 1 - if not _speech_mouth_active and _speech_mouth_id.is_empty(): - return - _speech_mouth_active = false - _speech_mouth_id = "" - _apply_presented_appearance() - - func set_fishing_visual(active: bool) -> void: if ( active @@ -349,10 +295,6 @@ func _apply_presented_appearance() -> void: if _fighting_visual_active: presented_appearance = appearance_snapshot.duplicate(true) presented_appearance["eyes"] = FIGHTING_EYES_ID - if _speech_mouth_active and not _speech_mouth_id.is_empty(): - if presented_appearance == appearance_snapshot: - presented_appearance = appearance_snapshot.duplicate(true) - presented_appearance["mouth"] = _speech_mouth_id if _character_call_mouth_active: if presented_appearance == appearance_snapshot: presented_appearance = appearance_snapshot.duplicate(true) @@ -385,6 +327,7 @@ class ShowcaseCameraSnapshot: var pitch_rotation: Vector3 var spring_length: float var target_zoom: float + var camera_input_enabled: bool var camera_dragging: bool @@ -427,21 +370,12 @@ 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 @@ -480,16 +414,15 @@ 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")) var _camera_dragging: bool = false +var _camera_drag_button_held: bool = false var _camera_input_enabled: bool = true var _camera_drag_prior_mouse_mode: Input.MouseMode = Input.MOUSE_MODE_VISIBLE -var _camera_drag_pointer_origin: Vector2 = Vector2.ZERO -var _camera_drag_restore_pointer: bool = false +var _camera_drag_capture_pending: bool = false +var _camera_drag_generation: int = 0 var _free_camera_active: bool = false var _free_camera_body: CharacterBody3D var _free_camera: Camera3D @@ -497,18 +430,11 @@ var _free_camera_yaw: float = 0.0 var _free_camera_pitch: float = 0.0 var _movement_enabled: bool = true var _local_input_suppressors: Dictionary[StringName, bool] = {} -var _camera_input_suppressors: Dictionary[StringName, bool] = {} var _water_recovery_active: bool = false 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 @@ -533,9 +459,6 @@ 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 @@ -549,16 +472,6 @@ 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 = &"" @@ -592,9 +505,6 @@ var _blink_seconds_remaining: float = 0.0 var _blink_rng := RandomNumberGenerator.new() var _character_call_mouth_active: bool = false var _character_call_visual_generation: int = 0 -var _speech_mouth_active: bool = false -var _speech_mouth_id: String = "" -var _speech_visual_generation: int = 0 var _fishing_visual_active: bool = false var _fishing_visual_phase: FishingVisualPhase = FishingVisualPhase.NONE var _fishing_after_release_pending: bool = false @@ -831,16 +741,10 @@ 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, - next_sequence, + _animation_action_sequence, _animation_action_elapsed, paused, ) @@ -1009,7 +913,6 @@ 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 @@ -1019,12 +922,6 @@ 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: @@ -1054,15 +951,7 @@ func _simulate_movement_physics(delta: float) -> void: or (_network_authoritative_simulation and _network_jump_pending) ) ) - 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(): + if _sit_after_landing and is_on_floor(): _sit_after_landing = false _set_sitting(true, local_control_enabled) if _sitting: @@ -1136,9 +1025,6 @@ func _simulate_movement_physics(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, @@ -1174,7 +1060,6 @@ 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( @@ -1203,68 +1088,13 @@ 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, - effective_target_zoom, + _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 @@ -1396,7 +1226,9 @@ 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 = _has_held_show_item() + var held_show_item_visible: bool = ( + _held_fish_visible or _held_art_kit_visible + ) var requested_animation: Array[StringName] = [] if _pocket_visual_active: requested_animation = [_pocket_visual_animation] @@ -1569,20 +1401,8 @@ func _update_character_animation() -> void: _presented_animation_action_id = &"" _presented_animation_action_sequence = -1 _presented_animation_action_paused = false - if ( - _character_animation_playback_matches( - next_animation, - action_selected and animation_action_paused, - ) - and not action_changed - ): + if _character_animation_name == next_animation 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: @@ -1605,26 +1425,6 @@ 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: @@ -1709,7 +1509,6 @@ 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: @@ -1723,7 +1522,7 @@ func toggle_sitting() -> void: ]) ): return - if not _can_begin_sitting(): + if not is_on_floor(): _sit_after_landing = true return _set_sitting(should_sit, local_control_enabled) @@ -1742,12 +1541,12 @@ func _set_sitting( should_sit: bool, is_local_intent: bool = false, ) -> void: - if is_local_intent: - _sitting_intent_pending = true - _sitting_intent_sequence = -1 if _sitting == should_sit: return _sitting = should_sit + if is_local_intent: + _sitting_intent_pending = true + _sitting_intent_sequence = -1 if _sitting: velocity = Vector3.ZERO _character_animation_name = &"" @@ -1758,45 +1557,6 @@ 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 @@ -1805,6 +1565,7 @@ func _input(event: InputEvent) -> void: return var mouse_button := event as InputEventMouseButton if mouse_button != null and event.is_action("camera_drag"): + _camera_drag_button_held = mouse_button.pressed _set_camera_dragging(mouse_button.pressed) return var mouse_motion := event as InputEventMouseMotion @@ -1814,6 +1575,7 @@ func _input(event: InputEvent) -> void: _rotate_free_camera(mouse_motion.screen_relative * mouse_sensitivity) else: _rotate_camera(mouse_motion.screen_relative * mouse_sensitivity) + _request_camera_drag_capture() func _notification(what: int) -> void: @@ -1838,11 +1600,7 @@ func _unhandled_input(event: InputEvent) -> void: var mouse_zoom_in: bool = ( event is InputEventMouseButton - and ( - (not event.shift_pressed) - if _rv_interior_camera_mode - else event.shift_pressed != _swap_hotbar_camera_scroll - ) + and event.shift_pressed and event.is_action_pressed("camera_zoom_in") ) var controller_zoom_in: bool = ( @@ -1851,11 +1609,7 @@ func _unhandled_input(event: InputEvent) -> void: ) var mouse_zoom_out: bool = ( event is InputEventMouseButton - and ( - (not event.shift_pressed) - if _rv_interior_camera_mode - else event.shift_pressed != _swap_hotbar_camera_scroll - ) + and event.shift_pressed and event.is_action_pressed("camera_zoom_out") ) var controller_zoom_out: bool = ( @@ -1884,24 +1638,38 @@ func _set_camera_dragging(active: bool) -> void: if _camera_dragging == active: return _camera_dragging = active + _camera_drag_generation += 1 + _camera_drag_capture_pending = false if active: _camera_drag_prior_mouse_mode = Input.mouse_mode - _camera_drag_restore_pointer = _camera_drag_prior_mouse_mode in [ - Input.MOUSE_MODE_VISIBLE, - Input.MOUSE_MODE_CONFINED, - ] - if _camera_drag_restore_pointer: - _camera_drag_pointer_origin = get_viewport().get_mouse_position() - # Capture starts with the physical press, before any motion is applied. - # Switching modes after the first movement can synthesize a center warp - # in the middle of the drag and interrupt camera control. - Input.mouse_mode = Input.MOUSE_MODE_CAPTURED else: + _camera_drag_button_held = false if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED: Input.mouse_mode = _camera_drag_prior_mouse_mode - if _camera_drag_restore_pointer: - Input.warp_mouse(_camera_drag_pointer_origin) - _camera_drag_restore_pointer = false + + +func _request_camera_drag_capture() -> void: + if ( + _camera_drag_capture_pending + or Input.mouse_mode == Input.MOUSE_MODE_CAPTURED + ): + return + _camera_drag_capture_pending = true + _capture_camera_drag_pointer.call_deferred(_camera_drag_generation) + + +func _capture_camera_drag_pointer(generation: int) -> void: + if generation != _camera_drag_generation: + return + _camera_drag_capture_pending = false + if ( + not _camera_dragging + or not local_control_enabled + or not _is_camera_input_enabled() + or not _camera_drag_button_held + ): + return + Input.mouse_mode = Input.MOUSE_MODE_CAPTURED func _get_network_aware_speed() -> float: @@ -1987,13 +1755,6 @@ func _update_free_camera_physics() -> void: if _free_camera == null or _free_camera_body == null: _set_free_camera_active(false) return - # Freecam translation is camera input, not avatar movement. Fishing locks - # the avatar after a cast, but the detached camera must remain movable. - # Camera/menu input ownership still stops freecam while an overlay is active. - if not _is_camera_input_enabled(): - _free_camera_body.velocity = Vector3.ZERO - _free_camera_body.move_and_slide() - return var input_vector: Vector2 = Input.get_vector( "move_left", "move_right", @@ -2043,11 +1804,7 @@ func get_active_gameplay_camera() -> Camera3D: func _set_target_zoom(value: float) -> void: - _target_zoom = clampf( - value, - 1.25 if _rv_interior_camera_mode else minimum_zoom, - 16.0 if _rv_interior_camera_mode else maximum_zoom, - ) + _target_zoom = clampf(value, minimum_zoom, maximum_zoom) func _apply_axis_deadzone(value: float) -> float: @@ -2080,14 +1837,10 @@ func get_network_peer_id() -> int: return _network_peer_id -func configure_network_remote( - authoritative_simulation: bool, - simulation_only: bool = false, -) -> void: +func configure_network_remote(authoritative_simulation: bool) -> 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 @@ -2095,7 +1848,6 @@ func configure_network_remote( _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 @@ -2107,43 +1859,10 @@ func configure_network_remote( _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 @@ -2151,45 +1870,8 @@ 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: @@ -2216,7 +1898,7 @@ func capture_network_input(sequence: int) -> Dictionary: "sprint": false, "sneak": false, "slow_walk": false, - "sitting": get_network_sitting_intent(), + "sitting": _sitting, "casting": ( _fishing_visual_phase == FishingVisualPhase.CASTING ), @@ -2241,66 +1923,13 @@ 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": get_network_sitting_intent(), + "sitting": _sitting, "casting": _fishing_visual_phase == FishingVisualPhase.CASTING, "animation_action": _make_animation_action_state(), } -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: +func apply_authoritative_network_input(data: Dictionary) -> void: var sequence: int = int(data.get("sequence", 0)) if sequence <= _last_network_input_sequence: return @@ -2310,11 +1939,6 @@ func apply_authoritative_network_input( _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)) @@ -2324,13 +1948,15 @@ func apply_authoritative_network_input( _network_sprint = bool(data.get("sprint", false)) _network_sneak = bool(data.get("sneak", false)) _network_slow_walk = bool(data.get("slow_walk", false)) - apply_authoritative_network_animation_action( - data.get("animation_action", {}) - ) + _apply_animation_action_state(data.get("animation_action", {})) _apply_network_casting(bool(data.get("casting", false))) - apply_authoritative_network_sitting_state( - bool(data.get("sitting", 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) func make_network_snapshot(peer_id: int) -> Dictionary: @@ -2340,49 +1966,19 @@ 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": make_network_animation_state(), - "grounded": is_on_floor(), - "sitting": get_network_sitting_state(), + "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, "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, @@ -2416,8 +2012,7 @@ func push_network_snapshot( ) _network_target_velocity = parsed["velocity"] _network_target_visual_yaw = parsed["visual_yaw"] - if not Dictionary(parsed.get("animation_state", {})).is_empty(): - _apply_network_target_animation_state(parsed["animation_state"]) + _apply_network_target_animation_state(parsed["animation_state"]) _network_snapshot_age = 0.0 _apply_network_casting(bool(parsed["casting"])) _set_sitting(bool(parsed["sitting"])) @@ -2433,7 +2028,6 @@ 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(): @@ -2466,226 +2060,16 @@ func apply_local_prediction_correction( authoritative_position += ( (parsed["velocity"] as Vector3) * transit_seconds ) - 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, + var error_distance: float = global_position.distance_to( + authoritative_position ) - if error_distance <= LOCAL_PREDICTION_CORRECTION_THRESHOLD: - _reset_local_prediction_error() - return - if error_distance >= LOCAL_PREDICTION_SNAP_DISTANCE: - _clear_local_reconciliation_offsets() + if error_distance > LOCAL_PREDICTION_SNAP_DISTANCE: global_position = authoritative_position - 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, + elif error_distance > LOCAL_PREDICTION_CORRECTION_THRESHOLD: + global_position = global_position.lerp( + authoritative_position, + LOCAL_PREDICTION_CORRECTION_WEIGHT, ) - ) - 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( @@ -2729,8 +2113,7 @@ func apply_network_teleport(snapshot: Dictionary) -> void: _network_target_position = global_position _network_target_velocity = velocity _network_target_visual_yaw = _visuals.rotation.y - if not Dictionary(parsed.get("animation_state", {})).is_empty(): - _apply_network_target_animation_state(parsed["animation_state"]) + _apply_network_target_animation_state(parsed["animation_state"]) _network_snapshot_age = 0.0 _network_snapshot_ready = true @@ -2756,16 +2139,12 @@ 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: 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) + 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) if ( snapshot.has("acknowledged_input") and ( @@ -2783,9 +2162,6 @@ 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() @@ -2797,7 +2173,6 @@ 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, @@ -2821,23 +2196,6 @@ 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"]) @@ -3015,11 +2373,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 @@ -3087,11 +2445,7 @@ func _is_movement_input_enabled() -> bool: func _is_camera_input_enabled() -> bool: - return ( - _camera_input_enabled - and _local_input_suppressors.is_empty() - and _camera_input_suppressors.is_empty() - ) + return _camera_input_enabled and _local_input_suppressors.is_empty() func set_camera_input_enabled(enabled: bool) -> void: @@ -3100,19 +2454,6 @@ func set_camera_input_enabled(enabled: bool) -> void: _set_camera_dragging(false) -func set_camera_input_suppressed( - owner: StringName, - suppressed: bool, -) -> void: - if owner.is_empty(): - return - if suppressed: - _camera_input_suppressors[owner] = true - _set_camera_dragging(false) - else: - _camera_input_suppressors.erase(owner) - - func set_camera_active(active: bool) -> void: if _free_camera_active and _free_camera != null: _free_camera.current = active @@ -3120,24 +2461,10 @@ 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( @@ -3146,50 +2473,6 @@ 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: @@ -3318,23 +2601,6 @@ 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: @@ -3507,52 +2773,7 @@ func set_held_fish( func _has_held_show_item() -> bool: - 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 + return _held_fish_visible or _held_art_kit_visible func _clear_held_fish() -> void: @@ -3760,8 +2981,6 @@ func _begin_catch_showcase_now( ) -> void: if _pocket_visual_target == PocketVisualTarget.CATCH_SHOWCASE: _cancel_pocket_visual() - if local_control_enabled: - set_local_input_suppressed(CATCH_SHOWCASE_INPUT_OWNER, true) _showcase_animation_active = true set_fishing_visual(false) _kill_showcase_camera_tween() @@ -3930,8 +3149,6 @@ func end_catch_showcase( not _showcase_visual_rotation_stored and _showcase_camera_snapshot == null ): - if local_control_enabled: - set_local_input_suppressed(CATCH_SHOWCASE_INPUT_OWNER, false) if restored_callback.is_valid(): restored_callback.call() return @@ -4085,13 +3302,14 @@ func _complete_showcase_restore( _camera_pitch.rotation = _showcase_camera_snapshot.pitch_rotation _spring_arm.spring_length = _showcase_camera_snapshot.spring_length _target_zoom = _showcase_camera_snapshot.target_zoom + _camera_input_enabled = ( + _showcase_camera_snapshot.camera_input_enabled + ) _set_camera_dragging( _showcase_camera_snapshot.camera_dragging and Input.is_action_pressed("camera_drag") ) _showcase_camera_snapshot = null - if local_control_enabled: - set_local_input_suppressed(CATCH_SHOWCASE_INPUT_OWNER, false) if restored_callback.is_valid(): restored_callback.call() @@ -4105,7 +3323,9 @@ func _capture_showcase_camera_snapshot() -> void: _showcase_camera_snapshot.pitch_rotation = _camera_pitch.rotation _showcase_camera_snapshot.spring_length = _spring_arm.spring_length _showcase_camera_snapshot.target_zoom = _target_zoom + _showcase_camera_snapshot.camera_input_enabled = _camera_input_enabled _showcase_camera_snapshot.camera_dragging = _camera_dragging + _camera_input_enabled = false _set_camera_dragging(false) diff --git a/player/player.tscn b/player/player.tscn index 3288d2d..4a2d897 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/straywild_base_character.glb" id="13_character"] +[ext_resource type="PackedScene" path="res://art/exported/characters/base/netfishing_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 b071b2c..745fc3c 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 = &"straywild_runtime_material" +const RUNTIME_MATERIAL_META: StringName = &"netfishing_runtime_material" const RUNTIME_FUR_PATTERN_MATERIAL_META: StringName = ( - &"straywild_runtime_fur_pattern_material" + &"netfishing_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 febe43d..7ac8767 100644 --- a/progression/player_appearance_store.gd +++ b/progression/player_appearance_store.gd @@ -13,10 +13,6 @@ 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_art_unlocks.gd b/progression/player_art_unlocks.gd index 0bc7acc..c6a6e57 100644 --- a/progression/player_art_unlocks.gd +++ b/progression/player_art_unlocks.gd @@ -7,7 +7,6 @@ signal unlocks_changed(unlock_mask: int) const BASE_BRUSH_SIZE: int = 1 const BASE_GRID_SIZE: int = 16 -const STAMP_PRODUCT_ID: StringName = &"stamp_tool" const BRUSH_SIZES: Array[int] = [1, 2, 3, 4] const GRID_SIZES: Array[int] = [16, 32, 64, 128] @@ -26,7 +25,6 @@ const PRODUCT_BITS: Dictionary[StringName, int] = { &"grid_32x": 10, &"grid_64x": 11, &"grid_128x": 12, - STAMP_PRODUCT_ID: 13, } const COLOR_PRODUCTS: Dictionary[StringName, StringName] = { &"marker_ocean_teal": &"ocean_teal", @@ -47,7 +45,7 @@ const GRID_PRODUCTS: Dictionary[StringName, int] = { &"grid_64x": 64, &"grid_128x": 128, } -const ALL_UNLOCK_MASK: int = (1 << 14) - 1 +const ALL_UNLOCK_MASK: int = (1 << 13) - 1 var _unlock_mask: int = 0 @@ -148,10 +146,6 @@ func is_grid_size_unlocked(grid_size: int) -> bool: return grid_size in get_unlocked_grid_sizes() -func is_stamp_unlocked() -> bool: - return owns_product(STAMP_PRODUCT_ID) - - static func get_product_bit(product_id: StringName) -> int: return int(PRODUCT_BITS.get(product_id, -1)) diff --git a/progression/player_cooler_capacity.gd b/progression/player_cooler_capacity.gd index bbd0b87..b8c62be 100644 --- a/progression/player_cooler_capacity.gd +++ b/progression/player_cooler_capacity.gd @@ -2,77 +2,62 @@ 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) -## 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. +## 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. 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 _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() +var _capacity_level: int = 0 func get_level() -> int: - return _legacy_capacity_level + return _capacity_level func get_capacity() -> int: - 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)] + return CAPACITIES[_capacity_level] func get_next_capacity() -> int: - return -1 + if _capacity_level >= MAX_LEVEL: + return -1 + return CAPACITIES[_capacity_level + 1] func get_next_cost() -> int: - return -1 + if _capacity_level >= MAX_LEVEL: + return -1 + return EXPANSION_COSTS[_capacity_level] -func can_purchase(_wallet: PlayerWalletType) -> bool: - return false +func can_purchase(wallet: PlayerWalletType) -> bool: + var cost: int = get_next_cost() + return wallet != null and cost >= 0 and wallet.can_afford(cost) -func 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 restore_level(level: int) -> bool: var validated: int = clampi(level, 0, MAX_LEVEL) - var changed: bool = _legacy_capacity_level != validated - _legacy_capacity_level = validated + var changed: bool = _capacity_level != validated + _capacity_level = validated if changed: - capacity_changed.emit(get_level(), get_capacity()) + capacity_changed.emit(_capacity_level, get_capacity()) return true @@ -81,8 +66,4 @@ func reset_to_defaults() -> void: func to_save_data() -> Dictionary: - return {"capacity_level": get_level()} - - -func _on_home_changed() -> void: - capacity_changed.emit(get_level(), get_capacity()) + return {"capacity_level": _capacity_level} diff --git a/project.godot b/project.godot index 5bcbb4d..c09f8a1 100644 --- a/project.godot +++ b/project.godot @@ -10,11 +10,11 @@ config_version=5 [application] -config/name="straywild" -config/version="0.20.2-alpha" +config/name="NETFISHING" +config/version="0.13.1-alpha" run/main_scene="res://main/main.tscn" config/features=PackedStringArray("4.7", "GL Compatibility") -config/icon="res://art/exported/system_icons/straywild_256.png" +config/icon="res://art/exported/system_icons/netfishing_256.png" [autoload] @@ -26,11 +26,10 @@ window/stretch/aspect="expand" [editor_plugins] -enabled=PackedStringArray("res://addons/straywild_shoreline_baker/plugin.cfg") +enabled=PackedStringArray("res://addons/netfishing_shoreline_baker/plugin.cfg") [gui] -timers/tooltip_delay_sec=0.0 theme/custom="res://ui/game_theme.tres" [input] @@ -108,11 +107,6 @@ fish_primary={ , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":10,"pressure":0.0,"pressed":false,"script":null) ] } -reel_alternate={ -"deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":96,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -] -} camera_drag={ "deadzone": 0.2, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":32,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) @@ -260,7 +254,7 @@ alternate_fishing={ [network] -discovery/base_url="https://discovery.straywild.io/patron-test" +discovery/base_url="https://discovery.netfishing.org" [physics] diff --git a/save/player_save_inspection.gd b/save/player_save_inspection.gd index ff14de6..be5fd24 100644 --- a/save/player_save_inspection.gd +++ b/save/player_save_inspection.gd @@ -14,10 +14,6 @@ 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 c41f861..159a9bc 100644 --- a/save/player_save_manager.gd +++ b/save/player_save_manager.gd @@ -31,18 +31,11 @@ const WorldTimeServiceType = preload("res://world/world_time_service.gd") const WorldWeatherServiceType = preload( "res://world/world_weather_service.gd" ) -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 = 11 -const LEGACY_SAVE_FILENAME := "player_save.json" -const ARCHIVE_EXTENSION := ".nfsave" +const SAVE_VERSION: int = 8 const BASIC_ROD_ID: StringName = &"basic_fishing_rod" const MAX_SAFE_BALANCE: int = 1000000000000 -const DEFAULT_WORLD_SEED: int = 13001 -const MAX_WORLD_SEED: int = 2147483646 class LoadSnapshot: extends RefCounted @@ -50,13 +43,10 @@ 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] = [] var unlocked_bait_ids: Array[StringName] = [] - var active_bait_id: StringName - var active_lure_id: StringName var hotbar_slots: Array[StringName] = [] var fish_hotbar_slots: Array[StringName] = [] var selected_hotbar_slot: int = 0 @@ -66,8 +56,6 @@ class LoadSnapshot: var cooler_capacity_level: int = 0 var art_unlock_mask: int = 0 var total_experience: int = 0 - var world_layout: StringName = WorldLayoutType.GENERATED - var world_seed: int = DEFAULT_WORLD_SEED var world_time_hours: float = WorldTimeServiceType.DEFAULT_START_HOUR var has_world_weather_state: bool = false var world_weather: WorldWeatherServiceType.Weather = ( @@ -77,7 +65,6 @@ 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 @@ -97,8 +84,6 @@ var _experience: PlayerExperienceType 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 @@ -108,27 +93,11 @@ var _autosave_enabled: bool = false var _save_path := "" var _expected_hash := "" var _data_root: PlayerDataRoot -var _world_layout: StringName = WorldLayoutType.GENERATED -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: @@ -139,21 +108,6 @@ func _backup_path() -> String: return _save_path + ".backup" -func _codec_scratch_path() -> String: - return _save_path + ".codec.tmp" - - -func _legacy_save_path() -> String: - return _save_path.get_base_dir().path_join(LEGACY_SAVE_FILENAME) - - -func _read_path() -> String: - if FileAccess.file_exists(_save_path): - return _save_path - var legacy: String = _legacy_save_path() - return legacy if FileAccess.file_exists(legacy) else "" - - func _ready() -> void: _autosave_timer = Timer.new() _autosave_timer.one_shot = true @@ -177,8 +131,6 @@ func setup( world_time: WorldTimeServiceType, world_weather: WorldWeatherServiceType, jobs: PlayerJobServiceType, - player: PlayerType, - home_state: PlayerHomeStateType, ) -> void: _inventory = inventory _collection_log = collection_log @@ -195,8 +147,6 @@ func setup( _world_time = world_time _world_weather = world_weather _jobs = jobs - _player = player - _home_state = home_state _is_configured = ( _inventory != null and _collection_log != null @@ -213,8 +163,6 @@ func setup( and _world_time != null 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.") @@ -257,12 +205,6 @@ func setup( _experience.experience_changed.connect(_on_experience_changed) if not _jobs.changed.is_connected(_mark_dirty): _jobs.changed.connect(_mark_dirty) - if not _player.active_bait_changed.is_connected(_on_active_tackle_changed): - _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: @@ -270,22 +212,24 @@ func load_player_data() -> bool: return false _automatic_saving_blocked = false _recover_interrupted_write() - var read_path: String = _read_path() - if _save_path.is_empty() or read_path.is_empty(): + if _save_path.is_empty() or not FileAccess.file_exists(_save_path): _is_dirty = false return true - var decoded: Dictionary = ProgressionSaveCodec.read_local_save( - read_path, - read_path == _legacy_save_path(), - ) - if not bool(decoded.get("ok", false)): - _handle_corrupt_save("Player save could not be decoded.", read_path) + + var save_file := FileAccess.open(_save_path, FileAccess.READ) + if save_file == null: + _handle_corrupt_save("Unable to open player save.") return false - _expected_hash = ( - PortableFileGuard.hash_file(_save_path) - if read_path == _save_path else "" - ) - var save_data: Dictionary = decoded["data"] + var json_text: String = save_file.get_as_text() + save_file.close() + _expected_hash = PortableFileGuard.hash_file(_save_path) + + var json := JSON.new() + var parse_error: Error = json.parse(json_text) + if parse_error != OK or typeof(json.data) != TYPE_DICTIONARY: + _handle_corrupt_save("Player save contains malformed JSON.") + return false + var save_data: Dictionary = json.data var version: int = _read_integer(save_data.get("save_version"), -1) if version > SAVE_VERSION: _automatic_saving_blocked = true @@ -302,16 +246,13 @@ func load_player_data() -> bool: save_data = _migrate_save(save_data, version) if save_data.is_empty(): _handle_corrupt_save( - "Player save version %d is unsupported." % version, - read_path, + "Player save version %d is unsupported." % version ) return false var snapshot: LoadSnapshot = _build_load_snapshot(save_data) if snapshot == null: - _handle_corrupt_save( - "Player save failed structural validation.", read_path - ) + _handle_corrupt_save("Player save failed structural validation.") return false _is_restoring = true @@ -320,10 +261,9 @@ func load_player_data() -> bool: snapshot.next_catch_sequence ) var collection_restored: bool = ( - _collection_log.replace_collection_state( + _collection_log.replace_discovery_state( snapshot.discovered_ids, snapshot.discovered_quality_masks, - snapshot.catch_counts, ) ) var wallet_restored: bool = _wallet.restore_balance( @@ -333,16 +273,10 @@ func load_player_data() -> bool: _bag.replace_all_items(snapshot.bag_items) and _bag.replace_unlocked_bait_ids(snapshot.unlocked_bait_ids) ) - var tackle_restored: bool = _restore_tackle_selection(snapshot) var upgrades_restored: bool = _fishing_upgrades.restore_levels( 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 ) @@ -364,8 +298,6 @@ func load_player_data() -> bool: var world_time_restored: bool = ( _world_time.restore_persistent_time_hours(snapshot.world_time_hours) ) - _world_layout = snapshot.world_layout - _world_seed = snapshot.world_seed var world_weather_restored: bool = true if snapshot.has_world_weather_state: world_weather_restored = _world_weather.restore_persistent_state( @@ -379,7 +311,6 @@ func load_player_data() -> bool: or not collection_restored or not wallet_restored or not bag_restored - or not tackle_restored or not hotbar_restored or not upgrades_restored or not cooler_restored @@ -389,21 +320,19 @@ 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 " + + "inventory=%s collection=%s wallet=%s bag=%s hotbar=%s " + "upgrades=%s cooler=%s layout=%s art=%s experience=%s " - + "time=%s weather=%s jobs=%s home=%s" + + "time=%s weather=%s jobs=%s" ) % [ inventory_restored, collection_restored, wallet_restored, bag_restored, - tackle_restored, hotbar_restored, upgrades_restored, cooler_restored, @@ -413,14 +342,11 @@ func load_player_data() -> bool: world_time_restored, world_weather_restored, jobs_restored, - home_restored, ] ) return false _is_dirty = false - if read_path == _legacy_save_path(): - _migrate_legacy_plaintext_save(save_data, read_path) print( "Loaded player save version %d with %d catches." % [SAVE_VERSION, snapshot.catches.size()] @@ -429,36 +355,26 @@ func load_player_data() -> bool: func inspect_save() -> SaveInspectionType: - _recover_interrupted_write() - var read_path: String = _read_path() - 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) + _recover_interrupted_write() + result.has_primary_file = FileAccess.file_exists(_save_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( - path, - allow_legacy_plaintext, - ) - if not bool(decoded.get("ok", false)): + var save_file := FileAccess.open(_save_path, FileAccess.READ) + if save_file == null: result.status = SaveInspectionType.Status.IO_ERROR result.message = "the save could not be read." return result - var save_data: Dictionary = decoded["data"] + var json := JSON.new() + var parse_error: Error = json.parse(save_file.get_as_text()) + save_file.close() + if parse_error != OK or typeof(json.data) != TYPE_DICTIONARY: + result.status = SaveInspectionType.Status.MALFORMED + result.message = "the save is corrupt and was preserved." + return result + var save_data: Dictionary = json.data result.detected_version = _read_integer(save_data.get("save_version"), -1) if result.detected_version > SAVE_VERSION: result.status = SaveInspectionType.Status.UNSUPPORTED_VERSION @@ -483,237 +399,22 @@ func inspect_progression_at_path( 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 -func export_progression_archive(path: String) -> Dictionary: - if not _is_configured or path.is_empty(): - return {"ok": false, "message": "progression export is unavailable."} - if _is_dirty and not save_if_dirty(): - return {"ok": false, "message": "progression could not be saved first."} - var source_path: String = _read_path() - if source_path.is_empty(): - return {"ok": false, "message": "there is no progression to export."} - 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 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"], - 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( - destination_path, - bytes, - 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(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." - return verified - - -func inspect_progression_archive(path: String) -> Dictionary: - var decoded: Dictionary = ProgressionSaveCodec.read_archive(path) - if not bool(decoded.get("ok", false)): - return { - "ok": false, - "message": str(decoded.get("message", "could not open progression archive.")), - } - var prepared: Dictionary = _prepare_external_save_data(decoded["data"]) - if not bool(prepared.get("ok", false)): - return prepared - prepared["game_version"] = str(decoded.get("game_version", "")) - prepared["created_at_unix"] = int(decoded.get("created_at_unix", 0)) - return prepared - - -func import_progression_archive(path: String) -> Dictionary: +func initialize_new_game() -> bool: if not _is_configured: - return {"ok": false, "message": "progression import is unavailable."} - var inspected: Dictionary = inspect_progression_archive(path) - if not bool(inspected.get("ok", false)): - return inspected - var current_path: String = _read_path() - if not current_path.is_empty() and not _archive_replaced_save(current_path): - return {"ok": false, "message": "the current progression could not be backed up."} - var expected_hash: String = PortableFileGuard.hash_file(_save_path) - var result: Dictionary = _write_current_save_data( - inspected["data"], expected_hash - ) - if not bool(result.get("ok", false)): - return {"ok": false, "message": "the imported progression could not be installed."} - _expected_hash = str(result.get("hash", "")) - _remove_legacy_save_files() - _is_dirty = false - _automatic_saving_blocked = false - return { - "ok": true, - "message": "progression imported.", - "catch_count": inspected["catch_count"], - "wallet_balance": inspected["wallet_balance"], - "discovered_species_count": inspected["discovered_species_count"], - } - - -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, -) -> bool: - if not _is_configured: - return false - if ( - world_seed <= 0 - or world_seed > MAX_WORLD_SEED - or not WorldLayoutType.is_valid(world_layout) - ): return false _automatic_saving_blocked = false _restore_defaults() - _world_layout = world_layout - _world_seed = world_seed - _is_dirty = true return true -func get_world_layout() -> StringName: - return _world_layout - - -func get_world_seed() -> int: - return _world_seed - - -static func roll_world_seed() -> int: - var random := RandomNumberGenerator.new() - random.randomize() - return random.randi_range(1, MAX_WORLD_SEED) - - func delete_progression_save() -> bool: - for primary_path: String in [_save_path, _legacy_save_path()]: - if ( - FileAccess.file_exists(primary_path) - and not _remove_if_present(primary_path) - ): - return false - for path: String in [ - _temp_path(), - _backup_path(), - _codec_scratch_path(), - _legacy_save_path() + ".tmp", - _legacy_save_path() + ".backup", - ]: + if FileAccess.file_exists(_save_path) and not _remove_if_present(_save_path): + return false + for path: String in [_temp_path(), _backup_path()]: if FileAccess.file_exists(path) and not _remove_if_present(path): push_warning("Unable to remove stale player-save auxiliary file.") if _autosave_timer != null: @@ -765,8 +466,16 @@ func save_now() -> bool: var save_data: Dictionary = _build_save_dictionary() if save_data.is_empty(): return false - var result: Dictionary = _write_current_save_data( - save_data, _expected_hash + var json_text: String = JSON.stringify(save_data, "\t") + if json_text.is_empty(): + return false + + var result := PortableFileGuard.write_guarded( + _save_path, + json_text.to_utf8_buffer(), + _expected_hash, + _data_root.conflict_directory(), + _data_root.device_id, ) if bool(result.get("conflict", false)): _data_root.report_conflict( @@ -819,20 +528,6 @@ 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(): @@ -860,17 +555,6 @@ func _build_save_dictionary() -> Dictionary: ) ): return {} - var active_bait_id: StringName = _player.active_bait_id - var active_lure_id: StringName = _player.active_lure_id - if ( - (not active_bait_id.is_empty() and not _valid_active_tackle( - active_bait_id, true - )) - or (not active_lure_id.is_empty() and not _valid_active_tackle( - active_lure_id, false - )) - ): - return {} return { "save_version": SAVE_VERSION, @@ -880,7 +564,6 @@ 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(), @@ -890,10 +573,6 @@ func _build_save_dictionary() -> Dictionary: "items": serialized_items, "unlocked_bait_ids": serialized_unlocked_baits, }, - "tackle": { - "active_bait_id": String(active_bait_id), - "active_lure_id": String(active_lure_id), - }, "hotbar": { "selected_slot": _hotbar.get_selected_slot(), "slots": serialized_slots, @@ -905,8 +584,6 @@ func _build_save_dictionary() -> Dictionary: "art": _art_unlocks.to_save_data(), "experience": _experience.to_save_data(), "world": { - "layout": String(_world_layout), - "seed": _world_seed, "time_hours": _world_time.get_persistent_time_hours(), "weather": int(_world_weather.get_persistent_weather()), "weather_seconds_remaining": ( @@ -914,7 +591,6 @@ func _build_save_dictionary() -> Dictionary: ), }, "jobs": _jobs.to_save_data(), - "home": _home_state.to_save_data(), } @@ -924,24 +600,20 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: or typeof(save_data.get("collection")) != TYPE_DICTIONARY or typeof(save_data.get("inventory")) != TYPE_DICTIONARY or typeof(save_data.get("bag")) != TYPE_DICTIONARY - or typeof(save_data.get("tackle")) != TYPE_DICTIONARY or typeof(save_data.get("hotbar")) != TYPE_DICTIONARY 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"] var collection_data: Dictionary = save_data["collection"] var inventory_data: Dictionary = save_data["inventory"] var bag_data: Dictionary = save_data["bag"] - var tackle_data: Dictionary = save_data["tackle"] var hotbar_data: Dictionary = save_data["hotbar"] 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"] @@ -973,12 +645,6 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: and typeof(bag_data.get("unlocked_bait_ids")) != TYPE_ARRAY ) or typeof(hotbar_data.get("slots")) != TYPE_ARRAY - or typeof(tackle_data.get("active_bait_id")) not in [ - TYPE_STRING, TYPE_STRING_NAME, - ] - or typeof(tackle_data.get("active_lure_id")) not in [ - TYPE_STRING, TYPE_STRING_NAME, - ] or not hotbar_data.has("selected_slot") or not experience_data.has("total_experience") ): @@ -998,20 +664,6 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: return null var snapshot := LoadSnapshot.new() - if world_data.has("layout"): - if not WorldLayoutType.is_valid(world_data["layout"]): - return null - snapshot.world_layout = WorldLayoutType.normalized( - world_data["layout"] - ) - if world_data.has("seed"): - snapshot.world_seed = _read_integer( - world_data["seed"], - -1, - MAX_WORLD_SEED, - ) - if snapshot.world_seed <= 0: - return null snapshot.inventory_layout_data = inventory_layout_data.duplicate(true) snapshot.wallet_balance = balance snapshot.total_experience = _read_integer( @@ -1024,12 +676,6 @@ 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"] @@ -1091,30 +737,6 @@ 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] = {} @@ -1165,13 +787,6 @@ 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, @@ -1254,16 +869,6 @@ func _build_load_snapshot(save_data: Dictionary) -> LoadSnapshot: ): seen_unlocked_baits[owned.item_id] = true snapshot.unlocked_bait_ids.append(owned.item_id) - snapshot.active_bait_id = _validated_tackle_id( - StringName(str(tackle_data.get("active_bait_id", ""))), - true, - seen_items, - ) - snapshot.active_lure_id = _validated_tackle_id( - StringName(str(tackle_data.get("active_lure_id", ""))), - false, - seen_items, - ) var slot_values: Array = hotbar_data["slots"] snapshot.hotbar_slots.resize(PlayerHotbarType.SLOT_COUNT) @@ -1326,26 +931,6 @@ 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, @@ -1380,12 +965,6 @@ func _migrate_save( migrated = _migrate_version_6_to_7(migrated) 7: migrated = _migrate_version_7_to_8(migrated) - 8: - 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(): @@ -1622,34 +1201,6 @@ func _migrate_version_7_to_8(data: Dictionary) -> Dictionary: return migrated -func _migrate_version_8_to_9(data: Dictionary) -> Dictionary: - var migrated: Dictionary = data.duplicate(true) - var world_data: Dictionary = {} - if typeof(migrated.get("world")) == TYPE_DICTIONARY: - world_data = (migrated["world"] as Dictionary).duplicate(true) - world_data["seed"] = DEFAULT_WORLD_SEED - migrated["world"] = world_data - migrated["save_version"] = 9 - return migrated - - -func _migrate_version_9_to_10(data: Dictionary) -> Dictionary: - var migrated: Dictionary = data.duplicate(true) - migrated["tackle"] = { - "active_bait_id": "", - "active_lure_id": "", - } - migrated["save_version"] = 10 - 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 @@ -1699,177 +1250,33 @@ func _on_experience_changed(_total_experience: int, _level: int) -> void: _mark_dirty() -func _on_active_tackle_changed(_item_id: StringName) -> void: - _mark_dirty() - - func _on_autosave_timeout() -> void: if _is_dirty: save_now() func _recover_interrupted_write() -> void: - _remove_if_present(_codec_scratch_path()) - _recover_path_write(_save_path) - _recover_path_write(_legacy_save_path()) - - -func _recover_path_write(path: String) -> void: - var temporary: String = path + ".tmp" - var backup: String = path + ".backup" - if FileAccess.file_exists(path): - _remove_if_present(temporary) - _remove_if_present(backup) + if FileAccess.file_exists(_save_path): + _remove_if_present(_temp_path()) + _remove_if_present(_backup_path()) return - if FileAccess.file_exists(backup): - _rename_file(backup, path) - _remove_if_present(temporary) + if FileAccess.file_exists(_backup_path()): + _rename_file(_backup_path(), _save_path) + _remove_if_present(_temp_path()) -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, - destination_path + ".codec.tmp", - ) - if bytes.is_empty(): - return {"ok": false} - return PortableFileGuard.write_guarded( - destination_path, - bytes, - expected_hash, - _data_root.conflict_directory(), - _data_root.device_id, - ) - - -func _prepare_external_save_data(value: Variant) -> Dictionary: - if typeof(value) != TYPE_DICTIONARY: - return {"ok": false, "message": "progression data is malformed."} - var save_data: Dictionary = (value as Dictionary).duplicate(true) - var version: int = _read_integer(save_data.get("save_version"), -1) - if version > SAVE_VERSION: - return { - "ok": false, - "message": "this progression belongs to a newer game version.", - } - if version < 1: - return {"ok": false, "message": "the progression version is unsupported."} - if version != SAVE_VERSION: - save_data = _migrate_save(save_data, version) - if save_data.is_empty(): - return { - "ok": false, - "message": "the progression version is unsupported.", - } - var snapshot: LoadSnapshot = _build_load_snapshot(save_data) - if snapshot == null: - return {"ok": false, "message": "the progression is structurally invalid."} - return { - "ok": true, - "data": save_data, - "catch_count": snapshot.catches.size(), - "wallet_balance": snapshot.wallet_balance, - "discovered_species_count": snapshot.discovered_ids.size(), - "world_layout": String(snapshot.world_layout), - "world_seed": snapshot.world_seed, - } - - -func _migrate_legacy_plaintext_save( - save_data: Dictionary, - legacy_path: String, -) -> void: - var result: Dictionary = _write_current_save_data(save_data, "") - if not bool(result.get("ok", false)): - push_warning("Legacy progression loaded but could not be encrypted yet.") - return - _expected_hash = str(result.get("hash", "")) - if not _archive_replaced_save(legacy_path, "plaintext-migration"): - push_warning( - "Legacy progression was encrypted, but its migration backup failed." - ) - return - _remove_legacy_save_files() - print("Upgraded legacy plaintext progression to the opaque save format.") - - -func _archive_replaced_save( - source_path: String, - reason: String = "before-import", -) -> bool: - if source_path.is_empty() or not FileAccess.file_exists(source_path): - return true - var timestamp: String = Time.get_datetime_string_from_system().replace( - ":", "-" - ) - var destination: String = _data_root.root_path.path_join( - "backups/saves/player-save-%s-%s%s" - % [reason, timestamp, ARCHIVE_EXTENSION] - ) - if FileAccess.file_exists(destination): - destination = destination.trim_suffix(ARCHIVE_EXTENSION) + ( - "-%s%s" % [Time.get_ticks_usec(), ARCHIVE_EXTENSION] - ) - var decoded: Dictionary = ProgressionSaveCodec.read_local_save( - source_path, - source_path == _legacy_save_path(), - ) - var bytes: PackedByteArray - if bool(decoded.get("ok", false)): - var prepared: Dictionary = _prepare_external_save_data(decoded["data"]) - if bool(prepared.get("ok", false)): - bytes = ProgressionSaveCodec.encode_archive( - prepared["data"], destination + ".codec.tmp" - ) - if bytes.is_empty(): - bytes = PortableFileGuard.read_bytes(source_path) - destination = ( - destination.trim_suffix(ARCHIVE_EXTENSION) + ".preserved" - ) - if bytes.is_empty(): - return false - var result: Dictionary = PortableFileGuard.write_guarded( - destination, - bytes, - "", - _data_root.conflict_directory(), - _data_root.device_id, - ) - return bool(result.get("ok", false)) - - -func _remove_legacy_save_files() -> void: - for path: String in [ - _legacy_save_path(), - _legacy_save_path() + ".tmp", - _legacy_save_path() + ".backup", - ]: - _remove_if_present(path) - - -func _handle_corrupt_save(message: String, source_path: String) -> void: +func _handle_corrupt_save(message: String) -> void: push_warning(message) _restore_defaults() - if not FileAccess.file_exists(source_path): + if not FileAccess.file_exists(_save_path): return var timestamp: int = int(Time.get_unix_time_from_system()) var corrupt_path: String = ( - "%s.corrupt-%d" % [source_path, timestamp] + "%s.corrupt-%d" % [_save_path, timestamp] ) if FileAccess.file_exists(corrupt_path): corrupt_path += "-%d" % Time.get_ticks_usec() - if not _rename_file(source_path, corrupt_path): + if not _rename_file(_save_path, corrupt_path): _automatic_saving_blocked = true push_warning( "Corrupt player save was left in place; automatic saving is " @@ -1884,7 +1291,6 @@ 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 @@ -1895,17 +1301,14 @@ func _restore_defaults() -> void: default_slots.fill(StringName()) default_slots[0] = BASIC_ROD_ID _inventory.replace_all_catches(empty_catches, 1) - _collection_log.replace_collection_state( + _collection_log.replace_discovery_state( empty_discoveries, empty_quality_masks, - empty_catch_counts, ) _wallet.restore_balance(0) _bag.replace_all_items(default_items) var default_unlocked_baits: Array[StringName] = [] _bag.replace_unlocked_bait_ids(default_unlocked_baits) - _player.unequip_bait() - _player.unequip_lure() _fishing_upgrades.reset_to_defaults() _cooler_capacity.reset_to_defaults() _inventory_layout.reset_to_defaults() @@ -1916,61 +1319,11 @@ func _restore_defaults() -> void: WorldTimeServiceType.DEFAULT_START_HOUR ) _world_weather.reset_persistent_state() - _world_layout = WorldLayoutType.GENERATED - _world_seed = DEFAULT_WORLD_SEED _jobs.reset_to_defaults() - _home_state.reset_to_defaults() _is_restoring = false _is_dirty = false -func _valid_active_tackle(item_id: StringName, bait: bool) -> bool: - var item = _item_catalog.get_item_by_id(item_id) - return ( - item != null - and item.is_available() - and (item.is_bait() if bait else item.is_lure()) - and _bag.owns_item(item_id) - ) - - -func _validated_tackle_id( - item_id: StringName, - bait: bool, - seen_items: Dictionary[StringName, bool], -) -> StringName: - if item_id.is_empty(): - return StringName() - var item = _item_catalog.get_item_by_id(item_id) - if ( - item == null - or not item.is_available() - or not seen_items.has(item_id) - or not (item.is_bait() if bait else item.is_lure()) - ): - push_warning("Skipped invalid saved active tackle '%s'." % String(item_id)) - return StringName() - return item_id - - -func _restore_tackle_selection(snapshot: LoadSnapshot) -> bool: - _player.unequip_bait() - _player.unequip_lure() - var bait_restored: bool = ( - snapshot.active_bait_id.is_empty() - or _player.equip_bait( - _item_catalog.get_item_by_id(snapshot.active_bait_id) - ) - ) - var lure_restored: bool = ( - snapshot.active_lure_id.is_empty() - or _player.equip_lure( - _item_catalog.get_item_by_id(snapshot.active_lure_id) - ) - ) - return bait_restored and lure_restored - - func _read_integer( value: Variant, invalid_value: int, diff --git a/save/player_save_slot_catalog.gd b/save/player_save_slot_catalog.gd deleted file mode 100644 index d3b9d23..0000000 --- a/save/player_save_slot_catalog.gd +++ /dev/null @@ -1,591 +0,0 @@ -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 deleted file mode 100644 index 8906f5a..0000000 --- a/save/player_save_slot_catalog.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://djfeifv7xrqdt diff --git a/save/progression_save_codec.gd b/save/progression_save_codec.gd deleted file mode 100644 index 4d0ba33..0000000 --- a/save/progression_save_codec.gd +++ /dev/null @@ -1,191 +0,0 @@ -class_name ProgressionSaveCodec -extends RefCounted - -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" -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" -) - - -static func encode_local_save( - save_data: Dictionary, - scratch_path: String, -) -> PackedByteArray: - return _encode_container(LOCAL_KIND, save_data, scratch_path) - - -static func encode_archive( - save_data: Dictionary, - scratch_path: String, -) -> PackedByteArray: - return _encode_container(ARCHIVE_KIND, save_data, scratch_path) - - -static func read_local_save( - path: String, - allow_legacy_plaintext: bool = false, -) -> Dictionary: - if allow_legacy_plaintext and not _looks_encrypted(path): - var legacy: Dictionary = _read_plaintext_dictionary(path) - if bool(legacy.get("ok", false)): - legacy["legacy_plaintext"] = true - return legacy - return _read_container(path, LOCAL_KIND) - - -static func read_archive(path: String) -> Dictionary: - if not _looks_encrypted(path): - return {"ok": false, "message": "progression archive is not recognized."} - return _read_container(path, ARCHIVE_KIND) - - -static func _encode_container( - kind: String, - save_data: Dictionary, - scratch_path: String, -) -> PackedByteArray: - if save_data.is_empty() or scratch_path.is_empty(): - return PackedByteArray() - var payload_json: String = JSON.stringify(save_data) - if payload_json.is_empty(): - return PackedByteArray() - var payload_bytes: PackedByteArray = payload_json.to_utf8_buffer() - var envelope: Dictionary = { - "magic": MAGIC, - "format_version": FORMAT_VERSION, - "kind": kind, - "game_version": str( - ProjectSettings.get_setting("application/config/version", "") - ), - "created_at_unix": int(Time.get_unix_time_from_system()), - "payload_sha256": PortableFileGuard.hash_bytes(payload_bytes), - "payload_json": payload_json, - } - if DirAccess.make_dir_recursive_absolute( - scratch_path.get_base_dir() - ) != OK: - return PackedByteArray() - _remove_if_present(scratch_path) - var file: FileAccess = FileAccess.open_encrypted_with_pass( - scratch_path, - FileAccess.WRITE, - CONTAINER_PASSPHRASE, - ) - if file == null: - return PackedByteArray() - file.store_string(JSON.stringify(envelope)) - file.flush() - var write_ok: bool = file.get_error() == OK - file.close() - if not write_ok: - _remove_if_present(scratch_path) - return PackedByteArray() - var encoded: PackedByteArray = PortableFileGuard.read_bytes( - scratch_path, - MAX_CONTAINER_BYTES, - ) - _remove_if_present(scratch_path) - return encoded - - -static func _read_container(path: String, expected_kind: String) -> Dictionary: - if ( - path.is_empty() - or not FileAccess.file_exists(path) - or FileAccess.get_size(path) > MAX_CONTAINER_BYTES - ): - return {"ok": false, "message": "progression file is unavailable."} - 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_json := JSON.new() - if ( - envelope_json.parse(envelope_text) != OK - or typeof(envelope_json.data) != TYPE_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") not in [MAGIC, LEGACY_MAGIC] - or int(envelope.get("format_version", -1)) != FORMAT_VERSION - or str(envelope.get("kind", "")) != expected_kind - ): - return {"ok": false, "message": "progression container is unsupported."} - var payload_json: String = str(envelope.get("payload_json", "")) - var payload_bytes: PackedByteArray = payload_json.to_utf8_buffer() - if ( - payload_json.is_empty() - or str(envelope.get("payload_sha256", "")) - != PortableFileGuard.hash_bytes(payload_bytes) - ): - return {"ok": false, "message": "progression container failed validation."} - var payload_parser := JSON.new() - if ( - payload_parser.parse(payload_json) != OK - or typeof(payload_parser.data) != TYPE_DICTIONARY - ): - return {"ok": false, "message": "progression payload is malformed."} - return { - "ok": true, - "data": payload_parser.data, - "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, - MAX_CONTAINER_BYTES, - ) - if bytes.is_empty(): - return {"ok": false} - var text: String = bytes.get_string_from_utf8() - if not text.strip_edges().begins_with("{"): - return {"ok": false} - var parser := JSON.new() - if parser.parse(text) != OK or typeof(parser.data) != TYPE_DICTIONARY: - return {"ok": false} - return {"ok": true, "data": parser.data} - - -static func _looks_encrypted(path: String) -> bool: - if not FileAccess.file_exists(path) or FileAccess.get_size(path) < 4: - return false - var file := FileAccess.open(path, FileAccess.READ) - if file == null: - return false - var header: PackedByteArray = file.get_buffer(4) - file.close() - return header == PackedByteArray([0x47, 0x44, 0x45, 0x43]) - - -static func _remove_if_present(path: String) -> void: - if FileAccess.file_exists(path): - DirAccess.remove_absolute(path) diff --git a/save/progression_save_codec.gd.uid b/save/progression_save_codec.gd.uid deleted file mode 100644 index 6db5823..0000000 --- a/save/progression_save_codec.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://lad8mvedktww diff --git a/scripts/build_android_debug.sh b/scripts/build_android_debug.sh index f68eb32..8f856f8 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/straywild-debug.apk" +readonly OUTPUT_PATH="${PROJECT_ROOT}/builds/android/NETfishing-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 d54ba70..a1874c4 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.20.2-alpha" +readonly BUILD_ROOT="${PROJECT_ROOT}/builds/v0.13.1-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/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 SOURCE_URL="https://forge.makearmy.io/woofmeow/netfishing" +readonly WINDOWS_ZIP="${BUILD_ROOT}/NETfishing-v0.13.1-alpha-windows-x86_64.zip" +readonly LINUX_ZIP="${BUILD_ROOT}/NETfishing-v0.13.1-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}/straywild.exe" + "${WINDOWS_DIR}/NETfishing.exe" "${GODOT_BIN}" \ --headless \ --path "${PROJECT_ROOT}" \ --export-release "Linux Desktop" \ - "${LINUX_DIR}/straywild.x86_64" + "${LINUX_DIR}/NETfishing.x86_64" for required_file in \ - "${WINDOWS_DIR}/straywild.exe" \ - "${WINDOWS_DIR}/straywild.pck" \ - "${LINUX_DIR}/straywild.x86_64" \ - "${LINUX_DIR}/straywild.pck"; do + "${WINDOWS_DIR}/NETfishing.exe" \ + "${WINDOWS_DIR}/NETfishing.pck" \ + "${LINUX_DIR}/NETfishing.x86_64" \ + "${LINUX_DIR}/NETfishing.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}/straywild.x86_64" +chmod +x -- "${LINUX_DIR}/NETfishing.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}/straywild-ASSET-LICENSE.md" + "${destination}/NETFISHING-ASSET-LICENSE.md" install -m 0644 "${PROJECT_ROOT}/docs/ATTRIBUTION.md" \ "${destination}/ATTRIBUTION.md" install -m 0644 "${PROJECT_ROOT}/TRADEMARKS.md" \ @@ -72,14 +72,11 @@ stage_licenses() { cat >"${destination}/SOURCE-CODE.md" <&2 exit 1 fi -if [[ "${straywild_ALLOW_DIRTY_RELEASE:-0}" != "1" ]]; then +if [[ "${NETFISHING_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 straywild-portmaster-export.XXXXXX + mktemp -d -t netfishing-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/straywild.ico' \ - --exclude '/art/exported/system_icons/straywild_1024.png' \ - --exclude '/art/exported/system_icons/straywild_1024.png.import' \ + --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 '/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}/straywild.sh" "${STAGE_ROOT}/straywild.sh" +install -m 0755 "${TEMPLATE_ROOT}/NETfishing.sh" "${STAGE_ROOT}/NETfishing.sh" install -m 0644 "${TEMPLATE_ROOT}/port.json" "${GAME_ROOT}/port.json" -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}/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}/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/straywild-ASSET-LICENSE.md" + "${GAME_ROOT}/licenses/NETFISHING-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' straywild straywild.sh)" +readonly EXPECTED_TOP_LEVELS="$(printf '%s\n' NETfishing.sh netfishing)" 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": "straywild.zip"' "${GAME_ROOT}/port.json" +grep -q '"name": "netfishing.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 straywild/, not at the archive root." >&2 - exit 1 -fi -if grep -Eq '^[[:space:]]*#[[:space:]]*PORTMASTER:' \ - "${STAGE_ROOT}/straywild.sh"; then - echo "The distributable launcher contains an installed PortMaster signature." >&2 + echo "port.json must be inside netfishing/, not at the archive root." >&2 exit 1 fi +grep -q '^# PORTMASTER: netfishing.zip, NETfishing.sh$' \ + "${STAGE_ROOT}/NETfishing.sh" grep -Fq 'PROFILE_PATH="$CONFDIR/performance_profile"' \ - "${STAGE_ROOT}/straywild.sh" -grep -Fq 'straywild_PERFORMANCE_PROFILE=light' \ - "${STAGE_ROOT}/straywild.sh" + "${STAGE_ROOT}/NETfishing.sh" +grep -Fq 'NETFISHING_PERFORMANCE_PROFILE=light' \ + "${STAGE_ROOT}/NETfishing.sh" grep -Fq 'CONTROLLER_MAPPING_FILE="$CONFDIR/cache/controller_mapping.txt"' \ - "${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 + "${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 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-straywild.sh" + "${GAME_ROOT}/launch-netfishing.sh" grep -Fq 'export SDL_GAMECONTROLLERCONFIG' \ - "${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" + "${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" grep -Fq 'pm_platform_helper "$GAME_EXECUTABLE"' \ - "${STAGE_ROOT}/straywild.sh" -grep -Fq 'pm_finish' "${STAGE_ROOT}/straywild.sh" + "${STAGE_ROOT}/NETfishing.sh" +grep -Fq 'pm_finish' "${STAGE_ROOT}/NETfishing.sh" if [[ "$(grep -Ec '^[[:space:]]*\$GPTOKEYB[[:space:]]' \ - "${STAGE_ROOT}/straywild.sh")" -ne 1 ]]; then - echo "straywild must start exactly one GPTOKEYB exit handler." >&2 + "${STAGE_ROOT}/NETfishing.sh")" -ne 1 ]]; then + echo "NETfishing must start exactly one GPTOKEYB exit handler." >&2 exit 1 fi readonly GPTOKEYB_NOOP_KEYS=( @@ -307,13 +300,13 @@ readonly GPTOKEYB_NOOP_KEYS=( for noop_key in "${GPTOKEYB_NOOP_KEYS[@]}"; do if ! grep -Eq \ "^[[:space:]]*${noop_key}[[:space:]]*=[[:space:]]*\\\\\"[[:space:]]*$" \ - "${GAME_ROOT}/straywild.gptk"; then + "${GAME_ROOT}/netfishing.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}/straywild.gptk")" -ne "${#GPTOKEYB_NOOP_KEYS[@]}" ]]; then + "${GAME_ROOT}/netfishing.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 b9076ca..cb7eded 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 straywild-animalese-import.XXXXXX)" +readonly WORK_DIRECTORY="$(mktemp -d -t netfishing-animalese-import.XXXXXX)" cleanup() { - if [[ "$WORK_DIRECTORY" == /tmp/straywild-animalese-import.* ]]; then + if [[ "$WORK_DIRECTORY" == /tmp/netfishing-animalese-import.* ]]; then find "$WORK_DIRECTORY" -depth -delete fi } diff --git a/scripts/normalize_texture_imports.gd b/scripts/normalize_texture_imports.gd index e7b2406..5b78ec1 100644 --- a/scripts/normalize_texture_imports.gd +++ b/scripts/normalize_texture_imports.gd @@ -31,11 +31,6 @@ 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 @@ -158,8 +153,6 @@ 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) @@ -194,11 +187,6 @@ 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 0551efd..1483a61 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 straywild-godot-data.XXXXXX)" +readonly WORK_ROOT="$(mktemp -d -t netfishing-godot-data.XXXXXX)" trap 'rm -rf -- "${WORK_ROOT}"' EXIT cd "${PROJECT_ROOT}" diff --git a/scripts/portmaster/straywild.sh b/scripts/portmaster/NETfishing.sh similarity index 54% rename from scripts/portmaster/straywild.sh rename to scripts/portmaster/NETfishing.sh index d4e56a7..fe6d778 100755 --- a/scripts/portmaster/straywild.sh +++ b/scripts/portmaster/NETfishing.sh @@ -1,4 +1,5 @@ #!/bin/bash +# PORTMASTER: netfishing.zip, NETfishing.sh XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} @@ -12,60 +13,50 @@ else controlfolder="/roms/ports/PortMaster" fi +if [ ! -f "$controlfolder/control.txt" ]; then + echo "PortMaster control.txt was not found at $controlfolder" >&2 + exit 1 +fi + source "$controlfolder/control.txt" [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" get_controls -GAMEDIR="/${directory}/ports/straywild" +GAMEDIR="/${directory}/ports/netfishing" +if [ ! -d "$GAMEDIR" ] && [ -d "/mnt/mmc/ports/netfishing" ]; then + GAMEDIR="/mnt/mmc/ports/netfishing" +fi CONFDIR="$GAMEDIR/conf" -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" +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" CONTROLLER_MAPPING_FILE="$CONFDIR/cache/controller_mapping.txt" -WESTON_DIR="/tmp/straywild-weston" +WESTON_DIR="/tmp/netfishing-weston" WESTON_RUNTIME="weston_pkg_0.2" HARBOURMASTER="$controlfolder/harbourmaster" +if [ ! -x "$HARBOURMASTER" ] && [ -x "/mnt/mmc/MUOS/PortMaster/harbourmaster" ]; then + HARBOURMASTER="/mnt/mmc/MUOS/PortMaster/harbourmaster" +fi mkdir -p "$CONFDIR/data" "$CONFDIR/config" "$CONFDIR/cache" "$WESTON_DIR" chmod +x "$GAME_EXECUTABLE" -# 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. -straywild_DATA_ENVIRONMENT=() -if [ -f "$SAVEDIR/straywild_data.json" ] \ - || [ -f "$SAVEDIR/netfishing_data.json" ] || { +# New PortMaster installs use 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" ] || { [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json" ] && - [ ! -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" ] + [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json.backup" ] }; then mkdir -p "$SAVEDIR" - straywild_DATA_ENVIRONMENT+=( - "straywild_DATA_DIR=$SAVEDIR" - "straywild_CREATE_DATA_DIR=1" + NETFISHING_DATA_ENVIRONMENT+=( + "NETFISHING_DATA_DIR=$SAVEDIR" + "NETFISHING_CREATE_DATA_DIR=1" ) fi @@ -73,7 +64,7 @@ fi if [ ! -f "$controlfolder/libs/${WESTON_RUNTIME}.squashfs" ]; then if [ ! -x "$HARBOURMASTER" ]; then - pm_message "straywild requires the latest PortMaster and WestonPack runtime." + pm_message "NETfishing requires the latest PortMaster and WestonPack runtime." sleep 5 exit 1 fi @@ -99,17 +90,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 - straywild_controllerconfig="$GODOT_MUOS_MAPPING" + netfishing_controllerconfig="$GODOT_MUOS_MAPPING" elif [ -n "$sdl_controllerconfig" ]; then - straywild_controllerconfig="$sdl_controllerconfig" + netfishing_controllerconfig="$sdl_controllerconfig" else - straywild_controllerconfig="$GODOT_MUOS_MAPPING" + netfishing_controllerconfig="$GODOT_MUOS_MAPPING" fi -printf '%s\n' "$straywild_controllerconfig" > "$CONTROLLER_MAPPING_FILE" +printf '%s\n' "$netfishing_controllerconfig" > "$CONTROLLER_MAPPING_FILE" -straywild_GODOT_OPTIONS=() -straywild_GAME_ENVIRONMENT=() -PERFORMANCE_PROFILE="${straywild_PERFORMANCE_PROFILE:-}" +NETFISHING_GODOT_OPTIONS=() +NETFISHING_GAME_ENVIRONMENT=() +PERFORMANCE_PROFILE="${NETFISHING_PERFORMANCE_PROFILE:-}" PROFILE_PATH="$CONFDIR/performance_profile" if [[ -z "$PERFORMANCE_PROFILE" && -r "$PROFILE_PATH" ]]; then IFS= read -r PERFORMANCE_PROFILE < "$PROFILE_PATH" || true @@ -117,16 +108,16 @@ if [[ -z "$PERFORMANCE_PROFILE" && -r "$PROFILE_PATH" ]]; then fi case "$PERFORMANCE_PROFILE" in normal) - straywild_GAME_ENVIRONMENT+=( - "straywild_PERFORMANCE_PROFILE=normal" + NETFISHING_GAME_ENVIRONMENT+=( + "NETFISHING_PERFORMANCE_PROFILE=normal" ) ;; light|"") - straywild_GAME_ENVIRONMENT+=( - "straywild_PERFORMANCE_PROFILE=light" - "straywild_LOW_END=1" + NETFISHING_GAME_ENVIRONMENT+=( + "NETFISHING_PERFORMANCE_PROFILE=light" + "NETFISHING_LOW_END=1" ) - straywild_GODOT_OPTIONS+=( + NETFISHING_GODOT_OPTIONS+=( --single-window --disable-vsync --max-fps 30 @@ -135,11 +126,11 @@ case "$PERFORMANCE_PROFILE" in ;; *) echo "Unknown performance profile '$PERFORMANCE_PROFILE'; using light." >&2 - straywild_GAME_ENVIRONMENT+=( - "straywild_PERFORMANCE_PROFILE=light" - "straywild_LOW_END=1" + NETFISHING_GAME_ENVIRONMENT+=( + "NETFISHING_PERFORMANCE_PROFILE=light" + "NETFISHING_LOW_END=1" ) - straywild_GODOT_OPTIONS+=( + NETFISHING_GODOT_OPTIONS+=( --single-window --disable-vsync --max-fps 30 @@ -148,10 +139,11 @@ case "$PERFORMANCE_PROFILE" in ;; esac -# 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 "straywild.aarch64" -c "$GPTOKEYB_CONFIG" & +# Keep NETfishing's native controller input separate from PortMaster's exit +# handling. Legacy GPTOKEYB builds can load their default keyboard map when no +# config is supplied, so the explicit no-op map preserves only the +# device-specific force-quit chord. +$GPTOKEYB "NETfishing.aarch64" -c "$GPTOKEYB_CONFIG" & pm_platform_helper "$GAME_EXECUTABLE" $ESUDO env CRUSTY_RESOLUTION="${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" \ @@ -160,12 +152,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 \ - "${straywild_DATA_ENVIRONMENT[@]}" \ - "${straywild_GAME_ENVIRONMENT[@]}" \ + "${NETFISHING_DATA_ENVIRONMENT[@]}" \ + "${NETFISHING_GAME_ENVIRONMENT[@]}" \ "$GAME_LAUNCHER" \ "$CONTROLLER_MAPPING_FILE" \ "$GAME_EXECUTABLE" \ - "${straywild_GODOT_OPTIONS[@]}" \ + "${NETFISHING_GODOT_OPTIONS[@]}" \ --resolution "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" \ --fullscreen \ --rendering-driver opengl3_es \ diff --git a/scripts/portmaster/gameinfo.xml b/scripts/portmaster/gameinfo.xml index 1b0a1c7..ef608bd 100755 --- a/scripts/portmaster/gameinfo.xml +++ b/scripts/portmaster/gameinfo.xml @@ -1,13 +1,13 @@ - ./straywild.sh - straywild + ./NETfishing.sh + NETfishing A relaxed multiplayer fishing game about exploring a small island, catching and collecting fish, customizing your character, and spending time by the water. 20260804T000000 - straywild project + NETfishing project Independent adventure, simulation - ./straywild/screenshot.png + ./netfishing/screenshot.png diff --git a/scripts/portmaster/launch-straywild.sh b/scripts/portmaster/launch-netfishing.sh similarity index 100% rename from scripts/portmaster/launch-straywild.sh rename to scripts/portmaster/launch-netfishing.sh diff --git a/scripts/portmaster/straywild.gptk b/scripts/portmaster/netfishing.gptk similarity index 68% rename from scripts/portmaster/straywild.gptk rename to scripts/portmaster/netfishing.gptk index 2e8602e..ac03270 100644 --- a/scripts/portmaster/straywild.gptk +++ b/scripts/portmaster/netfishing.gptk @@ -1,6 +1,5 @@ -# 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. +# NETfishing reads the controller directly. GPTOKEYB is retained only for the +# PortMaster force-quit chord, so every keyboard and mouse binding is disabled. back = \" guide = \" diff --git a/scripts/portmaster/port.json b/scripts/portmaster/port.json index 4c36648..affc601 100644 --- a/scripts/portmaster/port.json +++ b/scripts/portmaster/port.json @@ -1,13 +1,13 @@ { "version": 4, - "name": "straywild.zip", + "name": "netfishing.zip", "items": [ - "straywild.sh", - "straywild/" + "NETfishing.sh", + "netfishing/" ], "items_opt": null, "attr": { - "title": "straywild", + "title": "NETfishing", "porter": [ "Voyager" ], diff --git a/scripts/run_validations.sh b/scripts/run_validations.sh index ff108a8..d773c4a 100755 --- a/scripts/run_validations.sh +++ b/scripts/run_validations.sh @@ -6,16 +6,15 @@ 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 straywild-validations.XXXXXX)" +readonly RUN_ROOT="$(mktemp -d -t netfishing-validations.XXXXXX)" -export straywild_ISOLATED_VALIDATION_STORAGE=1 +export NETFISHING_ISOLATED_VALIDATION_STORAGE=1 readonly -a QUICK_TESTS=( "scripts/validate_animalese_samples.gd" "tests/android_readiness_validation.gd" "tests/camera_drag_validation.gd" "tests/character_rig_validation.gd" - "tests/network_chat_protocol_validation.gd" "tests/controller_focus_presentation_validation.gd" "tests/controller_menu_accessibility_validation.gd" "tests/controller_mapping_validation.gd" @@ -23,7 +22,6 @@ readonly -a QUICK_TESTS=( "tests/controller_ui_navigation_validation.gd" "tests/dedicated_server_config_validation.gd" "tests/digging_prototype_validation.gd" - "tests/equipment_catalog_validation.gd" "tests/exported_decal_hotfix_validation.gd" "tests/file_dialog_controller_navigation_validation.gd" "tests/fish_catalog_content_validation.gd" @@ -31,9 +29,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" "tests/inventory_storage_validation.gd" "tests/keyboard_mouse_mapping_validation.gd" @@ -45,16 +41,12 @@ readonly -a QUICK_TESTS=( "tests/player_experience_validation.gd" "tests/shoreline_ambience_validation.gd" "tests/surface_drawing_validation.gd" - "tests/surface_drawing_texture_renderer_validation.gd" "tests/tackle_order_validation.gd" - "tests/terrain_biome_validation.gd" "tests/terrain_blender_material_validation.gd" - "tests/terrain_chunk_generator_validation.gd" "tests/texture_sampling_validation.gd" "tests/tree_gathering_prototype_validation.gd" "tests/unified_inventory_validation.gd" "tests/world_time_validation.gd" - "tests/world_layout_validation.gd" "tests/world_spawn_protocol_validation.gd" "tests/world_weather_validation.gd" ) @@ -77,29 +69,23 @@ readonly -a HOST_TESTS=( "tests/gathering_showcase_validation.gd" "tests/inventory_storage_persistence_validation.gd" "tests/job_system_validation.gd" - "tests/progression_archive_validation.gd" "tests/surface_drawing_runtime_validation.gd" ) 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" "tests/profile_multiplayer_validation.gd" "tests/surface_drawing_multiplayer_validation.gd" "tests/world_time_multiplayer_validation.gd" - "tests/world_layout_multiplayer_validation.gd" "tests/world_spawn_multiplayer_validation.gd" ) 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}" @@ -108,7 +94,7 @@ trap cleanup EXIT INT TERM usage() { printf \ - 'Usage: %s {quick|full|host|network|session-switch|late-join|all|--list}\n' \ + 'Usage: %s {quick|full|host|network|session-switch|all|--list}\n' \ "$0" } @@ -151,10 +137,7 @@ wait_for_network_host() { sleep 2 return 0 fi - # A cold generated-world startup can take longer than ten seconds before - # NetworkSession is ready to bind. Keep the client launch tied to the actual - # listener instead of treating that normal startup work as a host failure. - for _attempt in {1..600}; do + for _attempt in {1..100}; do if ! kill -0 "${host_pid}" 2>/dev/null; then return 1 fi @@ -240,7 +223,7 @@ run_session_switch_network_test() { --headless --path "${PROJECT_ROOT}" --script "${script}" -- second_host \ >"${second_root}/output.log" 2>&1 & second_pid=$! - for _attempt in {1..600}; do + for _attempt in {1..100}; do if ! kill -0 "${first_pid}" 2>/dev/null \ || ! kill -0 "${second_pid}" 2>/dev/null; then break @@ -294,71 +277,6 @@ 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 @@ -386,7 +304,6 @@ 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 } @@ -401,8 +318,6 @@ 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 @@ -421,9 +336,6 @@ 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 bc96083..c1cebdc 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/straywild.apk" - echo " ${GODOT} --headless --path \"$PROJECT_ROOT\" --export-debug \"Android\" builds/android/straywild-debug.apk" + 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" } 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 f357b9a..69a2485 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/straywild" -const INSTALL_PATH := "/opt/straywild" +const PROJECT_PATH := "/tmp/netfishing" +const INSTALL_PATH := "/opt/NETfishing" func _initialize() -> void: - var root_to_create: String = OS.get_environment("straywild_TEST_CREATE_ROOT") + var root_to_create: String = OS.get_environment("NETFISHING_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/straywild-test-data", + "/tmp/NETfishing-test-data", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "external trailing slash", - "/tmp/straywild-test-data/", + "/tmp/NETfishing-test-data/", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "similar project-name sibling", - "/tmp/straywild-data", + "/tmp/netfishing-data", PlayerDataRoot.PATH_ALLOWED, failures, ) _expect( "documents directory", - "/home/player/Documents/straywild", + "/home/player/Documents/NETfishing", PlayerDataRoot.PATH_ALLOWED, failures, ) @@ -55,7 +55,7 @@ func _initialize() -> void: ) _expect_with_references( "empty project reference", - "/tmp/straywild-test-data", + "/tmp/NETfishing-test-data", "", INSTALL_PATH, PlayerDataRoot.PATH_ALLOWED, @@ -63,7 +63,7 @@ func _initialize() -> void: ) _expect_with_references( "root project reference", - "/tmp/straywild-test-data", + "/tmp/NETfishing-test-data", "/", INSTALL_PATH, PlayerDataRoot.PATH_ALLOWED, @@ -71,9 +71,9 @@ func _initialize() -> void: ) _expect_with_references( "Windows component and case normalization", - "C:\\Games\\straywild Data", - "C:\\Games\\straywild", - "C:\\Program Files\\straywild", + "C:\\Games\\NETfishing Data", + "C:\\Games\\NETfishing", + "C:\\Program Files\\NETfishing", PlayerDataRoot.PATH_ALLOWED, failures, true, diff --git a/server/dedicated_server_config.gd b/server/dedicated_server_config.gd index 3370457..0618466 100644 --- a/server/dedicated_server_config.gd +++ b/server/dedicated_server_config.gd @@ -1,24 +1,19 @@ class_name DedicatedServerConfig extends RefCounted -const DEFAULT_NAME: String = "straywild Dedicated Server" +const DEFAULT_NAME: String = "NETfishing Dedicated Server" const DEFAULT_BIND_ADDRESS: String = "*" const DEFAULT_PORT: int = 7777 const DEFAULT_MAX_PLAYERS: int = 8 -const DEFAULT_WORLD_SEED: int = 13001 -const MAX_WORLD_SEED: int = 2147483646 const MAX_OPERATORS: int = 64 var server_name: String = DEFAULT_NAME var bind_address: String = DEFAULT_BIND_ADDRESS var port: int = DEFAULT_PORT var max_players: int = DEFAULT_MAX_PLAYERS -var world_seed: int = DEFAULT_WORLD_SEED var public_listing: bool = false var discovery_url: String = "" var data_directory: String = "" -var chat_logging: bool = false -var chat_log_path: String = "" var operator_fingerprints: PackedStringArray = PackedStringArray() var error_message: String = "" @@ -31,10 +26,8 @@ static func from_runtime() -> DedicatedServerConfig: result.discovery_url = str(ProjectSettings.get_setting( "network/discovery/base_url", "" )).strip_edges() - var config_path: String = _environment_string( - "straywild_SERVER_CONFIG", - "NETFISHING_SERVER_CONFIG", - "", + var config_path: String = OS.get_environment( + "NETFISHING_SERVER_CONFIG" ).strip_edges() for argument: String in OS.get_cmdline_user_args(): if argument.begins_with("--config="): @@ -65,7 +58,6 @@ func _load_file(path: String) -> bool: max_players = int(file.get_value( "server", "max_players", max_players )) - world_seed = int(file.get_value("world", "seed", world_seed)) public_listing = bool(file.get_value( "server", "public", public_listing )) @@ -75,12 +67,6 @@ func _load_file(path: String) -> bool: discovery_url = str(file.get_value( "discovery", "url", discovery_url )) - chat_logging = bool(file.get_value( - "privacy", "chat_logging", chat_logging - )) - chat_log_path = str(file.get_value( - "privacy", "chat_log_path", chat_log_path - )) operator_fingerprints = _parse_fingerprint_list(file.get_value( "moderation", "operators", operator_fingerprints )) @@ -89,44 +75,27 @@ func _load_file(path: String) -> bool: func _apply_environment() -> void: server_name = _environment_string( - "straywild_SERVER_NAME", "NETFISHING_SERVER_NAME", server_name + "NETFISHING_SERVER_NAME", server_name ) bind_address = _environment_string( - "straywild_SERVER_BIND", "NETFISHING_SERVER_BIND", bind_address - ) - port = _environment_int( - "straywild_SERVER_PORT", "NETFISHING_SERVER_PORT", port + "NETFISHING_SERVER_BIND", bind_address ) + port = _environment_int("NETFISHING_SERVER_PORT", port) max_players = _environment_int( - "straywild_SERVER_MAX_PLAYERS", - "NETFISHING_SERVER_MAX_PLAYERS", - max_players, - ) - world_seed = _environment_int( - "straywild_WORLD_SEED", "NETFISHING_WORLD_SEED", world_seed + "NETFISHING_SERVER_MAX_PLAYERS", max_players ) public_listing = _environment_bool( - "straywild_SERVER_PUBLIC", "NETFISHING_SERVER_PUBLIC", public_listing + "NETFISHING_SERVER_PUBLIC", public_listing ) discovery_url = _environment_string( - "straywild_DISCOVERY_URL", "NETFISHING_DISCOVERY_URL", discovery_url + "NETFISHING_DISCOVERY_URL", discovery_url ) data_directory = _environment_string( - "straywild_DATA_DIR", "NETFISHING_DATA_DIR", data_directory + "NETFISHING_DATA_DIR", data_directory ) - chat_logging = _environment_bool( - "straywild_CHAT_LOGGING", "NETFISHING_CHAT_LOGGING", chat_logging - ) - chat_log_path = _environment_string( - "straywild_CHAT_LOG_PATH", "NETFISHING_CHAT_LOG_PATH", chat_log_path - ) - var operators_variable: String = _available_environment_variable( - "straywild_SERVER_OPERATORS", - "NETFISHING_SERVER_OPERATORS", - ) - if not operators_variable.is_empty(): + if OS.has_environment("NETFISHING_SERVER_OPERATORS"): operator_fingerprints = _parse_fingerprint_list( - OS.get_environment(operators_variable) + OS.get_environment("NETFISHING_SERVER_OPERATORS") ) @@ -142,10 +111,6 @@ func _apply_arguments(arguments: PackedStringArray) -> void: max_players = _parse_int( argument.trim_prefix("--max-players="), max_players ) - elif argument.begins_with("--world-seed="): - world_seed = _parse_int( - argument.trim_prefix("--world-seed="), world_seed - ) elif argument.begins_with("--data-dir="): data_directory = argument.trim_prefix("--data-dir=") elif argument.begins_with("--discovery-url="): @@ -154,16 +119,10 @@ func _apply_arguments(arguments: PackedStringArray) -> void: operator_fingerprints = _parse_fingerprint_list( argument.trim_prefix("--operators=") ) - elif argument.begins_with("--chat-log-path="): - chat_log_path = argument.trim_prefix("--chat-log-path=") elif argument == "--public": public_listing = true elif argument == "--private": public_listing = false - elif argument == "--chat-logging": - chat_logging = true - elif argument == "--no-chat-logging": - chat_logging = false func _validate() -> void: @@ -171,9 +130,6 @@ func _validate() -> void: bind_address = bind_address.strip_edges() discovery_url = discovery_url.strip_edges().trim_suffix("/") data_directory = data_directory.strip_edges() - chat_log_path = chat_log_path.strip_edges() - if chat_logging and chat_log_path.is_empty() and not data_directory.is_empty(): - chat_log_path = data_directory.path_join("logs/chat.jsonl") operator_fingerprints = _normalized_fingerprints(operator_fingerprints) if server_name.is_empty(): error_message = "Server name cannot be empty." @@ -185,16 +141,8 @@ func _validate() -> void: error_message = "Server port must be between 1 and 65535." elif max_players < 1 or max_players > 128: error_message = "Maximum players must be between 1 and 128." - elif world_seed <= 0 or world_seed > MAX_WORLD_SEED: - error_message = "World seed must be between 1 and %d." % MAX_WORLD_SEED elif not data_directory.is_empty() and not data_directory.is_absolute_path(): error_message = "Server data directory must be an absolute path." - elif chat_logging and ( - chat_log_path.is_empty() or not chat_log_path.is_absolute_path() - ): - error_message = ( - "Chat logging requires an absolute chat log path." - ) elif public_listing and not ( discovery_url.begins_with("https://") or discovery_url.begins_with("http://") @@ -221,45 +169,21 @@ static func _safe_text(value: String) -> bool: return true -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_string(name: String, fallback: String) -> String: + return OS.get_environment(name) if OS.has_environment(name) else fallback -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) +static func _environment_int(name: String, fallback: int) -> int: return ( - _parse_int(OS.get_environment(variable), fallback) - if not variable.is_empty() else fallback + _parse_int(OS.get_environment(name), fallback) + if OS.has_environment(name) else fallback ) -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(): +static func _environment_bool(name: String, fallback: bool) -> bool: + if not OS.has_environment(name): return fallback - var value: String = OS.get_environment(variable).strip_edges().to_lower() + var value: String = OS.get_environment(name).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 278022e..8c17e7f 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: "zoom modifier (+RT)", + ROLE_CAMERA_ZOOM: "camera zoom", 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 (+RT to zoom)", + ROLE_RIGHT_STICK_Y: "camera up / down", } const ROLE_PROMPTS: Dictionary = { diff --git a/settings/keyboard_mouse_mapping_manager.gd b/settings/keyboard_mouse_mapping_manager.gd index 54dacc8..a8d4f09 100644 --- a/settings/keyboard_mouse_mapping_manager.gd +++ b/settings/keyboard_mouse_mapping_manager.gd @@ -3,8 +3,7 @@ extends Node signal mapping_changed -const FORMAT_VERSION: int = 2 -const LEGACY_FORMAT_VERSION: int = 1 +const FORMAT_VERSION: int = 1 const MAPPING_PATH: String = "user://keyboard_mouse_bindings.json" const MAPPING_TEMP_PATH: String = "user://keyboard_mouse_bindings.json.tmp" const MAPPING_BACKUP_PATH: String = ( @@ -22,7 +21,6 @@ const ROLE_SNEAK: StringName = &"sneak" const ROLE_SLOW_WALK: StringName = &"slow_walk" const ROLE_INTERACT: StringName = &"interact" const ROLE_PRIMARY_ACTION: StringName = &"fish_primary" -const ROLE_ALTERNATE_REEL: StringName = &"reel_alternate" const ROLE_CAMERA_DRAG: StringName = &"camera_drag" const ROLE_CAMERA_ZOOM_IN: StringName = &"camera_zoom_in" const ROLE_CAMERA_ZOOM_OUT: StringName = &"camera_zoom_out" @@ -48,7 +46,6 @@ const ROLE_ORDER: Array[StringName] = [ ROLE_SLOW_WALK, ROLE_INTERACT, ROLE_PRIMARY_ACTION, - ROLE_ALTERNATE_REEL, ROLE_CAMERA_DRAG, ROLE_CAMERA_ZOOM_IN, ROLE_CAMERA_ZOOM_OUT, @@ -84,10 +81,9 @@ const ROLE_LABELS: Dictionary = { ROLE_SLOW_WALK: "slow walk", ROLE_INTERACT: "interact", ROLE_PRIMARY_ACTION: "primary action", - ROLE_ALTERNATE_REEL: "alternate reel", ROLE_CAMERA_DRAG: "rotate camera", - ROLE_CAMERA_ZOOM_IN: "hotbar select (+SHIFT to zoom)", - ROLE_CAMERA_ZOOM_OUT: "hotbar select (+SHIFT to zoom)", + ROLE_CAMERA_ZOOM_IN: "camera zoom in", + ROLE_CAMERA_ZOOM_OUT: "camera zoom out", ROLE_PLAYER_MENU: "player menu", ROLE_TACKLE_BOX: "tackle box", ROLE_PROP_BOOK: "prop book", @@ -142,28 +138,19 @@ func load_mapping() -> bool: _bindings = {} return false var data := json.data as Dictionary - var format_version: int = int(data.get("format_version", -1)) - if format_version not in [LEGACY_FORMAT_VERSION, FORMAT_VERSION]: + if int(data.get("format_version", -1)) != FORMAT_VERSION: push_warning("Keyboard binding version is unsupported; using defaults.") _bindings = {} return false var raw_bindings: Variant = data.get("bindings", {}) if ( typeof(raw_bindings) != TYPE_DICTIONARY + or not _validate_complete_bindings(raw_bindings as Dictionary) ): push_warning("Keyboard bindings are incomplete; using defaults.") _bindings = {} return false - var loaded_bindings := (raw_bindings as Dictionary).duplicate(true) - if format_version == LEGACY_FORMAT_VERSION: - loaded_bindings[str(ROLE_ALTERNATE_REEL)] = ( - _default_bindings[str(ROLE_ALTERNATE_REEL)].duplicate(true) - ) - if not _validate_complete_bindings(loaded_bindings): - push_warning("Keyboard bindings are incomplete; using defaults.") - _bindings = {} - return false - _bindings = loaded_bindings + _bindings = (raw_bindings as Dictionary).duplicate(true) return true @@ -177,17 +164,6 @@ 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 59099fc..4ea3cfa 100644 --- a/settings/player_settings.gd +++ b/settings/player_settings.gd @@ -32,7 +32,6 @@ 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 @@ -80,7 +79,6 @@ 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 362abc9..6c8cf4f 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 = ( - "straywild_ISOLATED_VALIDATION_STORAGE" + "NETFISHING_ISOLATED_VALIDATION_STORAGE" ) signal settings_changed(settings: PlayerSettings) @@ -54,10 +54,6 @@ 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 @@ -113,9 +109,6 @@ 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) ) @@ -244,9 +237,6 @@ 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 146fb4e..78a020f 100644 --- a/tests/art_tools_validation.gd +++ b/tests/art_tools_validation.gd @@ -19,21 +19,14 @@ 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(1, WorldLayout.STARTER_ISLAND)) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") await physics_frame await physics_frame var player := main.get("_player") as Player - var session := main.get_node("%NetworkSession") as NetworkSession var sprint_dust := player.get_node("%SprintDust") as SprintDustTrail assert(sprint_dust != null) assert(sprint_dust.get_active_puff_count() == 0) @@ -87,36 +80,12 @@ 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(), - "The art-kit toolbar must receive overlapping pointer input before Chat.", - ) assert(bool(game_ui.call("_can_start_virtual_mouse"))) var virtual_pointer_states: Array[bool] = [] game_ui.virtual_pointer_mode_changed.connect( @@ -277,46 +246,8 @@ 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 @@ -374,74 +305,6 @@ func _run() -> void: right_stick_motion.axis_value = 0.0 Input.parse_input_event(right_stick_motion) await process_frame - - var free_camera_body := player.get("_free_camera_body") as CharacterBody3D - assert(free_camera_body != null) - # A released fishing cast locks only the avatar. The detached camera must - # continue to accept translation while that movement lock is active. - player.set_movement_enabled(false) - var cast_locked_camera_position: Vector3 = free_camera_body.global_position - Input.action_press("move_forward") - for _frame: int in 3: - await physics_frame - Input.action_release("move_forward") - assert(not free_camera_body.global_position.is_equal_approx( - cast_locked_camera_position - )) - player.set_movement_enabled(true) - - # Chat owns all movement while text entry is active, including developer - # freecam movement which reads the same WASD actions as the player. - chat_ui.open_chat() - assert(chat_ui.is_open()) - var free_camera_position_before: Vector3 = free_camera_body.global_position - Input.action_press("move_forward") - for _frame: int in 3: - await physics_frame - Input.action_release("move_forward") - assert(free_camera_body.global_position.is_equal_approx( - free_camera_position_before - )) - chat_ui.refocus_gameplay() - - # Typewriter speech cycles the shared open-mouth faceplates, then restores - # the player's authored mouth. World speech also follows the active freecam, - # not the inactive normal gameplay camera. - var normal_camera := player.get_gameplay_camera() - var normal_camera_transform: Transform3D = normal_camera.global_transform - var chat_anchor: Vector3 = player.get_chat_anchor_position() - normal_camera.look_at( - normal_camera.global_position - - (chat_anchor - normal_camera.global_position), - Vector3.UP, - ) - 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"))) - var first_speech_mouth: String = str(player.get("_speech_mouth_id")) - await create_timer(0.12).timeout - var second_speech_mouth: String = str(player.get("_speech_mouth_id")) - assert(not first_speech_mouth.is_empty()) - assert(not second_speech_mouth.is_empty()) - assert(first_speech_mouth != second_speech_mouth) - chat_ui.call("_update_speech") - var speech: Dictionary = chat_ui.get("_speech") - var local_speech: Dictionary = speech.get(session.get_local_peer_id(), {}) - var speech_bubble := local_speech.get("bubble") as PanelContainer - assert(speech_bubble != null and speech_bubble.visible) - normal_camera.global_transform = normal_camera_transform - await create_timer(0.6).timeout - assert(not bool(player.get("_speech_mouth_active"))) - chat_ui.call("_on_peer_removed", session.get_local_peer_id()) - game_ui.call("_on_quick_action_selected", &"freecam") assert(not player.is_free_camera_active()) game_ui.call("_on_quick_action_selected", &"hud") @@ -454,22 +317,6 @@ func _run() -> void: assert(not ( game_ui.get_node("%ExperiencePresentation") as Control ).visible) - var hud_fishing_spot := main.get_node("%FishingSpot") as FishingSpot - assert(hud_fishing_spot != null) - hud_fishing_spot.state = FishingSpot.FishingState.SHOWING_CATCH - game_ui.call("_refresh_gameplay_hud_visibility") - assert(( - game_ui.get_node("%GameplayTransientHUD") as Control - ).visible) - assert(not ( - game_ui.get_node("%ExperiencePresentation") as Control - ).visible) - assert(chat_ui.is_hud_hidden()) - hud_fishing_spot.state = FishingSpot.FishingState.READY - game_ui.call("_refresh_gameplay_hud_visibility") - assert(not ( - game_ui.get_node("%GameplayTransientHUD") as Control - ).visible) quick_menu.open_menu(true) assert(quick_menu.visible and quick_menu.is_open()) quick_menu.close_menu() @@ -518,12 +365,6 @@ func _run() -> void: await process_frame assert(service.is_active() and not service.is_placement_mode()) assert(toolbar.visible) - chat_ui.open_chat() - assert(chat_ui.is_open()) - assert(not service.is_active() and not toolbar.visible) - chat_ui.close_chat() - assert(not chat_ui.is_open()) - assert(service.is_active() and toolbar.visible) var ui_root := game_ui.get_node("%UIRoot") as Control assert(toolbar.get_parent() == ui_root) assert(is_zero_approx(toolbar.position.y)) @@ -563,8 +404,6 @@ func _run() -> void: var hide_button := toolbar.get_node("%HideGuideButton") as Button var restore_button := toolbar.get_node("%RestoreGuideButton") as Button var finalize_button := toolbar.get_node("%FinalizeGuideButton") as Button - var export_button := toolbar.get_node("%ExportButton") as Button - var stamp_button := toolbar.get_node("%StampButton") as Button assert( mode_button != null and eraser_button != null @@ -572,13 +411,7 @@ func _run() -> void: and hide_button != null and restore_button != null and finalize_button != null - and export_button != null - and stamp_button != null ) - assert(export_button.text == "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) var expected_toolbar_icons: Dictionary[Button, String] = { mode_button: "/art/art_kit_marker.png", @@ -601,8 +434,6 @@ func _run() -> void: hide_button, restore_button, finalize_button, - export_button, - stamp_button, ]: assert(icon_button.custom_minimum_size == Vector2(48, 44)) assert(icon_button.get_theme_constant("icon_max_width") == 40) @@ -613,9 +444,7 @@ func _run() -> void: assert(is_equal_approx(icon_style.content_margin_top, 2.0)) assert(mode_button.custom_minimum_size == Vector2(48, 48)) assert(mode_button.get_theme_constant("icon_max_width") == 40) - assert(export_button.get_index() > finalize_button.get_index()) - assert(stamp_button.get_index() > export_button.get_index()) - assert(mode_button.get_index() > stamp_button.get_index()) + assert(mode_button.get_index() > finalize_button.get_index()) assert(hide_button.button_group != null) assert(hide_button.button_group == restore_button.button_group) assert(hide_button.button_group == finalize_button.button_group) @@ -631,8 +460,6 @@ func _run() -> void: hide_button, restore_button, finalize_button, - export_button, - stamp_button, ]: assert(pointer_only_control.focus_mode == Control.FOCUS_NONE) assert(brush_option.get_popup().unfocusable) @@ -735,31 +562,13 @@ func _run() -> void: )) == 24) for product_id: StringName in [ - &"marker_ocean_teal", - &"brush_4x", - &"grid_128x", - PlayerArtUnlocks.STAMP_PRODUCT_ID, + &"marker_ocean_teal", &"brush_4x", &"grid_128x", ]: assert(player.art_unlocks.unlock_product(product_id)) await process_frame assert(not (color_buttons[&"ocean_teal"] as Button).disabled) assert(not brush_option.get_popup().is_item_disabled(3)) assert(not grid_option.get_popup().is_item_disabled(3)) - assert(not stamp_button.disabled) - var stamp_library_panel := toolbar.get_node( - "%StampLibraryPanel" - ) as PanelContainer - var stamp_library_close := toolbar.get_node( - "%StampLibraryClose" - ) as Button - assert(stamp_library_panel != null and not stamp_library_panel.visible) - stamp_button.pressed.emit() - assert(stamp_library_panel.visible) - var library_pointer := InputEventMouseMotion.new() - library_pointer.position = stamp_library_panel.get_global_rect().get_center() - assert(toolbar.owns_pointer_event(library_pointer)) - stamp_library_close.pressed.emit() - assert(not stamp_library_panel.visible) assert(not locked_color_lock.visible) assert(str(brush_option.get_item_icon(3).get_meta( &"channel_mask_source", "" @@ -899,18 +708,6 @@ 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 @@ -930,6 +727,7 @@ func _run() -> void: assert(not service.is_active() and not toolbar.visible) print("Art tools validation: PASS") + var session := main.get_node("%NetworkSession") as NetworkSession session.disconnect_session("") main.queue_free() for _frame: int in 4: diff --git a/tests/camera_drag_validation.gd b/tests/camera_drag_validation.gd index a2dd410..a64f5ac 100644 --- a/tests/camera_drag_validation.gd +++ b/tests/camera_drag_validation.gd @@ -20,11 +20,10 @@ func _run() -> void: press.button_index = MOUSE_BUTTON_RIGHT press.button_mask = MOUSE_BUTTON_MASK_RIGHT press.pressed = true - Input.parse_input_event(press) - await process_frame + player.call("_input", press) assert(bool(player.get("_camera_dragging"))) if DisplayServer.get_name() != "headless": - assert(Input.mouse_mode == Input.MOUSE_MODE_CAPTURED) + assert(Input.mouse_mode == Input.MOUSE_MODE_VISIBLE) var yaw := player.get_node("%CameraYaw") as Node3D var previous_yaw: float = yaw.rotation.y @@ -32,9 +31,9 @@ func _run() -> void: motion.button_mask = MOUSE_BUTTON_MASK_RIGHT motion.relative = Vector2(18.0, -4.0) motion.screen_relative = motion.relative - Input.parse_input_event(motion) - await process_frame + player.call("_input", motion) assert(not is_equal_approx(yaw.rotation.y, previous_yaw)) + await process_frame assert(bool(player.get("_camera_dragging"))) if DisplayServer.get_name() != "headless": assert(Input.mouse_mode == Input.MOUSE_MODE_CAPTURED) @@ -42,38 +41,16 @@ func _run() -> void: var release := InputEventMouseButton.new() release.button_index = MOUSE_BUTTON_RIGHT release.pressed = false - Input.parse_input_event(release) - await process_frame + player.call("_input", release) assert(not bool(player.get("_camera_dragging"))) if DisplayServer.get_name() != "headless": assert(Input.mouse_mode == Input.MOUSE_MODE_VISIBLE) - Input.parse_input_event(press) - await process_frame + player.call("_input", press) assert(bool(player.get("_camera_dragging"))) 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 2aece2b..c8fc57d 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/straywild_base_character.glb" + "res://art/exported/characters/base/netfishing_base_character.glb" ) const EXPECTED_ANIMATIONS: Array[StringName] = [ diff --git a/tests/chat_privacy_multiplayer_validation.gd b/tests/chat_privacy_multiplayer_validation.gd deleted file mode 100644 index e1d6f87..0000000 --- a/tests/chat_privacy_multiplayer_validation.gd +++ /dev/null @@ -1,124 +0,0 @@ -extends SceneTree - -const MainScene: PackedScene = preload("res://main/main.tscn") -const TEST_PORT: int = 18152 -const PREJOIN_MESSAGE: String = "private prejoin message" -const LIVE_MESSAGE: String = "live message after join" - - -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("Chat privacy 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 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 chat_service := main.get_node( - "%NetworkChatService" - ) as NetworkChatService - assert(chat_service.send_local_message(PREJOIN_MESSAGE)) - var remote_peer_id: int = await _wait_for_remote_peer(session) - assert(remote_peer_id > 1) - await create_timer(1.0).timeout - assert(chat_service.send_local_message(LIVE_MESSAGE)) - var disconnect_deadline: int = 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("Chat privacy multiplayer host validation: PASS") - await _session_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 join_deadline: int = 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()) - var chat_service := main.get_node( - "%NetworkChatService" - ) as NetworkChatService - await create_timer(0.5).timeout - assert(not _history_contains(chat_service, PREJOIN_MESSAGE)) - var live_deadline: int = Time.get_ticks_msec() + 8000 - while ( - Time.get_ticks_msec() < live_deadline - and not _history_contains(chat_service, LIVE_MESSAGE) - ): - await process_frame - assert(_history_contains(chat_service, LIVE_MESSAGE)) - assert(not _history_contains(chat_service, PREJOIN_MESSAGE)) - print("Chat privacy multiplayer client validation: PASS") - await _session_cleanup(main, session) - - -func _history_contains(service: NetworkChatService, body: String) -> bool: - return service.get_history().any( - func(message: Dictionary) -> bool: - return str(message.get("body", "")) == body - ) - - -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_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 _session_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/chat_privacy_multiplayer_validation.gd.uid b/tests/chat_privacy_multiplayer_validation.gd.uid deleted file mode 100644 index 33b210d..0000000 --- a/tests/chat_privacy_multiplayer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ivtqrnppnmli diff --git a/tests/controller_focus_presentation_validation.gd b/tests/controller_focus_presentation_validation.gd index 7f59f70..28ce0b4 100644 --- a/tests/controller_focus_presentation_validation.gd +++ b/tests/controller_focus_presentation_validation.gd @@ -52,19 +52,6 @@ func _run() -> void: presentation.get("_neutral_focus_seed") == standard_button, "the neutral menu focus seed did not remember the first action", ) - var player_menu_tab := InputEventKey.new() - player_menu_tab.physical_keycode = KEY_TAB - player_menu_tab.pressed = true - presentation._input(player_menu_tab) - await process_frame - _expect( - root.gui_get_focus_owner() == null, - "the default player-menu Tab was consumed as focus navigation", - ) - _expect( - presentation.get("_neutral_focus_seed") == standard_button, - "the default player-menu Tab discarded the neutral focus seed", - ) var first_navigation := InputEventJoypadButton.new() first_navigation.button_index = JOY_BUTTON_DPAD_DOWN first_navigation.pressed = true diff --git a/tests/controller_mapping_validation.gd b/tests/controller_mapping_validation.gd index a5938d6..b93d475 100644 --- a/tests/controller_mapping_validation.gd +++ b/tests/controller_mapping_validation.gd @@ -14,22 +14,6 @@ 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 @@ -278,7 +262,7 @@ func _validate_manager(manager: ControllerMappingManagerType) -> String: func _validate_portmaster_launcher() -> String: - const launcher_path: String = "res://scripts/portmaster/straywild.sh" + const launcher_path: String = "res://scripts/portmaster/NETfishing.sh" if not FileAccess.file_exists(launcher_path): return "PortMaster launcher template is missing" var launcher: String = FileAccess.get_file_as_string(launcher_path) @@ -291,9 +275,9 @@ func _validate_portmaster_launcher() -> String: "guide:b8,start:b7,back:b6", "leftstick:b9", "rightstick:b12", - "straywild_controllerconfig=\"$GODOT_MUOS_MAPPING\"", - "GPTOKEYB_CONFIG=\"$GAMEDIR/straywild.gptk\"", - "$GPTOKEYB \"straywild.aarch64\" -c \"$GPTOKEYB_CONFIG\" &", + "netfishing_controllerconfig=\"$GODOT_MUOS_MAPPING\"", + "GPTOKEYB_CONFIG=\"$GAMEDIR/netfishing.gptk\"", + "$GPTOKEYB \"NETfishing.aarch64\" -c \"$GPTOKEYB_CONFIG\" &", "pm_platform_helper \"$GAME_EXECUTABLE\"", "\"$GAME_LAUNCHER\"", "\"$CONTROLLER_MAPPING_FILE\"", @@ -304,7 +288,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-straywild.sh" + "res://scripts/portmaster/launch-netfishing.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 37e43d5..975ce79 100644 --- a/tests/controller_menu_accessibility_validation.gd +++ b/tests/controller_menu_accessibility_validation.gd @@ -6,7 +6,6 @@ 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" ) @@ -44,7 +43,6 @@ 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() @@ -52,7 +50,6 @@ func _run() -> void: await _validate_mail_navigation() await _validate_profile_confirmation_focus() await _validate_profile_voice_navigation() - await _validate_player_menu_toggle_queue() await _validate_inventory_tab_zone_transitions() await _validate_player_menu_nested_controller_back() await _validate_confirmation_dialog_navigation() @@ -67,39 +64,6 @@ func _run() -> void: quit(1) -func _validate_player_menu_toggle_queue() -> void: - var menu := PlayerMenuScene.instantiate() as Control - root.add_child(menu) - await process_frame - menu.visible = true - menu.set("_transitioning", true) - var toggle := InputEventAction.new() - toggle.action = &"open_backpack" - toggle.pressed = true - menu.call("_input", toggle) - _expect( - bool(menu.get("_backpack_toggle_queued")), - "Player menu discarded TAB during its entry transition.", - ) - menu.call("_input", toggle) - _expect( - not bool(menu.get("_backpack_toggle_queued")), - "Repeated TAB presses did not preserve toggle parity.", - ) - menu.call("_input", toggle) - menu.call( - "_finish_menu_entry", - int(menu.get("_transition_generation")), - ) - await create_timer(0.5).timeout - _expect( - not menu.visible, - "A queued TAB press did not close the menu after entry.", - ) - menu.queue_free() - await process_frame - - func _validate_primary_menu_navigation() -> void: var title := TitleScreenScene.instantiate() as Control root.add_child(title) @@ -115,78 +79,10 @@ func _validate_primary_menu_navigation() -> void: (control as BaseButton).disabled = false title_controls.append(control) _expect( - title_controls.size() == 5, - "Title menu does not expose its five primary actions.", + title_controls.size() == 7, + "Title menu does not expose all seven primary actions.", ) - 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) + _assert_directionally_reachable(title_controls.front(), title_controls) title.queue_free() await process_frame @@ -211,106 +107,18 @@ 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 @@ -319,22 +127,8 @@ 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 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.", - ) + var modes: Array[Control] = [discover, direct, saved, recent] - direct_content.hide() - list_content.show() address.hide() name_edit.hide() server_list.show() @@ -346,45 +140,17 @@ func _validate_join_game_navigation() -> void: _set_button_state(delete, false) _set_button_state(cancel, false) _set_button_state(back, true) - page.set("_mode", JoinGamePage.Mode.DISCOVER) + page.set("_mode", 0) 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(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.", - ) + _assert_neighbor(back, &"focus_neighbor_left", join) 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", @@ -409,51 +175,18 @@ 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", JoinGamePage.Mode.DIRECT) + page.set("_mode", 1) 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) @@ -484,10 +217,8 @@ 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", JoinGamePage.Mode.SAVED) + page.set("_mode", 2) 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) @@ -783,8 +514,6 @@ 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( @@ -797,26 +526,6 @@ 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", @@ -846,8 +555,7 @@ func _validate_settings_adjustment_navigation() -> void: panel.get_node("%ControlsTab") as Control, mouse_slider, controller_slider, - invert_y, - swap_scroll, + panel.get_node("%InvertYToggle") as Control, on_screen_keyboard, controller_binds, keyboard_binds, @@ -959,13 +667,6 @@ func _validate_profile_confirmation_focus() -> void: page.call("activate") page.call("set_interactive", true) page.call("reset_controller_zone") - var name_edit := page.get("_name_edit") as LineEdit - name_edit.grab_focus() - page.call("_on_name_changed", "V") - _expect( - root.gui_get_focus_owner() == name_edit, - "Typing a profile name released the active name field.", - ) var suggestions := page.get("_suggestions") as HBoxContainer var suggestion := Button.new() suggestion.text = "alternate name" @@ -1231,12 +932,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("straywild_PROFILE_VOICE_CAPTURE"): + if OS.has_environment("NETFISHING_PROFILE_VOICE_CAPTURE"): await RenderingServer.frame_post_draw var capture := root.get_viewport().get_texture().get_image() _expect( capture.save_png(OS.get_environment( - "straywild_PROFILE_VOICE_CAPTURE" + "NETFISHING_PROFILE_VOICE_CAPTURE" )) == OK, "The profile voice-page capture could not be saved.", ) @@ -1356,24 +1057,6 @@ 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 24f39f9..e1169f9 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/straywild.sh" + "res://scripts/portmaster/NETfishing.sh" ) - assert(launcher.contains("straywild_PERFORMANCE_PROFILE:-")) + assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE:-")) assert(launcher.contains("$CONFDIR/performance_profile")) assert(launcher.contains("normal)")) assert(launcher.contains("light|\"\")")) - assert(launcher.contains("straywild_PERFORMANCE_PROFILE=normal")) - assert(launcher.contains("straywild_PERFORMANCE_PROFILE=light")) - assert(launcher.contains("straywild_LOW_END=1")) + assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE=normal")) + assert(launcher.contains("NETFISHING_PERFORMANCE_PROFILE=light")) + assert(launcher.contains("NETFISHING_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("straywild-portmaster-export")) + assert(builder.contains("netfishing-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 3d684cb..d9e77a5 100644 --- a/tests/controller_world_interaction_validation.gd +++ b/tests/controller_world_interaction_validation.gd @@ -23,24 +23,13 @@ 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(world_seed, world_layout), + save_manager != null and save_manager.initialize_new_game(), "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 2125220..6fef7c6 100644 --- a/tests/dedicated_server_config_validation.gd +++ b/tests/dedicated_server_config_validation.gd @@ -15,16 +15,10 @@ func _initialize() -> void: func _run() -> void: var defaults := ConfigType.new() - defaults.set("data_directory", "/tmp/straywild-server") + defaults.set("data_directory", "/tmp/netfishing-server") defaults.call("_validate") assert(defaults.is_valid()) assert(not bool(defaults.get("public_listing"))) - assert(not bool(defaults.get("chat_logging"))) - assert(str(defaults.get("chat_log_path")).is_empty()) - assert(NetworkChatService.BURST_COUNT == 3) - assert(NetworkChatService.WINDOW_COUNT == 5) - assert(is_equal_approx(NetworkChatService.WINDOW_SECONDS, 10.0)) - assert(NetworkChatService.CALL_COOLDOWN_MILLISECONDS == 90) var path: String = ProjectSettings.globalize_path( "user://dedicated-server-validation.cfg" @@ -34,16 +28,9 @@ func _run() -> void: file.set_value("server", "bind_address", "127.0.0.1") file.set_value("server", "port", 17777) file.set_value("server", "max_players", 12) - 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.straywild.io/") - file.set_value("privacy", "chat_logging", true) - file.set_value( - "privacy", - "chat_log_path", - "/tmp/configured-server/logs/chat.jsonl", - ) + file.set_value("discovery", "url", "https://discovery.netfishing.org/") file.set_value( "moderation", "operators", PackedStringArray([OPERATOR_B, OPERATOR_A]) ) @@ -57,14 +44,8 @@ func _run() -> void: assert(str(configured.get("bind_address")) == "127.0.0.1") assert(int(configured.get("port")) == 17777) 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.straywild.io") - assert(bool(configured.get("chat_logging"))) - assert( - str(configured.get("chat_log_path")) - == "/tmp/configured-server/logs/chat.jsonl" - ) + assert(str(configured.get("discovery_url")) == "https://discovery.netfishing.org") assert( configured.get("operator_fingerprints") == PackedStringArray([OPERATOR_A, OPERATOR_B]) @@ -100,57 +81,6 @@ func _run() -> void: invalid.call("_validate") assert(not invalid.is_valid()) - var invalid_seed := ConfigType.new() - invalid_seed.set("world_seed", 0) - invalid_seed.set("data_directory", "/tmp/invalid-seed-server") - invalid_seed.call("_validate") - assert(not invalid_seed.is_valid()) - - var default_chat_path := ConfigType.new() - default_chat_path.set("data_directory", "/tmp/default-chat-path-server") - default_chat_path.set("chat_logging", true) - default_chat_path.call("_validate") - assert(default_chat_path.is_valid()) - assert( - str(default_chat_path.get("chat_log_path")) - == "/tmp/default-chat-path-server/logs/chat.jsonl" - ) - - var invalid_chat_path := ConfigType.new() - invalid_chat_path.set("data_directory", "/tmp/invalid-chat-path-server") - invalid_chat_path.set("chat_logging", true) - invalid_chat_path.set("chat_log_path", "relative/chat.jsonl") - invalid_chat_path.call("_validate") - assert(not invalid_chat_path.is_valid()) - - var chat_log_validation_path: String = ProjectSettings.globalize_path( - "user://dedicated-chat-log-validation.jsonl" - ) - var chat_service := NetworkChatService.new() - assert(not chat_service.configure_dedicated_history( - true, - "relative/chat.jsonl", - )) - assert(chat_service.configure_dedicated_history( - true, - chat_log_validation_path, - )) - assert(FileAccess.file_exists(chat_log_validation_path)) - chat_service.call("_append_chat_log", { - "sender_display_name": "Privacy Tester", - "body": "explicitly retained message", - }) - var logged_message: Variant = JSON.parse_string( - FileAccess.get_file_as_string(chat_log_validation_path).strip_edges() - ) - assert(typeof(logged_message) == TYPE_DICTIONARY) - assert(str(logged_message.get("recorded_at_utc", "")).ends_with("Z")) - assert(logged_message.get("sender_display_name") == "Privacy Tester") - assert(logged_message.get("body") == "explicitly retained message") - assert(chat_service.configure_dedicated_history(false, "")) - assert(DirAccess.remove_absolute(chat_log_validation_path) == OK) - chat_service.free() - var discovery := DiscoveryClient.new() assert( str(discovery.call("_default_room_name", "River")) diff --git a/tests/digging_prototype_validation.gd b/tests/digging_prototype_validation.gd index 95917a0..c19bf0b 100644 --- a/tests/digging_prototype_validation.gd +++ b/tests/digging_prototype_validation.gd @@ -11,15 +11,6 @@ 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") @@ -29,7 +20,6 @@ func _run() -> void: _validate_catalog_content() _validate_flat_shovel() await _validate_beach_authoring() - _validate_primary_terrain_provider() print("Digging prototype validation: PASS") quit() @@ -91,66 +81,6 @@ 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 0728d82..884ad9b 100644 --- a/tests/economy_regression_validation.gd +++ b/tests/economy_regression_validation.gd @@ -31,14 +31,9 @@ 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(1, WorldLayout.STARTER_ISLAND)) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") for _frame: int in 8: await process_frame @@ -47,13 +42,14 @@ 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() == 314) + assert(LogbookCatalog.ordered_species(catalog.candidates).size() == 63) assert(sale_service != null) assert(shop_service != null) assert(session != null and session.is_host()) @@ -82,7 +78,7 @@ func _run() -> void: main, player, catalog, sale_service, reservations ) _test_host_backpack_purchase(player, shop_service) - await _test_host_home_upgrade(main, player, shop_service) + _test_host_storage_purchase(player, shop_service) assert(not sale_service.is_local_sale_pending()) assert(not shop_service.is_local_purchase_pending()) @@ -98,15 +94,11 @@ 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 @@ -134,10 +126,7 @@ func _run_multiplayer_host() -> void: var interaction := main.get("_shop_interaction") as FishingShopInteraction assert(interaction != null) remote_avatar.global_position = interaction.global_position - # 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 + var completion_deadline: int = Time.get_ticks_msec() + 30000 while Time.get_ticks_msec() < completion_deadline: await process_frame if session.get_authenticated_peer_ids().size() < 2: @@ -175,6 +164,7 @@ 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: @@ -183,9 +173,6 @@ 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() @@ -201,6 +188,7 @@ 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 @@ -499,7 +487,7 @@ func _test_host_art_shop_purchase( for _frame: int in 4: await physics_frame var required_balance: int = ( - ArtShopStock.ART_KIT_PRICE + ArtShopStock.UPGRADE_PRICE * 4 + ArtShopStock.ART_KIT_PRICE + ArtShopStock.UPGRADE_PRICE * 3 ) if player.wallet.get_balance() < required_balance: assert(player.wallet.credit(required_balance - player.wallet.get_balance())) @@ -517,10 +505,7 @@ func _test_host_art_shop_purchase( assert(art_item.icon.resource_path.ends_with("/art/art_kit.png")) assert(player.hotbar.assign_item(0, ArtShopStock.ART_KIT_ITEM_ID)) for product_id: StringName in [ - &"marker_ocean_teal", - &"brush_2x", - &"grid_32x", - PlayerArtUnlocks.STAMP_PRODUCT_ID, + &"marker_ocean_teal", &"brush_2x", &"grid_32x", ]: _shop_result.clear() assert(not shop_service.request_art_upgrade(product_id).is_empty()) @@ -556,58 +541,30 @@ 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]), - "Backpack purchase failed: %s" % [_shop_result], - ) + assert(not _shop_result.is_empty() and bool(_shop_result[1])) 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_home_upgrade( - main: Node, +func _test_host_storage_purchase( 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 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 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 balance_before := player.wallet.get_balance() - _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) + 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) assert(capacity.get_next_cost() == -1) @@ -887,9 +844,7 @@ func _test_fishing_shop_sale_ui( for child: Node in shop.get_node("%SuppliesList").get_children(): if child is Label: stock_sections.append((child as Label).text) - assert(stock_sections == [ - "art kit", "markers", "brushes", "grids", "stamps", - ]) + assert(stock_sections == ["art kit", "markers", "brushes", "grids"]) var marker_icons := shop.find_children( "MarkerIcon", "TextureRect", true, false ) @@ -948,17 +903,6 @@ func _test_fishing_shop_sale_ui( ) ) assert(found_art_upgrade_icons == expected_art_upgrade_icons.size()) - var stamp_button: Button - for upgrade_node: Node in shop.find_children("*", "Button", true, false): - var upgrade_button := upgrade_node as Button - if StringName(str(upgrade_button.get_meta(&"art_product_id", ""))) == ( - PlayerArtUnlocks.STAMP_PRODUCT_ID - ): - stamp_button = upgrade_button - break - assert(stamp_button != null) - assert(stamp_button.text == "stamp") - assert(stamp_button.icon == null) var price_bubbles := shop.find_children( "PriceBubble", "PanelContainer", true, false ) @@ -1001,21 +945,12 @@ func _test_fishing_shop_sale_ui( reserved_catch.catch_id, ) assert(staged.is_empty()) - 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", + PlayerInventoryLayout.EntryKind.CATCH, + fish_catch.catch_id, ) - 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 @@ -1024,19 +959,17 @@ 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 sale_buttons := sell_button.get_parent() as HBoxContainer + var sell_button := sell_inventory.get("_sell_button") as Button assert(feedback.get_index() < total_label.get_parent().get_index()) - assert(total_label.get_parent().get_index() < sale_buttons.get_index()) + assert(total_label.get_parent().get_index() < sell_button.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 + expected_all_payout) + assert(player.wallet.get_balance() == balance_before + fish_catch.sale_value) 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/equipment_catalog_validation.gd b/tests/equipment_catalog_validation.gd index bc549aa..a74d066 100644 --- a/tests/equipment_catalog_validation.gd +++ b/tests/equipment_catalog_validation.gd @@ -54,21 +54,6 @@ func _initialize() -> void: assert(FishingShopStockType.get_price(&"magnet") == 250) assert(FishingShopStockType.get_stock_item_ids().has(&"magnet")) assert(FishingShopStockType.is_permanent_unlock(&"magnet", magnet)) - var fishing_net: ItemDataType = ( - ItemCatalogResource.get_available_item_by_id(&"fishing_net") - ) - assert(fishing_net != null) - assert(fishing_net.category == ItemDataType.Category.TOOL) - assert(fishing_net.icon == null) - assert(not fishing_net.usable) - assert(not fishing_net.equippable) - assert(not fishing_net.hotbar_allowed) - assert(FishingShopStockType.get_price(&"fishing_net") == 250) - assert(FishingShopStockType.get_stock_item_ids().has(&"fishing_net")) - assert(FishingShopStockType.is_permanent_unlock( - &"fishing_net", fishing_net - )) - assert(not FishingShopStockType.is_gathering_tool(&"fishing_net")) var crab_net: ItemDataType = ItemCatalogResource.get_available_item_by_id( &"crab_net" ) diff --git a/tests/fish_catalog_content_validation.gd b/tests/fish_catalog_content_validation.gd index 82f5604..2afb18c 100644 --- a/tests/fish_catalog_content_validation.gd +++ b/tests/fish_catalog_content_validation.gd @@ -24,39 +24,10 @@ const PondPool: FishPoolType = preload( const OceanPool: FishPoolType = preload( "res://fish/pools/starter_ocean_pool.tres" ) -const GeneratedPondPool: FishPoolType = preload( - "res://fish/pools/generated_pond_pool.tres" -) -const GeneratedLakePool: FishPoolType = preload( - "res://fish/pools/generated_lake_pool.tres" -) -const GeneratedRiverPool: FishPoolType = preload( - "res://fish/pools/generated_river_pool.tres" -) 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", @@ -102,13 +73,14 @@ const NEW_FRESH_WATER_IDS: Array[StringName] = [ &"bowfin", &"sturgeon_lake", &"gar_longnose", &"paddlefish", &"sturgeon_shovelnose", &"gar_spotted", &"lungfish_west_african", ] + + func _initialize() -> void: call_deferred("_run") func _run() -> void: _validate_catalog_and_pools() - _validate_generated_habitat_pools() _validate_weight_based_display_scale() _validate_starter_water_bodies() _validate_authoritative_water_filter() @@ -117,42 +89,6 @@ func _run() -> void: quit() -func _validate_generated_habitat_pools() -> void: - var expected_counts: Dictionary = { - GeneratedPondPool: GENERATED_POND_COUNT, - GeneratedLakePool: GENERATED_LAKE_COUNT, - GeneratedRiverPool: GENERATED_RIVER_COUNT, - } - 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(not freshwater_ids.has(fish.id)) - freshwater_ids[fish.id] = true - assert(fish.is_allowed_in_water(WaterType.Type.FRESH_WATER)) - 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) - assert(GeneratedLakePool.get_fish_by_id(&"goby_round") != null) - - func _validate_weight_based_display_scale() -> void: var previous_scale: float = 0.0 for fish: FishDataType in Catalog.candidates: @@ -160,7 +96,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 <= 500000.0) + assert(fish.weight_max_lb <= 1000.0) var minimum_scale: float = fish.get_display_scale_for_weight( fish.weight_min_lb ) @@ -189,13 +125,10 @@ func _validate_weight_based_display_scale() -> void: func _validate_catalog_and_pools() -> void: assert(Catalog.candidates.size() == 316) - assert(PondPool.candidates.size() == STARTER_POND_COUNT) - assert(OceanPool.candidates.size() == OCEAN_COUNT) + assert(PondPool.candidates.size() == 26) + assert(OceanPool.candidates.size() == 34) 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()) @@ -213,30 +146,9 @@ func _validate_catalog_and_pools() -> void: else: inactive_count += 1 assert(not fish.is_selectable()) - 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) + assert(fish.display_texture == null) + assert(active_count == 63) + assert(inactive_count == 253) var chum: FishDataType = Catalog.get_fish_by_id(&"salmon_chum") assert(chum != null) assert(chum.get_season_text() == "fall") @@ -274,12 +186,12 @@ func _validate_catalog_and_pools() -> void: ) == chum ) seasonal_collection.free() - var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"crab_dungeness") + var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"mudskipper_atlantic") 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.SALT_WATER + inactive_context.water_type = WaterType.Type.FRESH_WATER var inactive_collection := CollectionLogType.new() var inactive_selector := FishSelectorType.new() inactive_selector.use_deterministic_test_seed = true @@ -323,12 +235,7 @@ func _validate_catalog_and_pools() -> void: assert(fish.is_selectable()) assert(PondPool.get_fish_by_id(fish_id) == fish) assert(OceanPool.get_fish_by_id(fish_id) == null) - var expected_tags: Array[StringName] = [] - if fish_id in [&"catfish_channel", &"catfish_white"]: - expected_tags.assign([&"starter_pond", &"pond"]) - else: - expected_tags.append(&"river") - assert(fish.availability.allowed_location_tags == expected_tags) + assert(fish.availability.allowed_location_tags == [&"starter_pond"]) assert( LogbookCatalog.category_for(fish) == LogbookCatalog.Category.FRESH_WATER @@ -399,25 +306,17 @@ func _validate_catalog_and_pools() -> void: var pond_context := FishingContextType.new() pond_context.location_tags = [&"starter_pond"] pond_context.water_type = WaterType.Type.FRESH_WATER + var night_pond_context := FishingContextType.new() + night_pond_context.location_tags = [&"starter_pond"] + night_pond_context.water_type = WaterType.Type.FRESH_WATER + night_pond_context.is_night = true var ocean_context := FishingContextType.new() ocean_context.location_tags = [&"coast", &"ocean"] ocean_context.water_type = WaterType.Type.SALT_WATER for fish_id: StringName in CATFISH_IDS: var fish: FishDataType = Catalog.get_fish_by_id(fish_id) - var day_habitat_context := FishingContextType.new() - if fish_id in [&"catfish_channel", &"catfish_white"]: - day_habitat_context.location_tags.append(&"pond") - else: - day_habitat_context.location_tags.append(&"river") - day_habitat_context.water_type = WaterType.Type.FRESH_WATER - var night_habitat_context := FishingContextType.new() - night_habitat_context.location_tags = ( - day_habitat_context.location_tags.duplicate() - ) - night_habitat_context.water_type = WaterType.Type.FRESH_WATER - night_habitat_context.is_night = true - assert(not fish.availability.is_available(day_habitat_context)) - assert(fish.availability.is_available(night_habitat_context)) + assert(not fish.availability.is_available(pond_context)) + assert(fish.availability.is_available(night_pond_context)) assert(not fish.availability.is_available(ocean_context)) var single_species_pool := FishPoolType.new() single_species_pool.candidates = [fish] @@ -427,7 +326,7 @@ func _validate_catalog_and_pools() -> void: selector.begin_roll() assert( selector.select_fish( - single_species_pool, night_habitat_context, collection + single_species_pool, night_pond_context, collection ) == fish ) collection.free() @@ -465,15 +364,11 @@ 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 - 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.fish_pool = OceanPool 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 - 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.fish_pool = PondPool 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 af3644b..999561a 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.record_catch( + player.collection_log.mark_quality_discovered( fish_catch.fish_id, fish_catch.quality, ) @@ -98,30 +98,29 @@ func _run() -> void: assert(save_manager.save_now()) var save_path: String = str(save_manager.get("_save_path")) - var decoded: Dictionary = ProgressionSaveCodec.read_local_save(save_path) - assert(bool(decoded.get("ok", false))) - var parsed: Dictionary = decoded["data"] - var hotbar_data: Dictionary = parsed["hotbar"] + var save_file := FileAccess.open(save_path, FileAccess.READ) + assert(save_file != null) + var parsed: Variant = JSON.parse_string(save_file.get_as_text()) + save_file.close() + assert(typeof(parsed) == TYPE_DICTIONARY) + var hotbar_data: Dictionary = (parsed as Dictionary)["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"]) == 11) - assert(not PlayerHomeState.sanitize_save_data( - parsed.get("home", {}) - ).is_empty()) + assert(int((parsed as Dictionary)["save_version"]) == 8) assert( - int(parsed["experience"]["total_experience"]) + int((parsed as Dictionary)["experience"]["total_experience"]) == 125 ) assert(absf( - float(parsed["world"]["time_hours"]) - saved_time_hours + float((parsed as Dictionary)["world"]["time_hours"]) - saved_time_hours ) < 0.01) assert( - int(parsed["world"]["weather"]) + int((parsed as Dictionary)["world"]["weather"]) == int(saved_weather) ) assert(absf( float( - parsed["world"][ + (parsed as Dictionary)["world"][ "weather_seconds_remaining" ] ) - saved_weather_seconds @@ -135,19 +134,6 @@ 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)) @@ -175,7 +161,6 @@ 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) @@ -200,8 +185,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 == 12) - assert(NetworkProtocol.ENET_CHANNEL_COUNT == 18) + assert(NetworkProtocol.PROTOCOL_VERSION == 8) + assert(NetworkProtocol.ENET_CHANNEL_COUNT == 10) assert( NetworkProtocol.FISH_QUALITY_CAPABILITY == "fish_quality_v1" diff --git a/tests/fish_quality_validation.gd b/tests/fish_quality_validation.gd index 99a2169..da9f4be 100644 --- a/tests/fish_quality_validation.gd +++ b/tests/fish_quality_validation.gd @@ -25,60 +25,13 @@ func _run() -> void: _validate_mail_round_trip() _validate_collection_mastery() _validate_version_four_migration() - _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.PROTOCOL_VERSION == 8) + assert(NetworkProtocol.ENET_CHANNEL_COUNT == 10) 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") @@ -241,7 +194,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.5)) + assert(is_equal_approx(CatchController.CHASE_START_DELAY, 1.0)) assert(is_equal_approx(CatchController.CHASE_START_OFFSET, 0.04)) assert(is_equal_approx(Player.BASE_REEL_SPEED, 0.16)) @@ -448,11 +401,6 @@ 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() @@ -485,7 +433,7 @@ func _validate_version_four_migration() -> void: version_four, 4, ) - assert(int(migrated.get("save_version", -1)) == 11) + assert(int(migrated.get("save_version", -1)) == 8) assert(int((migrated["experience"] as Dictionary)["total_experience"]) == 0) assert( is_equal_approx( @@ -493,10 +441,6 @@ func _validate_version_four_migration() -> void: 8.0, ) ) - assert( - int((migrated["world"] as Dictionary)["seed"]) - == PlayerSaveManager.DEFAULT_WORLD_SEED - ) var catches: Array = migrated["inventory"]["catches"] assert(int((catches[0] as Dictionary)["quality"]) == 0) var collection: Dictionary = migrated["collection"] @@ -509,7 +453,4 @@ 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 5161377..72f4a59 100644 --- a/tests/fish_showcase_multiplayer_validation.gd +++ b/tests/fish_showcase_multiplayer_validation.gd @@ -24,10 +24,6 @@ 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 b3c17dd..c06ab36 100644 --- a/tests/fishing_authority_validation.gd +++ b/tests/fishing_authority_validation.gd @@ -19,12 +19,6 @@ 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()) @@ -41,44 +35,23 @@ func _run() -> void: var fishing_status := game_ui.get_node("%StatusLabel") as Label var fishing_panel := game_ui.get_node("%FishingPanel") as PanelContainer var player := main.get("_player") as Player - var item_catalog := main.get("item_catalog") as ItemCatalog assert(session.is_host()) assert(not session.is_open_host()) assert(service != null and fishing_spot != null and player != null) assert(player.hotbar.get_selected_item_id() == &"basic_fishing_rod") - var worms: ItemData = item_catalog.get_item_by_id(&"worms") - assert(worms != null) - if player.bag.get_quantity(&"worms") == 0: - assert(player.bag.add_item(&"worms", 2)) - assert(player.equip_bait(worms)) - var bait_quantity_before: int = player.bag.get_quantity(&"worms") - var fresh_root := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion/WaterBodies/FreshWaterBodies" + var pond := main.get_node( + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond" ) as Node3D - var pond: WaterBodyAuthoring - for child: Node in fresh_root.get_children(): - var candidate := child as WaterBodyAuthoring - if candidate != null and &"pond" in candidate.location_tags: - pond = candidate - break - assert(pond != null) var pond_region := pond.get_node("FishingRegion") as FishableWaterRegion - assert(pond_region != null) + assert(pond != null and pond_region != null) var pond_surface_y: float = pond_region.get_surface_height() - player.global_position = pond.global_transform * Vector3( - pond.surface_size.x * 0.5 + 0.8, - 1.44, - 0.0, - ) - var pond_direction := pond.global_position - player.global_position - pond_direction.y = 0.0 - pond_direction = pond_direction.normalized() + player.global_position = pond.global_position + Vector3(8.9, 1.44, 0.0) var visuals := player.get_node("Visuals") as Node3D - visuals.global_rotation.y = atan2(-pond_direction.x, -pond_direction.z) + visuals.rotation.y = PI * 0.5 for _frame: int in 4: await physics_frame - assert(player.get_facing_direction().dot(pond_direction) > 0.99) + assert(player.get_facing_direction().dot(Vector3.LEFT) > 0.99) fishing_spot.call("_begin_aiming", player) assert(fishing_spot.state == FishingSpotType.FishingState.AIMING_CAST) @@ -86,9 +59,7 @@ func _run() -> void: fishing_spot.set("_cast_charge", 0.32) fishing_spot.call("_update_cast_charge", 0.0) var aimed_target: Vector3 = fishing_spot.get("_cast_target") - var aimed_direction := aimed_target - player.global_position - aimed_direction.y = 0.0 - assert(aimed_direction.normalized().dot(pond_direction) > 0.99) + assert(aimed_target.x < player.global_position.x - 0.85) assert(is_equal_approx(aimed_target.y, pond_surface_y)) assert(fishing_spot.is_target_fishable(aimed_target)) fishing_spot.call("_confirm_cast") @@ -103,7 +74,6 @@ func _run() -> void: await process_frame assert(fishing_spot.state == FishingSpotType.FishingState.WAITING_FOR_BITE) assert(service.has_local_attempt()) - assert(player.bag.get_quantity(&"worms") == bait_quantity_before) assert(fishing_status.text.is_empty()) assert(not fishing_status.visible) assert(not fishing_panel.visible) @@ -138,7 +108,6 @@ func _run() -> void: assert(fishing_spot.state == FishingSpotType.FishingState.READY) assert(player.is_movement_enabled()) assert(not bobber.visible) - assert(player.bag.get_quantity(&"worms") == bait_quantity_before) # A private host rolls and retains the authoritative catch before the fight # so its quality selects the barrier band clients receive in snapshots. @@ -156,18 +125,9 @@ func _run() -> void: attempts = service.get("_attempts") 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) var fish: FishData = catalog.get_fish_by_id(attempt.fish_id) @@ -213,7 +173,6 @@ 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) @@ -224,8 +183,6 @@ 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 @@ -245,38 +202,6 @@ func _run() -> void: assert(fishing_spot.can_change_hotbar_selection()) assert(fishing_spot.can_open_fishing_shop()) - # Escape can put the rod into RETURNING immediately before deep-water - # recovery begins. Recovery must finish that return before snapshotting its - # movement state, otherwise the respawn restores a permanent cast lock. - var water_recovery := main.get_node("%WaterRecovery") as WaterRecoveryController - assert(water_recovery != null) - var pause_menu: PauseMenu = game_ui.get_pause_menu() - pause_menu.open_menu() - assert(pause_menu.visible) - player.set_movement_enabled(false) - fishing_spot.set("_active_player", player) - fishing_spot.state = FishingSpotType.FishingState.RETURNING - water_recovery.call( - "_on_recovery_requested", - player, - player.global_position.y, - ) - assert(fishing_spot.state == FishingSpotType.FishingState.READY) - 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()) - print("Fishing authority validation: PASS") session.disconnect_session("") main.queue_free() diff --git a/tests/fishing_multiplayer_validation.gd b/tests/fishing_multiplayer_validation.gd index 9d7ef7f..e19a92e 100644 --- a/tests/fishing_multiplayer_validation.gd +++ b/tests/fishing_multiplayer_validation.gd @@ -2,7 +2,6 @@ extends SceneTree const MainScene = preload("res://main/main.tscn") const FishingSpotType = preload("res://fishing/fishing_spot.gd") -const TEST_SEED: int = 864209 func _initialize() -> void: @@ -23,23 +22,9 @@ func _run() -> void: func _run_host() -> void: var main: Node = await _create_initialized_main() - assert(bool(main.call( - "_apply_world", - WorldLayout.STARTER_ISLAND, - TEST_SEED, - true, - ))) - assert(bool(main.call( - "_prepare_host_world", - WorldLayout.STARTER_ISLAND, - TEST_SEED, - ))) assert(bool(main.call("_prepare_private_host"))) var save_manager := main.get("_save_manager") as PlayerSaveManager - assert(save_manager.initialize_new_game( - TEST_SEED, - WorldLayout.STARTER_ISLAND, - )) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") var session := main.get_node("%NetworkSession") as NetworkSession assert(session.set_host_open(true)) @@ -63,38 +48,12 @@ 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) - 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"] + 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 session.publish_authoritative_teleport(remote_peer_id) var aiming_deadline: int = Time.get_ticks_msec() + 15000 while ( @@ -108,7 +67,7 @@ func _run_host() -> void: == Player.FishingVisualPhase.CASTING ) var remote_position_error := ( - remote_avatar.global_position - expected_position + remote_avatar.global_position - Vector3(-0.5, 3.95, 2.1) ) remote_position_error.y = 0.0 assert( @@ -116,7 +75,7 @@ func _run_host() -> void: "remote casting position drifted: %s" % remote_avatar.global_position ) assert( - remote_avatar.get_facing_direction().dot(expected_direction) > 0.99, + remote_avatar.get_facing_direction().dot(Vector3.LEFT) > 0.99, "remote casting facing drifted: %s" % remote_avatar.get_facing_direction() ) @@ -222,23 +181,6 @@ 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" @@ -249,6 +191,7 @@ 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: @@ -259,39 +202,29 @@ func _run_client() -> void: "Visuals/CharacterRig/AnimationPlayer" ) as AnimationPlayer assert(character_animation_player.has_animation(&"retract_sit")) - # 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 + var placement_deadline: int = Time.get_ticks_msec() + 5000 while ( Time.get_ticks_msec() < placement_deadline - and player.global_position.distance_to(exterior_spawn.origin) <= 1.0 + and player.global_position.distance_to(Vector3(-0.5, 3.95, 2.1)) + > 0.25 ): await physics_frame - 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() + 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) player.set_casting_visual() assert( int(player.get("_fishing_visual_phase")) == Player.FishingVisualPhase.CASTING ) - # Keep the transient pull-back pose visible long enough for the separate host - # process to observe it even when a cold validation run is CPU-bound. - for _frame: int in 120: + for _frame: int in 30: await physics_frame player.set_fishing_visual(false) player.call("_set_sitting", true, true) 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")) @@ -300,7 +233,6 @@ 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) @@ -309,33 +241,14 @@ 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 bool(fishing_spot.get("_cast_path_is_clear")) + and fishing_spot.is_cast_path_clear(cast_origin, candidate_target) ): cast_charge = candidate_charge target = candidate_target break - 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, - ], - ) + assert(cast_charge > 0.0, "no clear fishable test target was found") var evidence: Dictionary = fishing_spot.call("_build_network_evidence") fishing_spot.set("state", FishingSpotType.FishingState.CASTING) player.set_movement_enabled(false) @@ -372,9 +285,7 @@ func _run_client() -> void: ] ) assert(service.has_local_attempt()) - # Bait remains available while the bobber is waiting. It is consumed only - # once the authoritative bite begins. - assert(player.bag.get_quantity(&"worms") == worms_before_cast) + assert(player.bag.get_quantity(&"worms") == worms_before_cast - 1) var fishing_deadline: int = Time.get_ticks_msec() + 5000 while ( Time.get_ticks_msec() < fishing_deadline @@ -458,79 +369,3 @@ 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 8248c36..6e456fd 100644 --- a/tests/fishing_surface_validation.gd +++ b/tests/fishing_surface_validation.gd @@ -151,12 +151,6 @@ func _validate_portable_water_body() -> void: water_body.set("surface_size", Vector2(12.0, 8.0)) water_body.set("fishing_depth", 6.0) water_body.set("recovery_depth", 7.0) - water_body.set( - "recovery_entry_height_reference", - 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 @@ -175,43 +169,8 @@ func _validate_portable_water_body() -> void: assert(is_equal_approx(fishing_region.get_surface_height(), 7.0)) assert(is_equal_approx(fishing_shape_node.position.y, -3.0)) assert(fishing_shape.size.is_equal_approx(Vector3(12.0, 6.0, 8.0))) - var recovery_region := ( - water_body.get_node("RecoveryRegion") as PlayerWaterTrigger - ) + var recovery_region := water_body.get_node("RecoveryRegion") as Area3D assert(is_equal_approx(recovery_region.position.y, -3.5)) - assert( - recovery_region.entry_height_reference - == 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 @@ -240,59 +199,6 @@ func _validate_portable_water_body() -> void: mesh_derived_body.queue_free() await process_frame - var polygon_body := WaterBodyScene.instantiate() as WaterBodyAuthoring - polygon_body.position = Vector3(30.0, 5.0, 20.0) - polygon_body.surface_polygon = PackedVector2Array([ - Vector2(-4.0, -4.0), - Vector2(4.0, -4.0), - Vector2(4.0, 4.0), - Vector2(0.0, 1.0), - Vector2(-4.0, 4.0), - ]) - polygon_body.visual_surface_enabled = false - polygon_body.fish_pool = PondPool - root.add_child(polygon_body) - await physics_frame - await physics_frame - - var polygon_fishing_region := polygon_body.get_node( - "FishingRegion" - ) as FishableWaterRegionType - var polygon_recovery_region := polygon_body.get_node( - "RecoveryRegion" - ) as Area3D - assert(polygon_fishing_region.get_child_count() == 3) - assert(polygon_recovery_region.get_child_count() == 3) - for child: Node in polygon_fishing_region.get_children(): - var polygon_shape_node := child as CollisionShape3D - assert(polygon_shape_node != null) - assert(polygon_shape_node.shape is ConvexPolygonShape3D) - - var polygon_resolver := FishingSurfaceResolverType.new() - var polygon_space_state := ( - polygon_body.get_world_3d().direct_space_state - ) - var polygon_inside: FishingSurfaceSampleType = ( - polygon_resolver.resolve_surface( - polygon_space_state, - Vector3(30.0, 0.0, 20.0), - 8.0, - ) - ) - assert(polygon_inside.is_fishable()) - assert(is_equal_approx(polygon_inside.position.y, 5.0)) - var polygon_notch: FishingSurfaceSampleType = ( - polygon_resolver.resolve_surface( - polygon_space_state, - Vector3(30.0, 0.0, 23.0), - 8.0, - ) - ) - assert(not polygon_notch.has_surface) - - polygon_body.queue_free() - await process_frame - func _validate_starter_region_surfaces() -> void: var region := StarterRegionScene.instantiate() as Node3D @@ -519,7 +425,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, "cast-attempt") + presentation.show_cast(origin, target) var bobber := presentation.get("_bobber") as MeshInstance3D assert(bobber.visible) assert(presentation.get("_cast_tween") != null) @@ -529,22 +435,6 @@ 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 deleted file mode 100644 index f8ef64d..0000000 --- a/tests/friend_multiplayer_validation.gd +++ /dev/null @@ -1,161 +0,0 @@ -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 deleted file mode 100644 index d243a6b..0000000 --- a/tests/friend_multiplayer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cxltqyom4yt3j diff --git a/tests/friend_relationship_validation.gd b/tests/friend_relationship_validation.gd deleted file mode 100644 index ce6bd90..0000000 --- a/tests/friend_relationship_validation.gd +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index aa2acaf..0000000 --- a/tests/friend_relationship_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://d3v4e1xtu8ytq diff --git a/tests/gathering_marker_surface_validation.gd b/tests/gathering_marker_surface_validation.gd index 72f15f0..8ce3b4a 100644 --- a/tests/gathering_marker_surface_validation.gd +++ b/tests/gathering_marker_surface_validation.gd @@ -44,8 +44,6 @@ 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 51d6f38..0138bad 100644 --- a/tests/gathering_showcase_validation.gd +++ b/tests/gathering_showcase_validation.gd @@ -21,28 +21,17 @@ 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(1, WorldLayout.STARTER_ISLAND)) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") for _frame: int in 8: await process_frame var player := main.get("_player") as Player var fishing_spot := main.get_node("%FishingSpot") as FishingSpot - var game_ui := main.get_node("%GameUI") as GameUI var catalog := main.get("fish_catalog") as FishPool - assert( - player != null - and fishing_spot != null - and game_ui != null - and catalog != null - ) - fishing_spot.minimum_showcase_duration = 1.0 + assert(player != null and fishing_spot != null and catalog != null) assert(player.bag.add_item(&"crab_net")) assert(player.hotbar.assign_item(0, &"crab_net")) assert(player.hotbar.select_slot(0)) @@ -69,41 +58,17 @@ func _run() -> void: assert(fishing_spot.present_external_catch(crab_catch)) assert(fishing_spot.state == FishingSpot.FishingState.SHOWING_CATCH) assert(not player.is_movement_enabled()) - # Network attempt cleanup may restore the base movement flag before the - # presentation finishes. The showcase owns a separate local-input lock. - player.set_movement_enabled(true) - assert(not bool(player.call("_is_movement_input_enabled"))) - assert(not bool(player.call("_is_camera_input_enabled"))) Input.action_release("fish_primary") await process_frame - assert(not bool(fishing_spot.get("_put_away_press_armed"))) + assert(bool(fishing_spot.get("_put_away_press_armed"))) var pocket_event := InputEventAction.new() pocket_event.action = &"fish_primary" pocket_event.pressed = true Input.parse_input_event(pocket_event) await process_frame - assert(fishing_spot.get("_pending_catch") == crab_catch) - Input.action_release("fish_primary") - 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) - await process_frame assert(fishing_spot.get("_pending_catch") == null) - # A radial menu can open after the showcase panel disappears but before the - # pocket animation restores gameplay. Its camera lock must not overwrite the - # showcase's underlying camera state when the two finish in either order. - Input.action_press("open_emotes") - var emote_press := InputEventAction.new() - emote_press.action = &"open_emotes" - emote_press.pressed = true - game_ui.call("_input", emote_press) - var emote_menu := game_ui.get_node("%EmoteRadialMenu") as EmoteRadialMenu - assert(emote_menu.is_open()) - assert(not bool(player.call("_is_camera_input_enabled"))) - var pocket_deadline: int = Time.get_ticks_msec() + 6000 while ( Time.get_ticks_msec() < pocket_deadline @@ -112,25 +77,6 @@ func _run() -> void: await process_frame assert(fishing_spot.state == FishingSpot.FishingState.READY) assert(player.is_movement_enabled()) - assert(bool(player.call("_is_movement_input_enabled"))) - assert(not bool(player.call("_is_camera_input_enabled"))) - Input.action_release("open_emotes") - var emote_release := InputEventAction.new() - emote_release.action = &"open_emotes" - emote_release.pressed = false - game_ui.call("_input", emote_release) - assert(not emote_menu.is_open()) - assert(bool(player.call("_is_camera_input_enabled"))) - - # A focused chat field or popup can consume the wheel's release event. The - # polled action state must still close the radial and release its camera lock. - Input.action_press("open_emotes") - game_ui.call("_input", emote_press) - assert(emote_menu.is_open()) - Input.action_release("open_emotes") - await process_frame - assert(not emote_menu.is_open()) - assert(bool(player.call("_is_camera_input_enabled"))) assert(player.inventory.contains_catch_id(crab_catch.catch_id)) assert(bool(player.get("_active_item_is_net"))) print("Gathering showcase validation: PASS") diff --git a/tests/generated_world_runtime_validation.gd b/tests/generated_world_runtime_validation.gd deleted file mode 100644 index 076f1c9..0000000 --- a/tests/generated_world_runtime_validation.gd +++ /dev/null @@ -1,1811 +0,0 @@ -extends SceneTree - -const RegionScene: PackedScene = preload( - "res://world/generation/generated_world_region.tscn" -) -const GeneratedPondPool: FishPool = preload( - "res://fish/pools/generated_pond_pool.tres" -) -const GeneratedLakePool: FishPool = preload( - "res://fish/pools/generated_lake_pool.tres" -) -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 -const EXPECTED_PROP_IDS: Array[StringName] = [ - &"prop_bridge", - &"prop_dock", - &"prop_log", - &"prop_log_post_1", - &"prop_log_post_2", - &"prop_mushroom", - &"prop_palm", - &"prop_pine", - &"prop_pine_large", - &"prop_timber_1", - &"prop_timber_2", - &"prop_tree_1", - &"prop_tree_2", - &"prop_tree_3", - &"prop_tree_large", -] -const EXPECTED_BIOME_IDS: Array[StringName] = [ - &"biome_plains", - &"biome_forest", - &"biome_pine_forest", - &"biome_coast", -] -const PROCEDURAL_PROP_IDS: Array[StringName] = [ - &"prop_log", - &"prop_mushroom", - &"prop_palm", - &"prop_pine", - &"prop_pine_large", - &"prop_tree_1", - &"prop_tree_2", - &"prop_tree_3", - &"prop_tree_large", -] - - -func _initialize() -> void: - call_deferred(&"_run") - - -func _run() -> void: - var region := RegionScene.instantiate() as GeneratedWorldRegion - assert(region != null) - var configured_generator := region.get_node( - "Terrain/TerrainChunkGenerator" - ) as TerrainChunkGenerator - assert(configured_generator != null) - configured_generator.elevated_cliff_third_level_chance = 1.0 - configured_generator.elevated_cliff_third_tier_base_chance = 0.0 - configured_generator.elevated_cliff_third_tier_stack_chance = 1.0 - 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( - "Terrain/TerrainChunkGenerator" - ) as TerrainChunkGenerator - assert(generator != null) - assert(region.get_generation_seed() == FIRST_SEED) - _validate_generated_region(region, generator) - - var first_layout := generator.placement_keys() - var first_stacked_layout := generator.stacked_elevated_placement_keys() - var first_biomes := _biome_signature(region, generator) - var first_decorations := _decoration_signature(region) - assert(region.generate_world(FIRST_SEED)) - assert(generator.placement_keys() == first_layout) - assert(_biome_signature(region, generator) == first_biomes) - assert(_decoration_signature(region) == first_decorations) - generator._elevated_feature_center = Vector2i(-1, -1) - assert(generator.generate_from_placement_keys(first_layout)) - assert(generator.stacked_elevated_placement_keys() == first_stacked_layout) - - configured_generator.elevated_cliff_third_tier_base_chance = 1.0 - configured_generator.elevated_cliff_third_tier_stack_chance = 0.0 - assert(region.generate_world(SECOND_SEED)) - await process_frame - await physics_frame - await physics_frame - _validate_generated_region(region, generator) - assert(generator.placement_keys() != first_layout) - assert(_biome_signature(region, generator) != first_biomes) - var second_layout := generator.placement_keys() - - configured_generator.elevated_cliff_double_third_tier_chance = 1.0 - assert(region.generate_world(RIVER_FALLBACK_SEED)) - await process_frame - await physics_frame - await physics_frame - _validate_generated_region(region, generator) - assert(generator.placement_keys() != first_layout) - assert(generator.placement_keys() != second_layout) - assert(generator._river_feature_candidate_index >= 0) - - region.queue_free() - await process_frame - print("Generated world runtime validation: PASS") - quit() - - -func _validate_generated_region( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, -) -> void: - var placements := generator.placement_keys() - var expected_chunk_count := generator.grid_size.x * generator.grid_size.y - var center := Vector2i( - generator.grid_size.x / 2, - generator.grid_size.y / 2, - ) - var center_index := center.y * generator.grid_size.x + center.x - assert(generator.grid_size == Vector2i(20, 20)) - assert(generator._lake_feature_footprint_size.x >= 7) - assert( - generator._lake_feature_footprint_size.x - == generator._lake_feature_footprint_size.y - ) - assert(maxi( - generator._river_feature_footprint_size.x, - generator._river_feature_footprint_size.y, - ) >= 4) - assert(mini( - generator._river_feature_footprint_size.x, - generator._river_feature_footprint_size.y, - ) >= 4) - assert(generator._river_feature_flow_direction in [ - Vector2i.RIGHT, - Vector2i.DOWN, - Vector2i.LEFT, - Vector2i.UP, - ]) - assert(generator._river_feature_outlet_direction in [ - Vector2i.RIGHT, - Vector2i.DOWN, - Vector2i.LEFT, - Vector2i.UP, - ]) - assert( - generator._river_feature_flow_direction.x - * generator._river_feature_outlet_direction.x - + generator._river_feature_flow_direction.y - * generator._river_feature_outlet_direction.y - == 0 - ) - assert(generator.elevated_cliff_coastal_feature_required) - assert(placements.size() == expected_chunk_count) - assert(placements[center_index].begins_with("chunk_spawn@")) - assert(_placement_count(placements, "chunk_spawn") == 1) - assert(_placement_count(placements, "chunk_0001") >= 1) - var stream_count := ( - _placement_count(placements, "chunk_0003") - + _placement_count(placements, "chunk_0016") - ) - assert(stream_count >= 1 and stream_count <= 3) - assert(_placement_count(placements, "chunk_0004") == 2) - var beach_count := _placement_count(placements, "chunk_0002") - var grass_coast_count := _placement_count(placements, "chunk_0005") - var grass_corner_count := _placement_count(placements, "chunk_0007") - var beach_corner_count := _placement_count(placements, "chunk_0008") - var has_secondary_elevation := ( - generator._secondary_elevated_feature_center.x >= 0 - ) - var has_third_tier_base := ( - _placement_count(placements, "chunk_0028") > 0 - ) - var coastline_edge_count := ( - 2 * (generator.grid_size.x - 2) - + 2 * (generator.grid_size.y - 2) - ) - assert( - beach_count - == coastline_edge_count - (4 if has_secondary_elevation else 0) - 2 - and grass_coast_count == 0 - ) - assert( - beach_corner_count == (3 if has_secondary_elevation else 4) - and grass_corner_count == 0 - ) - assert( - _placement_count(placements, "chunk_0009") - == ( - (1 if has_secondary_elevation else 0) - + (0 if has_third_tier_base else 9) - ) - ) - assert( - _placement_count(placements, "chunk_0010") - == ( - (1 if has_secondary_elevation else 0) - + (0 if has_third_tier_base else 4) - ) - ) - assert( - _placement_count(placements, "chunk_0011") - + _placement_count(placements, "chunk_0012") - == ( - (2 if has_secondary_elevation else 0) - + (0 if has_third_tier_base else 12) - ) - ) - assert( - _placement_count(placements, "chunk_0012") - == ( - (1 if has_secondary_elevation else 0) - + (0 if has_third_tier_base else 1) - ) - ) - assert( - _placement_count(placements, "chunk_0028") - == (9 if has_third_tier_base else 0) - ) - assert( - _placement_count(placements, "chunk_0027") - == (4 if has_third_tier_base else 0) - ) - assert( - _placement_count(placements, "chunk_0026") - == (10 if has_third_tier_base else 0) - ) - assert(_placement_count(placements, "chunk_0029") == 1) - assert(_placement_count(placements, "chunk_0030") == 1) - assert(_placement_count(placements, "chunk_0031") == 1) - assert(_placement_count(placements, "chunk_0032") == 1) - assert(_placement_count(placements, "chunk_0033") == 1) - 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) - ) - assert( - _placement_count(placements, "chunk_0015") - == (1 if has_secondary_elevation else 0) - ) - assert(_placement_count(placements, "chunk_0018") == 0) - assert(_placement_count(placements, "chunk_0020") == 4) - assert(_placement_count(placements, "chunk_0022") == 4) - assert(_placement_count(placements, "chunk_0023") == 4) - var lake_edge_count := _placement_count(placements, "chunk_0017") - var lake_edge_variant_count := _placement_count(placements, "chunk_0037") - var lake_fill_count := _placement_count(placements, "chunk_0019") - var lake_narrow_count := _placement_count(placements, "chunk_0021") - var lake_size := generator._lake_feature_footprint_size.x - assert(lake_size in [7, 8]) - assert(lake_fill_count == (lake_size - 2) * (lake_size - 2)) - assert(lake_edge_count + lake_edge_variant_count == (lake_size - 6) * 4) - assert(lake_edge_count > 0) - assert(lake_edge_variant_count > 0) - assert(lake_narrow_count == 8) - assert(_placement_count(placements, "chunk_9999") == 0) - assert(_placement_count(placements, "chunk_9998") == 0) - assert( - _placement_count(placements, "chunk_9997") - == (1 if has_secondary_elevation else 0) - ) - assert( - _placement_count(placements, "chunk_9996") - == (1 if has_secondary_elevation else 0) - ) - assert(_placement_count(placements, "chunk_9995") == 0) - var river_coordinate_count := generator._river_feature_coordinates.size() - 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, - generator._river_feature_flow_direction, - ) - assert(river_source_coordinates.size() == 2) - for source_coordinate: Vector2i in river_source_coordinates: - var source_index := ( - source_coordinate.y * generator.grid_size.x + source_coordinate.x - ) - assert( - placements[source_index].begins_with("chunk_0029@") - or placements[source_index].begins_with("chunk_0030@") - ) - var source_offset := source_coordinate - generator._elevated_feature_center - assert( - maxi(absi(source_offset.x), absi(source_offset.y)) - == TerrainChunkGenerator.ELEVATED_FEATURE_RADIUS - ) - var outlet_coordinates: Array[Vector2i] = [] - for index: int in placements.size(): - if ( - placements[index].begins_with("chunk_0031@") - or placements[index].begins_with("chunk_0032@") - ): - var outlet_coordinate := Vector2i( - index % generator.grid_size.x, - index / generator.grid_size.x, - ) - outlet_coordinates.append(outlet_coordinate) - assert( - not generator._coordinate_is_inside_grid( - outlet_coordinate - + generator._river_feature_outlet_direction - ) - ) - assert(outlet_coordinates.size() == 2) - var outlet_delta := outlet_coordinates[1] - outlet_coordinates[0] - assert(absi(outlet_delta.x) + absi(outlet_delta.y) == 1) - for beach_coordinate: Vector2i in [ - outlet_coordinates[0] - outlet_delta, - outlet_coordinates[1] + outlet_delta, - ]: - assert(generator._coordinate_is_inside_grid(beach_coordinate)) - assert(generator._coordinate_is_on_boundary(beach_coordinate)) - var beach_index := ( - beach_coordinate.y * generator.grid_size.x + beach_coordinate.x - ) - assert(placements[beach_index].begins_with("chunk_0002@")) - for index: int in placements.size(): - var coordinate := Vector2i( - index % generator.grid_size.x, - index / generator.grid_size.x, - ) - if placements[index].begins_with("chunk_0001@"): - assert(generator._distance_from_map_boundary(coordinate) <= 1) - elif placements[index].begins_with("chunk_0013@"): - assert(generator._distance_from_map_boundary(coordinate) <= 2) - assert(_placement_count(placements, "chunk_0013") >= 1) - assert( - 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() - == ( - expected_chunk_count - + generator.stacked_elevated_placement_keys().size() - ) - ) - _validate_elevated_cliff_feature(region, generator) - - var shop := region.get_node("Interactables/FishingShopWorld") as Node3D - var storage := region.get_node("Interactables/PlayerStorageBox") as Node3D - assert(shop != null and shop.has_node("Shopkeeper")) - assert(storage != null and storage.has_node("InteractionArea")) - var spawn_chunk_center := generator.chunk_position(center) - var shop_offset := shop.position - spawn_chunk_center - var storage_offset := storage.position - spawn_chunk_center - assert(absf(shop_offset.x) < 5.0 and absf(shop_offset.z) < 5.0) - assert(absf(storage_offset.x) < 5.0 and absf(storage_offset.z) < 5.0) - assert(region.get_fishing_shop() != null) - assert(region.get_player_storage() != null) - assert(region.get_player_spawn_transform().origin.y > 0.0) - _validate_prop_catalog(region) - _validate_biome_catalog(region, generator) - - var ocean := region.get_node("WaterBodies/OceanWater") as WaterBodyAuthoring - var fresh_root := region.get_node("WaterBodies/FreshWaterBodies") as Node3D - assert(ocean != null and fresh_root != null) - assert(ocean.water_type == WaterType.Type.SALT_WATER) - assert(is_equal_approx(ocean.position.y, GeneratedWorldRegion.WATER_HEIGHT)) - var ocean_recovery := ocean.get_node("RecoveryRegion") as PlayerWaterTrigger - assert( - ocean_recovery.entry_height_reference - == PlayerWaterTrigger.EntryHeightReference.BODY_CENTER - ) - assert(is_equal_approx(ocean_recovery.entry_depth_threshold, 0.35)) - var fresh_placement_count := 0 - var river_placement_count := 0 - var polygon_sizes_by_coordinate: Dictionary[Vector2i, int] = {} - for record: Dictionary in generator.placement_records(): - var tags: PackedStringArray = record.get("tags", PackedStringArray()) - if "coast" in tags: - _validate_ocean_facing_record(record, generator.grid_size) - if "fresh_water" in tags: - fresh_placement_count += 1 - if "river" in tags: - river_placement_count += 1 - assert(not "pond" in tags) - assert(not "lake" in tags) - var surface_polygon: PackedVector2Array = record.get( - "water_surface_polygon", - PackedVector2Array(), - ) - if surface_polygon.size() >= 3: - polygon_sizes_by_coordinate[ - record.get("coordinate", Vector2i.ZERO) - ] = surface_polygon.size() - _validate_complete_coastline(generator) - assert(fresh_root.get_child_count() == fresh_placement_count) - assert(river_placement_count == river_coordinate_count) - assert( - polygon_sizes_by_coordinate.size() - == 20 + river_placement_count - ) - var river_body_count := 0 - for child: Node in fresh_root.get_children(): - var fresh := child as WaterBodyAuthoring - assert(fresh != null) - assert(fresh.water_type == WaterType.Type.FRESH_WATER) - assert(is_equal_approx(fresh.position.y, GeneratedWorldRegion.WATER_HEIGHT)) - assert(fresh.visible) - 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 - ) - assert( - fresh_recovery.entry_height_reference - == 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( - int(coordinate_tokens[0]), - int(coordinate_tokens[1]), - ) - if polygon_sizes_by_coordinate.has(coordinate): - assert( - fresh.surface_polygon.size() - == polygon_sizes_by_coordinate[coordinate] - ) - assert( - fresh.get_node("FishingRegion").get_child_count() > 1 - ) - else: - assert(fresh.surface_polygon.is_empty()) - if &"river" in fresh.location_tags: - river_body_count += 1 - assert(fresh.fish_pool == GeneratedRiverPool) - elif &"lake" in fresh.location_tags: - assert(fresh.fish_pool == GeneratedLakePool) - else: - assert(&"pond" in fresh.location_tags) - assert(fresh.fish_pool == GeneratedPondPool) - 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 - assert(decorations != null and decorations.get_child_count() > 0) - assert(anchors != null) - assert(anchors.get_spawn_positions().size() > 0) - _validate_tree_gatherable_anchors(region, decorations, anchors) - var palm_clusters: Dictionary[int, Array] = {} - var tree_scales: Array[float] = [] - var tree_yaws: Dictionary[float, bool] = {} - var ocean_edges_by_coordinate: Dictionary[Vector2i, int] = {} - for record: Dictionary in generator.placement_records(): - var record_edges := int(record.get("ocean_facing_edges", 0)) - if record_edges != 0: - ocean_edges_by_coordinate[ - record.get("coordinate", Vector2i.ZERO) - ] = record_edges - for child: Node in decorations.get_children(): - var prop_id := StringName(child.get_meta(&"terrain_prop_id", &"")) - 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", &"") - ) - var biome := region.get_biome_catalog().definition_for_id(biome_id) - assert(biome != null) - var biome_rule := biome.prop_rule_for_group( - definition.procedural_group - ) - assert(biome_rule != null and biome_rule.allows_prop(definition)) - var coordinate: Vector2i = child.get_meta( - &"terrain_chunk_coordinate", - Vector2i.ZERO, - ) - var spawn_coordinate := Vector2i( - generator.grid_size.x / 2, - generator.grid_size.y / 2, - ) - var spawn_distance := ( - absi(coordinate.x - spawn_coordinate.x) - + absi(coordinate.y - spawn_coordinate.y) - ) - assert(spawn_distance >= definition.minimum_spawn_chunk_distance) - _validate_decoration_transform( - region, - child as Node3D, - definition, - grass_prop_surface_triangles, - sand_prop_surface_triangles, - ) - if prop_id == &"prop_palm": - var cluster_id := int( - child.get_meta(&"terrain_prop_cluster_id", -1) - ) - var members: Array = palm_clusters.get(cluster_id, []) - members.append(child) - palm_clusters[cluster_id] = members - var ocean_direction := _ocean_direction( - ocean_edges_by_coordinate.get(coordinate, 0) - ) - if ocean_direction.is_zero_approx(): - ocean_direction = _nearest_ocean_direction( - region, - generator, - (child as Node3D).position, - ) - var local_overhang := Vector3( - definition.local_overhang_direction.x, - 0.0, - definition.local_overhang_direction.y, - ).normalized() - var actual_overhang := local_overhang.rotated( - Vector3.UP, - (child as Node3D).rotation.y, - ) - assert( - actual_overhang.dot(ocean_direction) - >= cos(deg_to_rad(definition.ocean_facing_spread_degrees)) - - 0.001 - ) - elif prop_id in [ - &"prop_tree_1", - &"prop_tree_2", - &"prop_tree_3", - &"prop_tree_large", - &"prop_pine", - &"prop_pine_large", - ]: - tree_scales.append( - float(child.get_meta(&"terrain_prop_visual_scale", 1.0)) - ) - tree_yaws[snappedf((child as Node3D).rotation.y, 0.01)] = true - if prop_id in [ - &"prop_tree_1", - &"prop_tree_2", - &"prop_tree_3", - &"prop_tree_large", - ]: - assert( - _has_material_variant_override( - child.get_node_or_null("Visual"), - definition.material_variants, - ) - ) - assert( - _has_material_variant_override( - child.get_node_or_null("Visual"), - definition.secondary_material_variants, - ) - ) - assert(not palm_clusters.is_empty()) - for members: Array in palm_clusters.values(): - assert(members.size() >= 1 and members.size() <= 3) - for first_index: int in members.size(): - for second_index: int in range(first_index + 1, members.size()): - var first := members[first_index] as Node3D - var second := members[second_index] as Node3D - var separation := Vector2( - first.position.x - second.position.x, - first.position.z - second.position.z, - ).length() - assert(separation > 0.5 and separation < 6.1) - assert(tree_scales.max() - tree_scales.min() > 0.25) - assert(tree_yaws.size() >= 8) - assert(_decoration_group_count(region, &"grass_tree") > 0) - assert(_decoration_group_count(region, &"sand_tree") > 0) - assert( - _decoration_biome_group_count( - region, - &"biome_forest", - &"grass_tree", - ) >= 4 - ) - assert( - _decoration_biome_group_count( - region, - &"biome_pine_forest", - &"grass_tree", - ) >= 4 - ) - - -func _validate_elevated_cliff_feature( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, -) -> void: - var elevated_coordinates: Dictionary[Vector2i, StringName] = {} - var top_coordinates: Array[Vector2i] = [] - var ramp_records: Array[Dictionary] = [] - var coastal_ids: Array[StringName] = [ - &"chunk_0014", - &"chunk_0015", - &"chunk_9999", - &"chunk_9998", - &"chunk_9997", - &"chunk_9996", - ] - var has_coastal_feature := false - for record: Dictionary in generator.placement_records(): - var stable_id: StringName = record.get("stable_id", &"") - if stable_id not in [ - &"chunk_0009", - &"chunk_0010", - &"chunk_0011", - &"chunk_0012", - &"chunk_0026", - &"chunk_0027", - &"chunk_0028", - &"chunk_0029", - &"chunk_0030", - &"chunk_0014", - &"chunk_0015", - &"chunk_9999", - &"chunk_9998", - &"chunk_9997", - &"chunk_9996", - ]: - continue - var coordinate: Vector2i = record.get("coordinate", Vector2i.ZERO) - if stable_id in coastal_ids: - has_coastal_feature = true - assert( - coordinate.x in [0, generator.grid_size.x - 1] - or coordinate.y in [0, generator.grid_size.y - 1] - ) - else: - assert(coordinate.x > 0 and coordinate.x < generator.grid_size.x - 1) - assert(coordinate.y > 0 and coordinate.y < generator.grid_size.y - 1) - elevated_coordinates[coordinate] = stable_id - if stable_id in [&"chunk_0009", &"chunk_0028"]: - top_coordinates.append(coordinate) - elif stable_id == &"chunk_0012": - ramp_records.append(record) - assert(elevated_coordinates.size() == (34 if has_coastal_feature else 25)) - var feature_center := generator._elevated_feature_center - assert(feature_center != Vector2i(-1, -1)) - var center_index := feature_center.y * generator.grid_size.x + feature_center.x - assert(center_index >= 0 and center_index < generator.placement_keys().size()) - var primary_top_id := StringName( - generator.placement_keys()[center_index].get_slice("@", 0) - ) - assert(primary_top_id in [&"chunk_0009", &"chunk_0028"]) - var primary_is_third_tier := primary_top_id == &"chunk_0028" - assert( - top_coordinates.size() - == (9 + (1 if has_coastal_feature else 0)) - ) - assert( - ramp_records.size() - == ( - (0 if primary_is_third_tier else 1) - + (1 if has_coastal_feature else 0) - ) - ) - var detected_feature_center := Vector2i(-1, -1) - for candidate: Vector2i in top_coordinates: - var neighboring_top_count := 0 - for row_offset: int in range(-1, 2): - for column_offset: int in range(-1, 2): - neighboring_top_count += int( - elevated_coordinates.get( - candidate + Vector2i(column_offset, row_offset), - &"", - ) == primary_top_id - ) - if neighboring_top_count == 9: - detected_feature_center = candidate - break - assert(detected_feature_center == feature_center) - for row_offset: int in range(-2, 3): - for column_offset: int in range(-2, 3): - assert( - elevated_coordinates.has( - feature_center + Vector2i(column_offset, row_offset) - ) - ) - if has_coastal_feature: - var secondary_top := generator._secondary_elevated_feature_center - assert(secondary_top != Vector2i(-1, -1)) - for row_offset: int in range(-1, 2): - for column_offset: int in range(-1, 2): - assert( - elevated_coordinates.has( - secondary_top + Vector2i(column_offset, row_offset) - ) - ) - var found_primary_ramp := false - for ramp_record: Dictionary in ramp_records: - var ramp_coordinate: Vector2i = ramp_record.get( - "coordinate", Vector2i(-1, -1) - ) - var ramp_turns := int(ramp_record.get("rotation_quarters", 0)) - var high_edge := TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.WEST, - ramp_turns, - ) - var high_offset := TerrainChunkTopology.grid_offset(high_edge) - assert( - elevated_coordinates.get(ramp_coordinate + high_offset, &"") - == &"chunk_0009" - ) - found_primary_ramp = ( - found_primary_ramp - or elevated_coordinates.get( - ramp_coordinate + high_offset * 2, - &"", - ) == &"chunk_0009" - ) - var low_coordinate := ramp_coordinate - high_offset - var low_index := ( - low_coordinate.y * generator.grid_size.x + low_coordinate.x - ) - assert( - generator.placement_keys()[low_index].begins_with("chunk_0000@") - 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) - var layered_count := 0 - for chunk_root: Node in generated.get_children(): - var stable_id := StringName( - chunk_root.get_meta(&"terrain_chunk_id", &"") - ) - if stable_id not in [ - &"chunk_0009", - &"chunk_0010", - &"chunk_0011", - &"chunk_0012", - &"chunk_0026", - &"chunk_0027", - &"chunk_0028", - &"chunk_0029", - &"chunk_0030", - &"chunk_0014", - &"chunk_0015", - &"chunk_9999", - &"chunk_9998", - &"chunk_9997", - &"chunk_9996", - ]: - continue - if stable_id in [&"chunk_0014", &"chunk_0015"]: - assert(chunk_root.get_node_or_null("TerrainBaseLayer") == null) - continue - if stable_id in [&"chunk_0029", &"chunk_0030"]: - assert(chunk_root.get_node_or_null("TerrainBaseLayer") == null) - var source_mesh := TerrainChunkAnalyzer.find_primary_mesh( - chunk_root, - stable_id, - ) - assert(source_mesh != null and source_mesh.mesh != null) - continue - layered_count += 1 - var base_layer := chunk_root.get_node_or_null("TerrainBaseLayer") - var overlay := chunk_root.get_node_or_null("TerrainOverlay") - assert(base_layer != null and overlay != null) - var transition_base_mesh := &"chunk_0000" - if stable_id in [&"chunk_9999", &"chunk_9998"]: - transition_base_mesh = &"chunk_0007" - elif stable_id in [&"chunk_9997", &"chunk_9996"]: - transition_base_mesh = &"chunk_0008" - var base_mesh := TerrainChunkAnalyzer.find_primary_mesh( - base_layer, - transition_base_mesh, - ) - var overlay_mesh := TerrainChunkAnalyzer.find_primary_mesh( - overlay, - ( - &"chunk_0010" - if stable_id in [ - &"chunk_9999", - &"chunk_9998", - &"chunk_9997", - &"chunk_9996", - ] - else stable_id - ), - ) - assert(base_mesh != null and base_mesh.mesh != null) - assert(overlay_mesh != null and overlay_mesh.mesh != null) - 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]) - if stacked_keys.is_empty(): - return - for key: String in stacked_keys: - assert( - key.begins_with("chunk_0010@") - or key.begins_with("chunk_0027@") - ) - var stacked_count := 0 - for chunk_root: Node in generated.get_children(): - for child: Node in chunk_root.get_children(): - if not bool(child.get_meta(&"terrain_stacked_elevation", false)): - continue - stacked_count += 1 - var stacked_id := StringName( - child.get_meta(&"terrain_chunk_id", &"") - ) - assert(stacked_id in [&"chunk_0010", &"chunk_0027"]) - var expected_height := ( - generator.elevated_cliff_level_height * 2.0 - if primary_is_third_tier - else generator.elevated_cliff_level_height - ) - assert( - is_equal_approx( - (child as Node3D).position.y, - expected_height, - ) - ) - var stacked_mesh := TerrainChunkAnalyzer.find_primary_mesh( - child, - stacked_id, - ) - assert(stacked_mesh != null and stacked_mesh.mesh != null) - assert(stacked_count == 4) - - -func _validate_ocean_facing_record( - record: Dictionary, - grid_size: Vector2i, -) -> void: - var coordinate: Vector2i = record.get("coordinate", Vector2i.ZERO) - var ocean_edges := int(record.get("ocean_facing_edges", 0)) - assert(ocean_edges != 0) - for edge_value: int in TerrainChunkTopology.Edge.values(): - if (ocean_edges & (1 << edge_value)) == 0: - continue - var ocean_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - assert( - ocean_coordinate.x < 0 - or ocean_coordinate.y < 0 - or ocean_coordinate.x >= grid_size.x - or ocean_coordinate.y >= grid_size.y - ) - - -func _validate_complete_coastline(generator: TerrainChunkGenerator) -> void: - for record: Dictionary in generator.placement_records(): - var coordinate: Vector2i = record.get("coordinate", Vector2i.ZERO) - var ocean_edges := int(record.get("ocean_facing_edges", 0)) - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - var outside := ( - neighbor.x < 0 - or neighbor.y < 0 - or neighbor.x >= generator.grid_size.x - or neighbor.y >= generator.grid_size.y - ) - assert( - ((ocean_edges & (1 << edge_value)) != 0) == outside - ) - - -func _ocean_direction(ocean_edges: int) -> Vector3: - var result := Vector3.ZERO - for edge_value: int in TerrainChunkTopology.Edge.values(): - if (ocean_edges & (1 << edge_value)) != 0: - result += TerrainChunkTopology.edge_normal( - edge_value as TerrainChunkTopology.Edge - ) - return result.normalized() - - -func _nearest_ocean_direction( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, - position: Vector3, -) -> Vector3: - var half_extents := region.get_playable_half_extents() - var distance_x := half_extents.x - absf(position.x) - var distance_z := half_extents.y - absf(position.z) - var direction_x := Vector3.RIGHT if position.x >= 0.0 else Vector3.LEFT - var direction_z := Vector3.BACK if position.z >= 0.0 else Vector3.FORWARD - if absf(distance_x - distance_z) <= generator.catalog.chunk_size * 0.35: - return (direction_x + direction_z).normalized() - return direction_x if distance_x < distance_z else direction_z - - -func _validate_prop_catalog(region: GeneratedWorldRegion) -> void: - var catalog := region.get_prop_catalog() - assert(catalog != null) - assert(catalog.validation_errors().is_empty()) - assert(catalog.definitions.size() == EXPECTED_PROP_IDS.size()) - for stable_id: StringName in EXPECTED_PROP_IDS: - var definition := catalog.definition_for_id(stable_id) - assert(definition != null and definition.packed_scene != null) - var instance := definition.packed_scene.instantiate() as Node3D - assert(instance != null) - 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) - for tree_id: StringName in [ - &"prop_tree_1", - &"prop_tree_2", - &"prop_tree_3", - &"prop_tree_large", - ]: - var tree := catalog.definition_for_id(tree_id) - assert(tree != null) - assert(tree.minimum_visual_scale < tree.maximum_visual_scale) - assert(tree.material_variants.size() >= 3) - assert(not tree.variant_material_slot_names.is_empty()) - assert(tree.secondary_material_variants.size() >= 3) - assert(not tree.secondary_variant_material_slot_names.is_empty()) - var pine := catalog.definition_for_id(&"prop_pine") - 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)) - assert(is_equal_approx(palm.maximum_visual_scale, 1.0)) - assert(palm.minimum_cluster_size == 2) - assert(palm.maximum_cluster_size == 3) - assert(palm.minimum_cluster_radius > palm.clearance_radius) - 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") - var small_tree_weight := ( - catalog.definition_for_id(&"prop_tree_1").selection_weight - + catalog.definition_for_id(&"prop_tree_2").selection_weight - + catalog.definition_for_id(&"prop_tree_3").selection_weight - ) - assert(forest_rule.allows_prop(large_tree)) - assert(large_tree.selection_weight <= small_tree_weight) - var pine_forest := region.get_biome_catalog().definition_for_id( - &"biome_pine_forest" - ) - var pine_rule := pine_forest.prop_rule_for_group(&"grass_tree") - assert(pine_rule.allows_prop(large_pine)) - assert( - is_equal_approx(large_pine.selection_weight, pine.selection_weight) - ) - assert(forest_rule.minimum_placements == 4) - assert(forest_rule.placement_attempts_per_chunk == 4) - assert(pine_rule.minimum_placements == 4) - assert(pine_rule.placement_attempts_per_chunk == 4) - - -func _validate_biome_catalog( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, -) -> void: - var catalog := region.get_biome_catalog() - assert(catalog != null) - assert(catalog.validation_errors().is_empty()) - assert(catalog.definitions.size() == EXPECTED_BIOME_IDS.size()) - var counts: Dictionary[StringName, int] = {} - for record: Dictionary in generator.placement_records(): - var coordinate: Vector2i = record.get("coordinate", Vector2i.ZERO) - var biome_id := region.get_biome_at(coordinate) - var tags: PackedStringArray = record.get("tags", PackedStringArray()) - if "mixed_surface" in tags: - assert(biome_id == &"") - elif "grass" in tags or "sand" in tags: - assert(biome_id != &"") - var biome := catalog.definition_for_id(biome_id) - assert(biome != null and biome.supports_chunk_tags(tags)) - counts[biome_id] = counts.get(biome_id, 0) + 1 - else: - assert(biome_id == &"") - for biome_id: StringName in EXPECTED_BIOME_IDS: - assert(counts.get(biome_id, 0) > 0) - var center := Vector2i( - generator.grid_size.x / 2, - generator.grid_size.y / 2, - ) - assert(region.get_biome_at(center) == &"biome_plains") - for child: Node in generator.get_generated_chunks_root().get_children(): - var coordinate: Vector2i = child.get_meta( - &"terrain_chunk_coordinate", - Vector2i.ZERO, - ) - assert( - StringName(child.get_meta(&"terrain_biome_id", &"")) - == region.get_biome_at(coordinate) - ) - - -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)) - var visual_root := prop.get_node_or_null("Visual") as Node3D - var visual := _find_mesh_instance(visual_root) - var collision := prop.get_node_or_null( - "TrunkCollision/CollisionShape" - ) as CollisionShape3D - assert(visual_root != null) - assert(visual_root.position.is_equal_approx(definition.visual_offset)) - var visual_scale := float( - prop.get_meta(&"terrain_prop_visual_scale", 1.0) - ) - assert(visual_scale >= definition.minimum_visual_scale - 0.001) - assert(visual_scale <= definition.maximum_visual_scale + 0.001) - assert( - visual_root.scale.is_equal_approx(Vector3.ONE * visual_scale) - ) - assert(visual != null and visual.mesh != null) - if definition.has_collision(): - assert(collision != null) - assert( - collision.shape is CylinderShape3D - 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( - # 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, - ) - var excluded_colliders: Array[RID] = [] - var decorations := region.get_node("Decorations") as Node3D - for decoration: Node in decorations.get_children(): - var prop_body := decoration.get_node_or_null( - "TrunkCollision", - ) as CollisionObject3D - if prop_body != null: - excluded_colliders.append(prop_body.get_rid()) - query.exclude = excluded_colliders - var hit := region.get_world_3d().direct_space_state.intersect_ray(query) - # Stacked cliff walls can overhang a neighboring cell. Match the placement - # sampler by ignoring steep faces until the ray reaches walkable terrain. - while ( - not hit.is_empty() - and absf((hit.get("normal", Vector3.ZERO) as Vector3).dot(Vector3.UP)) - < 0.35 - ): - var steep_collider := hit.get("collider") as CollisionObject3D - assert(steep_collider != null) - excluded_colliders.append(steep_collider.get_rid()) - query.exclude = excluded_colliders - hit = region.get_world_3d().direct_space_state.intersect_ray(query) - assert( - not hit.is_empty(), - "No terrain collision below %s (%s) at %s." - % [prop.name, definition.stable_id, prop.global_position], - ) - var ground_position: Vector3 = hit["position"] - assert( - absf(ground_position.y - prop.global_position.y) <= 0.01, - "Terrain height %s does not match %s (%s) at %s." - % [ - ground_position.y, - prop.name, - definition.stable_id, - "%s in chunk %s; hit %s" % [ - prop.global_position, - prop.get_meta(&"terrain_chunk_coordinate", Vector2i(-1, -1)), - (hit.get("collider") as Node).get_path(), - ], - ], - ) - 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( - region: GeneratedWorldRegion, - decorations: Node3D, - anchors: GatherableAnchorSet3D, -) -> void: - 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) - 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() == 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) - 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: - if root_node is MeshInstance3D: - return root_node as MeshInstance3D - if root_node == null: - return null - for child: Node in root_node.get_children(): - var mesh_instance := _find_mesh_instance(child) - if mesh_instance != null: - return mesh_instance - 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], -) -> bool: - if root_node == null: - return false - var mesh_instance := root_node as MeshInstance3D - if mesh_instance != null and mesh_instance.mesh != null: - for surface_index: int in mesh_instance.mesh.get_surface_count(): - var override := mesh_instance.get_surface_override_material( - surface_index - ) - if override != null and override in variants: - return true - for child: Node in root_node.get_children(): - if _has_material_variant_override(child, variants): - return true - return false - - -func _validate_authored_chunk_surfaces( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, -) -> void: - var generated := generator.get_generated_chunks_root() - var found_beach := false - var found_stream := false - var found_pond := false - var found_grass_ocean_edge := false - var found_grass_beach_transition := false - var found_grass_ocean_corner := false - var found_beach_ocean_corner := false - var found_grass_sand_diagonal := false - var beach_family := ( - _placement_count(generator.placement_keys(), "chunk_0002") > 0 - ) - for chunk_root: Node in generated.get_children(): - if chunk_root.name.begins_with("chunk_0002r"): - var beach := chunk_root.find_child( - "chunk_0002", true, false - ) as MeshInstance3D - assert(beach != null and beach.mesh != null) - var material := beach.get_active_material(0) - assert(material != null and material.resource_name == "sand") - found_beach = true - elif ( - chunk_root.name.begins_with("chunk_0003r") - or chunk_root.name.begins_with("chunk_0016r") - ): - var stream_id := ( - &"chunk_0016" - if chunk_root.name.begins_with("chunk_0016r") - else &"chunk_0003" - ) - var stream := chunk_root.find_child( - String(stream_id), true, false - ) as MeshInstance3D - assert(stream != null and stream.mesh != null) - var stream_materials := _material_names(stream) - assert("dirt" in stream_materials) - assert("grass_lite" in stream_materials) - assert("dirt_wall" in stream_materials) - if stream_id == &"chunk_0003": - found_stream = true - elif chunk_root.name.begins_with("chunk_0004r"): - var pond := chunk_root.find_child( - "chunk_0004", true, false - ) as MeshInstance3D - assert(pond != null and pond.mesh != null) - for surface_index: int in pond.mesh.get_surface_count(): - var arrays := pond.mesh.surface_get_arrays(surface_index) - var normals := arrays[Mesh.ARRAY_NORMAL] as PackedVector3Array - for normal: Vector3 in normals: - assert(normal.y >= -0.001) - _validate_pond_collision(region, pond) - found_pond = true - elif chunk_root.name.begins_with("chunk_0005r"): - var grass_ocean_edge := chunk_root.find_child( - "chunk_0005", true, false - ) as MeshInstance3D - assert(grass_ocean_edge != null and grass_ocean_edge.mesh != null) - var edge_materials := _material_names(grass_ocean_edge) - assert("grass_lite" in edge_materials) - assert("cliff_wall" in edge_materials) - found_grass_ocean_edge = true - elif chunk_root.name.begins_with("chunk_0006r"): - var grass_beach_transition := chunk_root.find_child( - "chunk_0006", true, false - ) as MeshInstance3D - assert( - grass_beach_transition != null - and grass_beach_transition.mesh != null - ) - var transition_materials := _material_names( - grass_beach_transition - ) - assert("sand" in transition_materials) - assert("grass_lite" in transition_materials) - assert("cliff_wall" in transition_materials) - found_grass_beach_transition = true - elif chunk_root.name.begins_with("chunk_0007r"): - var grass_ocean_corner := chunk_root.find_child( - "chunk_0007", true, false - ) as MeshInstance3D - assert(grass_ocean_corner != null and grass_ocean_corner.mesh != null) - var corner_materials := _material_names(grass_ocean_corner) - assert("grass_lite" in corner_materials) - assert("cliff_wall" in corner_materials) - found_grass_ocean_corner = true - elif chunk_root.name.begins_with("chunk_0008r"): - var beach_ocean_corner := chunk_root.find_child( - "chunk_0008", true, false - ) as MeshInstance3D - assert(beach_ocean_corner != null and beach_ocean_corner.mesh != null) - var beach_corner_materials := _material_names(beach_ocean_corner) - assert("sand" in beach_corner_materials) - found_beach_ocean_corner = true - elif chunk_root.name.begins_with("chunk_0013r"): - var grass_sand_diagonal := chunk_root.find_child( - "chunk_0013", true, false - ) as MeshInstance3D - assert(grass_sand_diagonal != null and grass_sand_diagonal.mesh != null) - var diagonal_materials := _material_names(grass_sand_diagonal) - assert("grass_lite" in diagonal_materials) - assert("sand" in diagonal_materials) - found_grass_sand_diagonal = true - assert(found_stream) - assert(found_pond) - assert(found_grass_sand_diagonal) - if beach_family: - assert(found_beach) - assert(found_beach_ocean_corner) - assert(not found_grass_ocean_edge) - assert(not found_grass_ocean_corner) - else: - assert(not found_beach) - assert(not found_beach_ocean_corner) - assert(found_grass_ocean_edge) - assert(found_grass_ocean_corner) - assert(not found_grass_beach_transition) - - -func _material_names(mesh_instance: MeshInstance3D) -> PackedStringArray: - var result := PackedStringArray() - for surface_index: int in mesh_instance.mesh.get_surface_count(): - var material := mesh_instance.get_active_material(surface_index) - if material != null: - result.append(material.resource_name) - 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, -) -> void: - var best_centroid := Vector3.ZERO - var best_height := -INF - for surface_index: int in pond.mesh.get_surface_count(): - var arrays := pond.mesh.surface_get_arrays(surface_index) - var vertices := arrays[Mesh.ARRAY_VERTEX] as PackedVector3Array - var normals := arrays[Mesh.ARRAY_NORMAL] as PackedVector3Array - var indices := arrays[Mesh.ARRAY_INDEX] as PackedInt32Array - var triangle_count := ( - indices.size() / 3 if not indices.is_empty() else vertices.size() / 3 - ) - for triangle_index: int in triangle_count: - var offset := triangle_index * 3 - var index_a: int = indices[offset] if not indices.is_empty() else offset - var index_b: int = ( - indices[offset + 1] if not indices.is_empty() else offset + 1 - ) - var index_c: int = ( - indices[offset + 2] if not indices.is_empty() else offset + 2 - ) - var a: Vector3 = vertices[index_a] - var b: Vector3 = vertices[index_b] - var c: Vector3 = vertices[index_c] - var normal := ( - (normals[index_a] + normals[index_b] + normals[index_c]) / 3.0 - ).normalized() - var centroid := (a + b + c) / 3.0 - if normal.y > 0.5 and centroid.y > best_height: - best_height = centroid.y - best_centroid = centroid - assert(best_height > -INF) - var target := pond.global_transform * best_centroid - var query := PhysicsRayQueryParameters3D.create( - target + Vector3.UP * 2.0, - target + Vector3.DOWN * 2.0, - 1, - ) - 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.has_meta(&"terrain_collision_batch") - ) - - -func _decoration_group_count( - region: GeneratedWorldRegion, - group: StringName, -) -> int: - var count := 0 - var decorations := region.get_node("Decorations") as Node3D - for child: Node in decorations.get_children(): - var stable_id := StringName(child.get_meta(&"terrain_prop_id", &"")) - var definition := region.get_prop_catalog().definition_for_id(stable_id) - if definition != null and definition.procedural_group == group: - count += 1 - return count - - -func _decoration_biome_group_count( - region: GeneratedWorldRegion, - biome_id: StringName, - group: StringName, -) -> int: - var count := 0 - var decorations := region.get_node("Decorations") as Node3D - for child: Node in decorations.get_children(): - if StringName(child.get_meta(&"terrain_biome_id", &"")) != biome_id: - continue - var prop_id := StringName(child.get_meta(&"terrain_prop_id", &"")) - var definition := region.get_prop_catalog().definition_for_id(prop_id) - if definition != null and definition.procedural_group == group: - count += 1 - return count - - -func _biome_signature( - region: GeneratedWorldRegion, - generator: TerrainChunkGenerator, -) -> PackedStringArray: - var result := PackedStringArray() - for row: int in generator.grid_size.y: - for column: int in generator.grid_size.x: - result.append( - String(region.get_biome_at(Vector2i(column, row))) - ) - return result - - -func _placement_count(keys: PackedStringArray, stable_id: String) -> int: - var count := 0 - for key: String in keys: - if key.begins_with(stable_id + "@"): - count += 1 - return count - - -func _decoration_signature(region: GeneratedWorldRegion) -> PackedStringArray: - var result := PackedStringArray() - var decorations := region.get_node("Decorations") as Node3D - for child: Node in decorations.get_children(): - var prop := child as Node3D - result.append("%s:%s:%s" % [ - prop.name, - prop.position, - prop.rotation, - ]) - return result diff --git a/tests/generated_world_runtime_validation.gd.uid b/tests/generated_world_runtime_validation.gd.uid deleted file mode 100644 index 060cb22..0000000 --- a/tests/generated_world_runtime_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://opamwsr0t7px diff --git a/tests/home_spawn_multiplayer_validation.gd b/tests/home_spawn_multiplayer_validation.gd deleted file mode 100644 index 2855eb2..0000000 --- a/tests/home_spawn_multiplayer_validation.gd +++ /dev/null @@ -1,201 +0,0 @@ -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 deleted file mode 100644 index 06150f2..0000000 --- a/tests/home_spawn_multiplayer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bndtkip5p6xma diff --git a/tests/inventory_notepad_art_validation.gd b/tests/inventory_notepad_art_validation.gd index d871b49..c42883c 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("straywild_NOTEPAD_CAPTURE"): + if not OS.has_environment("NETFISHING_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("straywild_NOTEPAD_CAPTURE"), + OS.get_environment("NETFISHING_NOTEPAD_CAPTURE"), suffix, ] assert(image.save_png(path) == OK) diff --git a/tests/inventory_storage_persistence_validation.gd b/tests/inventory_storage_persistence_validation.gd index 794f438..3af05fe 100644 --- a/tests/inventory_storage_persistence_validation.gd +++ b/tests/inventory_storage_persistence_validation.gd @@ -1,9 +1,6 @@ extends SceneTree const MainScene: PackedScene = preload("res://main/main.tscn") -const ItemCatalogResource: ItemCatalog = preload( - "res://items/catalog/item_catalog.tres" -) func _initialize() -> void: @@ -25,44 +22,31 @@ func _run() -> void: var save_manager := main.get("_save_manager") as PlayerSaveManager var player := main.get("_player") as Player assert(save_manager != null and player != null) - const TEST_WORLD_SEED := 918273 - assert(save_manager.initialize_new_game( - TEST_WORLD_SEED, - WorldLayout.STARTER_ISLAND, - )) + assert(save_manager.initialize_new_game()) save_manager.set_autosave_enabled(true) assert(player.bag.add_item(&"art_kit")) assert(player.bag.add_item(&"coffee")) - assert(player.bag.add_item(&"worms")) - assert(player.bag.add_item(&"the_standby")) - assert(player.equip_bait(ItemCatalogResource.get_item_by_id(&"worms"))) - assert(player.equip_lure(ItemCatalogResource.get_item_by_id(&"the_standby"))) assert(player.bag.move_item_to_storage_slot(&"basic_fishing_rod", 14)) assert(player.bag.move_item_to_storage_slot(&"coffee", 12)) assert(save_manager.save_now()) - var decoded: Dictionary = ProgressionSaveCodec.read_local_save( - str(save_manager.get("_save_path")) + var save_file := FileAccess.open( + str(save_manager.get("_save_path")), + FileAccess.READ, ) - assert(bool(decoded.get("ok", false))) - var parsed: Dictionary = decoded["data"] - var records: Array = parsed["bag"]["items"] - assert(str(parsed["world"]["layout"]) == String(WorldLayout.STARTER_ISLAND)) - assert(int(parsed["world"]["seed"]) == TEST_WORLD_SEED) + assert(save_file != null) + var parsed: Variant = JSON.parse_string(save_file.get_as_text()) + save_file.close() + assert(typeof(parsed) == TYPE_DICTIONARY) + var records: Array = (parsed as Dictionary)["bag"]["items"] assert(_saved_slot(records, &"basic_fishing_rod") == 14) assert(_saved_slot(records, &"coffee") == 12) assert(player.bag.move_item_to_storage_slot(&"basic_fishing_rod", 0)) assert(player.bag.move_item_to_storage_slot(&"coffee", 0)) - player.unequip_bait() - player.unequip_lure() assert(save_manager.load_player_data()) - assert(save_manager.get_world_layout() == WorldLayout.STARTER_ISLAND) - assert(save_manager.get_world_seed() == TEST_WORLD_SEED) assert(player.bag.get_storage_slot(&"basic_fishing_rod") == 14) assert(player.bag.get_storage_slot(&"coffee") == 12) - assert(player.active_bait_id == &"worms") - assert(player.active_lure_id == &"the_standby") main.queue_free() for _frame: int in 4: diff --git a/tests/job_multiplayer_validation.gd b/tests/job_multiplayer_validation.gd index 6c0fa5b..c31d392 100644 --- a/tests/job_multiplayer_validation.gd +++ b/tests/job_multiplayer_validation.gd @@ -24,10 +24,6 @@ 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 65b7164..81d97e2 100644 --- a/tests/job_system_validation.gd +++ b/tests/job_system_validation.gd @@ -21,17 +21,13 @@ 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(1, WorldLayout.STARTER_ISLAND)) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -53,7 +49,6 @@ func _run() -> void: _validate_weather_guarantees(board) _validate_late_board_weather_fallback() _validate_remote_tamper_rejection(jobs, board) - _validate_creature_jobs(jobs) var sell_job: Dictionary = _find_job( jobs.get_daily_jobs(), JobCatalog.Kind.SELL_TOTAL @@ -90,10 +85,6 @@ func _run() -> void: (player_menu.get_node("%NavigationCluster") as Control).get_child_count() == 7 ) - 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,16 +195,16 @@ func _run() -> void: assert(session.set_host_open(false)) assert(save_manager.save_now()) - var decoded: Dictionary = ProgressionSaveCodec.read_local_save( - str(save_manager.get("_save_path")) + var save_file := FileAccess.open( + str(save_manager.get("_save_path")), FileAccess.READ ) - assert(bool(decoded.get("ok", false))) - var save_data: Dictionary = decoded["data"] - assert(int(save_data.get("save_version", -1)) == 11) + assert(save_file != null) + var parsed: Variant = JSON.parse_string(save_file.get_as_text()) + save_file.close() + assert(typeof(parsed) == TYPE_DICTIONARY) + var save_data: Dictionary = parsed + assert(int(save_data.get("save_version", -1)) == 8) 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() @@ -272,170 +263,6 @@ func _validate_unavailable_fishnet_layout() -> void: await process_frame -func _validate_fishnet_bounds(page: TheNetPage) -> void: - var laptop := page.get_node("UtilityMainBox") as PanelContainer - var forecast_column := page.find_child( - "ForecastColumn", true, false - ) as VBoxContainer - var refresh_label := page.find_child( - "DailyRefreshLabel", true, false - ) as Label - var jobs_scroll := page.find_child("JobsScroll", true, false) as ScrollContainer - assert(laptop != null) - assert(forecast_column != null and refresh_label != null) - assert(jobs_scroll != null) - var laptop_rect: Rect2 = laptop.get_global_rect() - assert(forecast_column.get_global_rect().end.x <= laptop_rect.end.x) - assert(refresh_label.get_global_rect().end.x <= laptop_rect.end.x) - assert(refresh_label.get_global_rect().end.y <= laptop_rect.end.y) - assert(jobs_scroll.horizontal_scroll_mode == ScrollContainer.SCROLL_MODE_DISABLED) - var list := page.get("_list") as VBoxContainer - assert(list != null) - for row: Control in list.get_children(): - 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 - var shellfish_count: int = 0 - var candidates: Array[FishData] = [] - for fish: FishData in Catalog.candidates: - if fish == null or not fish.is_selectable(): - continue - candidates.append(fish) - match fish.get_creature_group(): - FishData.CreatureGroup.FISH: - fish_count += 1 - FishData.CreatureGroup.INSECT: - insect_count += 1 - FishData.CreatureGroup.SHELLFISH: - shellfish_count += 1 - assert(fish_count > 0 and insect_count > 0 and shellfish_count > 0) - - var lifetime: Array[Dictionary] = jobs.get_lifetime_jobs() - var fish_discovery: Dictionary = _find_job( - lifetime, JobCatalog.Kind.DISCOVER_SPECIES - ) - assert(int(fish_discovery.get("target", -1)) == fish_count) - for creature_group: int in [ - FishData.CreatureGroup.INSECT, - FishData.CreatureGroup.SHELLFISH, - ]: - assert(not _find_creature_job( - lifetime, - JobCatalog.Kind.CATCH_CREATURE_GROUP, - creature_group, - ).is_empty()) - assert(not _find_creature_job( - lifetime, - JobCatalog.Kind.DISCOVER_CREATURE_GROUP, - creature_group, - ).is_empty()) - assert(not _find_creature_job( - lifetime, - JobCatalog.Kind.MASTER_CREATURE_GROUP, - creature_group, - ).is_empty()) - - var daily_groups: Dictionary[int, bool] = {} - for seed_index: int in 64: - for job: Dictionary in JobCatalog.generate_daily_jobs( - "creature-job-validation-%d" % seed_index, - candidates, - true, - ): - if int(job.get("kind", -1)) == JobCatalog.Kind.CATCH_CREATURE_GROUP: - daily_groups[int(job.get("creature_group", -1))] = true - assert(daily_groups.has(FishData.CreatureGroup.INSECT)) - assert(daily_groups.has(FishData.CreatureGroup.SHELLFISH)) - - var beetle: FishData = Catalog.get_fish_by_id(&"beetle_stag_common") - assert(beetle != null) - var beetle_catch := _make_test_catch(beetle, &"job-beetle") - jobs.call("_on_authoritative_catch", beetle_catch) - var statistics: Dictionary = jobs.to_save_data().get("statistics", {}) - assert(int(statistics.get("fish_caught", -1)) == 0) - assert(int(statistics.get("insects_caught", -1)) == 1) - - -func _find_creature_job( - jobs: Array[Dictionary], - kind: JobCatalog.Kind, - creature_group: int, -) -> Dictionary: - for job: Dictionary in jobs: - if ( - int(job.get("kind", -1)) == kind - and int(job.get("creature_group", -1)) == creature_group - ): - return job - return {} - - -func _make_test_catch(fish: FishData, catch_id: StringName) -> FishCatch: - var fish_catch := FishCatch.new() - fish_catch.fish = fish - fish_catch.fish_id = fish.id - fish_catch.catch_id = catch_id - fish_catch.catch_sequence = 1 - 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 = FishQuality.Tier.BORING - fish_catch.sale_value = fish.get_sale_value_for_weight(fish_catch.weight_lb) - assert(fish_catch.is_valid()) - return fish_catch - - func _validate_weather_guarantees(board: Dictionary) -> void: var jobs: Array = board.get("jobs", []) var schedule: Array = board.get("weather_schedule", []) diff --git a/tests/keyboard_mouse_mapping_validation.gd b/tests/keyboard_mouse_mapping_validation.gd index 1b95e01..cca2ac2 100644 --- a/tests/keyboard_mouse_mapping_validation.gd +++ b/tests/keyboard_mouse_mapping_validation.gd @@ -7,12 +7,6 @@ const KeyboardMouseMappingPanelType = preload( "res://ui/keyboard_mouse_mapping_panel.gd" ) const SettingsPanelScene = preload("res://ui/settings_panel.tscn") -const FishingSpotScene = preload("res://fishing/fishing_spot.tscn") -const FishingSpotType = preload("res://fishing/fishing_spot.gd") -const CatchDifficultyProfileType = preload( - "res://fishing/catch_difficulty_profile.gd" -) -const PlayerType = preload("res://player/player.gd") func _initialize() -> void: @@ -28,38 +22,11 @@ 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) ].get("kind", "")) == "mouse_button" ) - assert( - str(defaults[ - str(KeyboardMouseMappingManagerType.ROLE_ALTERNATE_REEL) - ].get("kind", "")) == "key" - ) - assert(_has_physical_key(&"reel_alternate", KEY_QUOTELEFT)) - assert(_event_count(&"reel_alternate", true) == 0) assert( str(defaults[ str(KeyboardMouseMappingManagerType.ROLE_CHAT) @@ -93,15 +60,6 @@ func _run() -> void: )) assert(_has_mouse_button(&"fish_primary", MOUSE_BUTTON_XBUTTON1)) assert(not _has_mouse_button(&"fish_primary", MOUSE_BUTTON_LEFT)) - var alternate_reel_key := InputEventKey.new() - alternate_reel_key.physical_keycode = KEY_G - alternate_reel_key.pressed = true - assert(manager.set_binding( - KeyboardMouseMappingManagerType.ROLE_ALTERNATE_REEL, - manager.binding_from_event(alternate_reel_key), - )) - assert(_has_physical_key(&"reel_alternate", KEY_G)) - assert(_event_count(&"reel_alternate", true) == 0) var joypad_event := InputEventJoypadButton.new() joypad_event.button_index = JOY_BUTTON_A @@ -140,11 +98,6 @@ 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 @@ -164,78 +117,11 @@ func _run() -> void: )) assert(_has_physical_key(&"jump", KEY_SPACE)) assert(_has_mouse_button(&"fish_primary", MOUSE_BUTTON_LEFT)) - assert(_has_physical_key(&"reel_alternate", KEY_QUOTELEFT)) - assert(_event_count(&"reel_alternate", true) == 0) assert(_has_physical_key(&"open_chat", KEY_T)) assert(_event_count(&"jump", true) == joypad_events_before) - var legacy_bindings: Dictionary = manager.get_active_bindings() - legacy_bindings.erase(str( - KeyboardMouseMappingManagerType.ROLE_ALTERNATE_REEL - )) - legacy_bindings[str(KeyboardMouseMappingManagerType.ROLE_JUMP)] = ( - manager.binding_from_event(rebind_key) - ) - var legacy_file := FileAccess.open( - KeyboardMouseMappingManagerType.MAPPING_PATH, - FileAccess.WRITE, - ) - assert(legacy_file != null) - legacy_file.store_string(JSON.stringify({ - "format_version": KeyboardMouseMappingManagerType.LEGACY_FORMAT_VERSION, - "bindings": legacy_bindings, - })) - legacy_file.close() - var migrated_manager := KeyboardMouseMappingManagerType.new() - root.add_child(migrated_manager) - await process_frame - assert(migrated_manager.has_custom_mapping()) - assert(_has_physical_key(&"jump", KEY_R)) - assert(_has_physical_key(&"reel_alternate", KEY_QUOTELEFT)) - assert(migrated_manager.reset_mapping()) - - var fishing_spot := FishingSpotScene.instantiate() as FishingSpotType - root.add_child(fishing_spot) - await process_frame - var local_player := PlayerType.new() - fishing_spot.set("_local_player", local_player) - fishing_spot.set("_gameplay_input_enabled", true) - fishing_spot.state = FishingSpotType.FishingState.FIGHTING - var catch_controller := fishing_spot.get_node("%CatchController") - var catch_profile := CatchDifficultyProfileType.new() - catch_profile.barrier_count_min = 0 - catch_profile.barrier_count_max = 0 - catch_controller.start_encounter(catch_profile, 1.0, 1) - var alternate_echo := InputEventKey.new() - alternate_echo.physical_keycode = KEY_QUOTELEFT - alternate_echo.pressed = true - alternate_echo.echo = true - assert(alternate_echo.is_action(&"reel_alternate")) - fishing_spot._unhandled_input(alternate_echo) - assert(not bool(catch_controller.get("_reel_input_held"))) - var alternate_key_press := InputEventKey.new() - alternate_key_press.physical_keycode = KEY_QUOTELEFT - alternate_key_press.pressed = true - assert(alternate_key_press.is_action(&"reel_alternate")) - fishing_spot._unhandled_input(alternate_key_press) - assert(bool(catch_controller.get("_reel_input_held"))) - catch_controller.set_reel_input(false) - var alternate_press := InputEventAction.new() - alternate_press.action = &"reel_alternate" - alternate_press.pressed = true - fishing_spot._unhandled_input(alternate_press) - assert(bool(catch_controller.get("_reel_input_held"))) - var alternate_release := InputEventAction.new() - alternate_release.action = &"reel_alternate" - alternate_release.pressed = false - fishing_spot._unhandled_input(alternate_release) - assert(not bool(catch_controller.get("_reel_input_held"))) - fishing_spot.free() - local_player.free() - settings_panel.queue_free() panel.queue_free() - migrated_manager.queue_free() manager.queue_free() print("Keyboard and mouse mapping validation: PASS") quit(0) diff --git a/tests/late_join_multiplayer_validation.gd b/tests/late_join_multiplayer_validation.gd deleted file mode 100644 index 6ea544f..0000000 --- a/tests/late_join_multiplayer_validation.gd +++ /dev/null @@ -1,369 +0,0 @@ -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 deleted file mode 100644 index 5d33548..0000000 --- a/tests/late_join_multiplayer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dnuwxkoeeykt3 diff --git a/tests/light_performance_profile_validation.gd b/tests/light_performance_profile_validation.gd index 6a654f1..0353cf9 100644 --- a/tests/light_performance_profile_validation.gd +++ b/tests/light_performance_profile_validation.gd @@ -4,6 +4,11 @@ const MainScene: PackedScene = preload("res://main/main.tscn") const RuntimePerformanceProfileType = preload( "res://main/runtime_performance_profile.gd" ) +const FOLIAGE_WIND_SHADER: Shader = preload( + "res://world/materials/foliage_wind.gdshader" +) + + func _initialize() -> void: call_deferred("_run") @@ -24,12 +29,6 @@ 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) @@ -48,14 +47,7 @@ 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) normal_main.queue_free() for _frame: int in 8: @@ -85,19 +77,27 @@ func _validate_main_profile(main: Node) -> void: var screen_grid := pixelation.get_node("ScreenGrid") as ColorRect assert(screen_grid != null and not screen_grid.visible) - var pond := _first_fresh_water_visual(main) - var ocean := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion/WaterBodies/OceanWater/VisualWater" + var pond := main.get_node( + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond/VisualWater" ) as MeshInstance3D - assert(not pond.visible) + var ocean := main.get_node( + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/VisualWater" + ) as MeshInstance3D + assert(pond.material_override is StandardMaterial3D) assert(ocean.material_override is StandardMaterial3D) + assert(not pond.material_override is ShaderMaterial) assert(not ocean.material_override is ShaderMaterial) + assert(ocean is WaterSurfaceMotion) + assert(not ocean.is_processing()) + assert(is_zero_approx(ocean.position.y)) _validate_ocean_fishing_coverage(main, ocean) - var region := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion" - ) as GeneratedWorldRegion - assert(region != null) - assert(region.get_node("Decorations").get_child_count() > 0) + var island := main.get_node( + "TestWorld/Regions/StarterIslandRegion" + ) as StarterIslandRegion + assert(island != null and not island.is_foliage_wind_enabled()) + assert(_count_foliage_wind_overrides( + island.get_node("Terrain/Visual") + ) == 0) var title_background := main.get_node("%TitleBackground") as ColorRect var title_material := title_background.material as ShaderMaterial @@ -123,11 +123,11 @@ 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()) assert((main.get_node("%TitleMusic") as AudioStreamPlayer).stream != null) - assert((main.get_node("%NewGameMusic") as AudioStreamPlayer).stream != null) assert((main.get_node("%DuskMusic") as AudioStreamPlayer).stream != null) assert( (main.get_node("%WavesAudio") as AudioStreamPlayer).stream == null @@ -143,21 +143,29 @@ func _validate_normal_profile(main: Node) -> void: assert(is_equal_approx(root.scaling_3d_scale, 1.0)) var pixelation: Node = main.get_node("%WorldPixelationPostprocess") assert(not bool(pixelation.call("is_light_performance_profile"))) - var pond := _first_fresh_water_visual(main) - var ocean := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion/WaterBodies/OceanWater/VisualWater" + var pond := main.get_node( + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Pond/VisualWater" ) as MeshInstance3D - assert(not pond.visible) + var ocean := main.get_node( + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/VisualWater" + ) as MeshInstance3D + assert(pond.material_override is ShaderMaterial) assert(ocean.material_override is ShaderMaterial) + assert(ocean is WaterSurfaceMotion) + assert(ocean.is_processing()) _validate_ocean_fishing_coverage(main, ocean) - var region := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion" - ) as GeneratedWorldRegion - assert(region != null) - assert(region.get_node("Decorations").get_child_count() > 0) + var island := main.get_node( + "TestWorld/Regions/StarterIslandRegion" + ) as StarterIslandRegion + assert(island != null and island.is_foliage_wind_enabled()) + assert(_count_foliage_wind_overrides( + island.get_node("Terrain/Visual") + ) > 0) 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()) @@ -194,7 +202,6 @@ func _validate_normal_profile(main: Node) -> void: assert(clouds.get_node_or_null("CloudField") is MultiMeshInstance3D) assert(clouds.get_node_or_null("CloudCeiling") == null) assert((main.get_node("%TitleMusic") as AudioStreamPlayer).stream != null) - assert((main.get_node("%NewGameMusic") as AudioStreamPlayer).stream != null) assert((main.get_node("%DuskMusic") as AudioStreamPlayer).stream != null) assert( (main.get_node("%WavesAudio") as AudioStreamPlayer).stream != null @@ -204,26 +211,6 @@ func _validate_normal_profile(main: Node) -> void: ) -func _validate_new_game_music_transition(main: Node) -> void: - var title_music := main.get_node("%TitleMusic") as AudioStreamPlayer - var new_game_music := main.get_node("%NewGameMusic") as AudioStreamPlayer - assert(title_music.playing) - main.call("_start_new_game_music") - assert(not title_music.playing) - assert(new_game_music.playing) - main.call("_show_title_music", true) - assert(not new_game_music.playing) - assert(title_music.playing) - - -func _first_fresh_water_visual(main: Node) -> MeshInstance3D: - var root := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion/WaterBodies/FreshWaterBodies" - ) as Node3D - assert(root != null and root.get_child_count() > 0) - return root.get_child(0).get_node("VisualWater") as MeshInstance3D - - func _validate_ocean_fishing_coverage( main: Node, ocean: MeshInstance3D, @@ -231,19 +218,34 @@ func _validate_ocean_fishing_coverage( var ocean_mesh := ocean.mesh as PlaneMesh assert(ocean_mesh != null) var shape_node := main.get_node( - "TestWorld/Regions/GeneratedWorldRegion/WaterBodies/OceanWater/" - + "FishingRegion/Shape" + "TestWorld/Regions/StarterIslandRegion/WaterBodies/Ocean/" + + "FishingRegions/OceanFishingRegion/Shape" ) as CollisionShape3D assert(shape_node != null) var fishing_shape := shape_node.shape as BoxShape3D assert(fishing_shape != null) assert(fishing_shape.size.is_equal_approx(Vector3( ocean_mesh.size.x, - 4.0, + 2.0, ocean_mesh.size.y, ))) +func _count_foliage_wind_overrides(root_node: Node) -> int: + var count: int = 0 + var mesh_instance := root_node 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_surface_override_material( + surface_index + ) as ShaderMaterial + if material != null and material.shader == FOLIAGE_WIND_SHADER: + count += 1 + for child: Node in root_node.get_children(): + count += _count_foliage_wind_overrides(child) + return count + + func _stop_audio_players(root_node: Node) -> void: if root_node is AudioStreamPlayer: (root_node as AudioStreamPlayer).stop() diff --git a/tests/logbook_runtime_validation.gd b/tests/logbook_runtime_validation.gd index e33e551..e411fef 100644 --- a/tests/logbook_runtime_validation.gd +++ b/tests/logbook_runtime_validation.gd @@ -2,7 +2,6 @@ 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: @@ -37,16 +36,12 @@ 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(MENU_TRANSITION_SETTLE_SECONDS).timeout + await create_timer(2.2).timeout assert(player_menu.visible) assert(logbook.visible) assert(backdrop.visible) @@ -54,60 +49,32 @@ func _run() -> void: assert(not hotbar.visible) var entry_buttons: Dictionary = logbook.get("_entry_buttons") - assert(entry_buttons.size() == 108) + assert(entry_buttons.size() == 26) 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() == 108) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 26) 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() == 202) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 34) logbook.call("_select_category", WaterType.Type.FRESH_WATER) await create_timer(0.25).timeout - assert((logbook.get("_entry_buttons") as Dictionary).size() == 108) + assert((logbook.get("_entry_buttons") as Dictionary).size() == 26) 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(MENU_TRANSITION_SETTLE_SECONDS).timeout + await create_timer(2.2).timeout assert(not player_menu.visible) assert(bool(player_menu.call("_handle_direct_page_shortcut", shortcut))) - await create_timer(MENU_TRANSITION_SETTLE_SECONDS).timeout + await create_timer(2.2).timeout player_menu.call( "_show_section_immediate", PlayerMenu.Section.PROFILE ) @@ -143,38 +110,23 @@ 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() == 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) + 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. player.inventory_layout.restore_backpack_level( PlayerInventoryLayout.MAX_BACKPACK_LEVEL ) - var home_state := main.get("_home_state") as PlayerHomeState - assert(home_state != null) - assert(home_state.upgrade_to_next_tier()) + player.cooler_capacity.restore_level(PlayerCoolerCapacity.MAX_LEVEL) assert( player.inventory_layout.get_backpack_level() == PlayerInventoryLayout.MAX_BACKPACK_LEVEL ) - assert(player.cooler_capacity.get_capacity() == 18) + assert(player.cooler_capacity.get_level() == PlayerCoolerCapacity.MAX_LEVEL) player.inventory.set_inventory_layout(null) for index: int in 4: - _add_test_catch(player, round_trip_species[index]) + _add_test_catch(player, active_species[index]) assert(save_manager.save_now()) var no_catches: Array[FishCatch] = [] var no_discoveries: Array[StringName] = [] @@ -183,21 +135,18 @@ 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 = round_trip_species[index] + var original_fish: FishData = active_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, round_trip_species.size()): - _add_test_catch(player, round_trip_species[index]) + for index: int in range(4, active_species.size()): + _add_test_catch(player, active_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() - == round_trip_species.size() - ) - for fish: FishData in round_trip_species: + assert(player.inventory.get_all_catches().size() == 63) + for fish: FishData in active_species: assert(player.inventory.get_count(fish.id) == 1) assert(player.collection_log.has_discovered(fish.id)) for fish_id: StringName in [ @@ -236,13 +185,13 @@ func _add_test_catch(player: Player, fish: FishData) -> void: func _capture_if_requested(suffix: String) -> void: - if not OS.has_environment("straywild_LOGBOOK_CAPTURE"): + if not OS.has_environment("NETFISHING_LOGBOOK_CAPTURE"): return await process_frame await process_frame var image: Image = root.get_texture().get_image() var path: String = ( - OS.get_environment("straywild_LOGBOOK_CAPTURE") + OS.get_environment("NETFISHING_LOGBOOK_CAPTURE") + suffix + ".png" ) diff --git a/tests/logbook_validation.gd b/tests/logbook_validation.gd index 67747a5..1645096 100644 --- a/tests/logbook_validation.gd +++ b/tests/logbook_validation.gd @@ -17,19 +17,17 @@ 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("straywild_TEST_CREATE_ROOT"): + if OS.has_environment("NETFISHING_TEST_CREATE_ROOT"): var data_root := PlayerDataRoot.new() root.add_child(data_root) var result: Dictionary = data_root.create_unbound_root( - OS.get_environment("straywild_TEST_CREATE_ROOT") + OS.get_environment("NETFISHING_TEST_CREATE_ROOT") ) assert(bool(result.get("ok", false))) data_root.queue_free() @@ -37,7 +35,6 @@ func _run() -> void: quit() return _validate_catalog() - _validate_catalog_query() await _validate_page() print("Logbook validation: PASS") quit() @@ -46,7 +43,7 @@ func _run() -> void: func _validate_catalog() -> void: assert(CatalogResource.candidates.size() == 316) var ordered := LogbookCatalog.ordered_species(CatalogResource.candidates) - assert(ordered.size() == 314) + assert(ordered.size() == 63) var previous_number: int = 0 var catalog_numbers: Dictionary[int, bool] = {} for fish: FishDataType in CatalogResource.candidates: @@ -71,348 +68,6 @@ 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() @@ -436,10 +91,6 @@ 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) @@ -452,9 +103,6 @@ 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, @@ -507,39 +155,6 @@ 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" @@ -547,11 +162,6 @@ 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, @@ -561,7 +171,7 @@ func _validate_page() -> void: var entries: Dictionary = page.get("_entry_buttons") assert( entries.size() - == (108 if category == LogbookCatalog.Category.FRESH_WATER else 202) + == (26 if category == LogbookCatalog.Category.FRESH_WATER else 34) ) for fish: FishDataType in LogbookCatalog.ordered_species( CatalogResource.candidates @@ -582,15 +192,8 @@ func _validate_page() -> void: assert(portrait != null) assert(portrait.source_texture == fish.display_texture) assert( - 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 + portrait.custom_minimum_size + == LogbookPage.CATALOG_PORTRAIT_SIZE ) assert( portrait.expand_mode @@ -606,23 +209,6 @@ 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)) @@ -636,14 +222,11 @@ func _validate_page() -> void: candidate.display_name ) ) - assert(silhouette_count == 310) + assert(silhouette_count == 60) page.call("_select_category", LogbookCatalog.Category.SHELLFISH) await create_timer(0.25).timeout - 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).size() == 2) assert( (page.get("_entry_buttons") as Dictionary).has(&"unknown_3906") ) @@ -686,11 +269,6 @@ 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) @@ -706,11 +284,10 @@ 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\n1")) + assert(_detail_text(page).contains("number caught\nunknown")) assert(_detail_text(page).contains("body of water\nfresh water")) assert( _detail_text(page).contains( @@ -835,27 +412,14 @@ 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() @@ -870,54 +434,6 @@ 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_compatibility_report.gd b/tests/manual/terrain_chunk_generator/terrain_chunk_compatibility_report.gd deleted file mode 100644 index 0d35543..0000000 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_compatibility_report.gd +++ /dev/null @@ -1,122 +0,0 @@ -extends SceneTree - -const CATALOG: TerrainChunkCatalog = preload( - "res://world/generation/chunks/terrain_chunk_catalog.tres" -) -const BIOME_CATALOG: TerrainBiomeCatalog = preload( - "res://world/generation/biomes/terrain_biome_catalog.tres" -) - - -func _initialize() -> void: - call_deferred(&"_run") - - -func _run() -> void: - var generator := _make_generator() - root.add_child(generator) - if not generator._prepare_catalog(): - generator.free() - quit(1) - return - var variants: Array[TerrainChunkVariant] = [] - variants.assign(generator._solver_variants) - - print( - "Terrain chunk rotations: %d authored, %d distinct constraints" - % [generator._variants.size(), variants.size()] - ) - for variant: TerrainChunkVariant in variants: - print("\n", variant.stable_key()) - var ocean_edges := variant.rotated_edge_mask( - variant.definition.ocean_facing_edges - ) - for edge_value: int in TerrainChunkTopology.Edge.values(): - var edge := edge_value as TerrainChunkTopology.Edge - var matches := PackedStringArray() - for other: TerrainChunkVariant in variants: - var opposite := TerrainChunkTopology.opposite_edge(edge) - if generator._edges_are_compatible( - variant, - edge, - other, - opposite, - ): - matches.append( - "%s.%s" - % [ - other.stable_key(), - TerrainChunkTopology.edge_name(opposite), - ] - ) - print( - " %s%s [%d points]: %s" - % [ - TerrainChunkTopology.edge_name(edge), - ( - " [ocean]" - if (ocean_edges & (1 << edge_value)) != 0 - else "" - ), - variant.profile(edge).points.size(), - ", ".join(matches) if not matches.is_empty() else "NONE", - ] - ) - - if generator.generate(): - var summary := generator._build_summary() - print( - ( - "\nSeeded diagnostic layout %s " - + "(%d backtracks, %d repeated edges):" - ) - % [ - str(summary["layout_fingerprint"]).substr(0, 12), - int(summary["backtracks"]), - int(summary["adjacent_repeat_edges"]), - ] - ) - var keys := generator.placement_keys() - for row: int in generator.grid_size.y: - var cells := PackedStringArray() - for column: int in generator.grid_size.x: - cells.append(keys[row * generator.grid_size.x + column]) - print(" ", " ".join(cells)) - var biomes := TerrainBiomeAssigner.assign( - BIOME_CATALOG, - generator.placement_records(), - generator.generation_seed, - ) - print("\nBiome layout:") - for row: int in generator.grid_size.y: - var cells := PackedStringArray() - for column: int in generator.grid_size.x: - var biome_id: StringName = biomes.get( - Vector2i(column, row), - &"", - ) - cells.append(String(biome_id).trim_prefix("biome_")) - print(" ", " ".join(cells)) - generator.free() - quit(0) - - -func _make_generator() -> TerrainChunkGenerator: - var generator := TerrainChunkGenerator.new() - generator.catalog = CATALOG - generator.grid_size = Vector2i(9, 9) - generator.generation_seed = 13001 - generator.generate_on_ready = false - generator.build_collision = false - generator.force_center_chunk_id = &"chunk_spawn" - generator.required_chunk_ids = PackedStringArray( - [ - "chunk_spawn", - "chunk_0001", - "chunk_0002", - "chunk_0003", - "chunk_0004", - ] - ) - generator.grass_sand_smoothing_enabled = true - return generator diff --git a/tests/manual/terrain_chunk_generator/terrain_chunk_compatibility_report.gd.uid b/tests/manual/terrain_chunk_generator/terrain_chunk_compatibility_report.gd.uid deleted file mode 100644 index 1da131f..0000000 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_compatibility_report.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://di4yaor4f3s4e diff --git a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd b/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd deleted file mode 100644 index 657347f..0000000 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd +++ /dev/null @@ -1,37 +0,0 @@ -extends Node3D - -@onready var _generator: TerrainChunkGenerator = $TerrainChunkGenerator -@onready var _status: Label = $Instructions/Status - - -func _unhandled_input(event: InputEvent) -> void: - if event.is_action_pressed(&"ui_cancel"): - get_viewport().set_input_as_handled() - get_tree().quit() - return - var key_event := event as InputEventKey - if ( - key_event != null - and key_event.pressed - and not key_event.echo - and key_event.physical_keycode == KEY_R - ): - get_viewport().set_input_as_handled() - _generator.generation_seed += 1 - _generator.generate() - - -func _on_generation_completed(summary: Dictionary) -> void: - _status.text = ( - "Terrain generator diagnostic • seed %d • %d chunks • " - + "%d rotations / %d constraints • %d backtracks • " - + "%d repeated edges\nlayout %s • R: regenerate • Esc/B: close" - ) % [ - int(summary["seed"]), - int(summary["chunk_count"]), - int(summary["variant_count"]), - int(summary["solver_variant_count"]), - int(summary["backtracks"]), - int(summary["adjacent_repeat_edges"]), - str(summary["layout_fingerprint"]).substr(0, 12), - ] diff --git a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd.uid b/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd.uid deleted file mode 100644 index 4713f51..0000000 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://0dmjswsm038h diff --git a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn b/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn deleted file mode 100644 index 5c1e046..0000000 --- a/tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.tscn +++ /dev/null @@ -1,48 +0,0 @@ -[gd_scene load_steps=7 format=3] - -[ext_resource type="Script" path="res://tests/manual/terrain_chunk_generator/terrain_chunk_generator_test.gd" id="1_test"] -[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/straywild_environment.tres" id="5_environment"] - -[node name="TerrainChunkGeneratorTest" type="Node3D"] -script = ExtResource("1_test") - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = ExtResource("5_environment") - -[node name="Sun" type="DirectionalLight3D" parent="."] -rotation_degrees = Vector3(-54, -32, 0) -light_color = Color(0.88, 0.94, 0.96, 1) -light_energy = 1.0 -shadow_enabled = true - -[node name="TerrainChunkGenerator" type="Node3D" parent="."] -script = ExtResource("2_generator") -catalog = ExtResource("3_catalog") -grid_size = Vector2i(15, 13) -generation_seed = 13001 -build_collision = true -show_chunk_labels = false -force_center_chunk_id = &"chunk_spawn" -required_chunk_ids = PackedStringArray("chunk_spawn", "chunk_0001", "chunk_0002", "chunk_0003", "chunk_0004") -grass_sand_smoothing_enabled = true -elevated_cliff_feature_enabled = true - -[node name="Player" parent="." instance=ExtResource("4_player")] -position = Vector3(0, 0.3, 0) - -[node name="Instructions" type="CanvasLayer" parent="."] -layer = 20 - -[node name="Status" type="Label" parent="Instructions"] -offset_left = 18.0 -offset_top = 18.0 -offset_right = 930.0 -offset_bottom = 74.0 -text = "Terrain generator diagnostic\nR: regenerate • Esc/B: close" -theme_override_colors/font_color = Color(0.76, 0.88, 0.9, 1) -theme_override_font_sizes/font_size = 18 - -[connection signal="generation_completed" from="TerrainChunkGenerator" to="." method="_on_generation_completed"] diff --git a/tests/movement_multiplayer_validation.gd b/tests/movement_multiplayer_validation.gd index 05a668d..bbd9efd 100644 --- a/tests/movement_multiplayer_validation.gd +++ b/tests/movement_multiplayer_validation.gd @@ -32,40 +32,15 @@ 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() - await _validate_remote_snapshot_smoothing(avatar) - _validate_remote_locomotion_playback_recovery(avatar) + _validate_remote_snapshot_smoothing(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, @@ -73,169 +48,37 @@ 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].slice(0, 4) - ).is_empty() + encoded_snapshots[0] + ) == moving_snapshot ) - 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( + var paused_snapshot: Dictionary = moving_snapshot.duplicate(true) + paused_snapshot["animation_state"] = ( NetworkPlayerAnimationProtocol.make_state( NetworkPlayerAnimationProtocol.LOCOMOTION_IDLE, true, &"strike", - 9, - 0.4, + 7, + 0.5, true, ) ) - avatar.apply_network_animation_state( - NetworkPlayerAnimationProtocol.make_state( - NetworkPlayerAnimationProtocol.LOCOMOTION_WALKING, - true, - &"draw", - 8, - 0.1, - ) + var paused_encoded: Array = NetworkSession._encode_movement_snapshot( + paused_snapshot ) - 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(paused_encoded.size() == NetworkSession.MOVEMENT_SNAPSHOT_FIELD_COUNT) + var paused_decoded: Dictionary = ( + NetworkSession._decode_movement_snapshot(paused_encoded) ) + assert(not paused_decoded.is_empty()) + assert(bool(paused_decoded["animation_state"]["action"]["paused"])) func _validate_transit_estimation() -> void: @@ -313,191 +156,16 @@ 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, - 2, + 10, 1.0 / 30.0, 0.1, - 0.1, ) - # 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()) + assert(avatar.global_position.x < 0.8) + assert(avatar.global_position.x > 0.7) func _validate_reliable_jump_intent(avatar: Player) -> void: @@ -510,10 +178,9 @@ 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), - 20, + 21, 1.0 / 30.0, 0.0, - 0.1, ) assert(not bool(avatar.capture_network_input(22)["jump"])) @@ -542,24 +209,12 @@ func _validate_reliable_jump_intent(avatar: Player) -> void: func _validate_stale_input_expiry(avatar: Player) -> void: avatar.configure_network_remote(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, - ) + avatar.apply_authoritative_network_input(_movement_input(40, true)) 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"))) @@ -579,7 +234,6 @@ 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, @@ -593,22 +247,8 @@ 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 @@ -620,40 +260,31 @@ 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) - 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 _reset_locomotion_test_position(player, session, world) - input_sequence = await _sustain_locomotion_input( - player, input_sequence, 1.5, false - ) - 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(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(input_sequence, false, false, true, &"draw", 1) + _movement_input(3, false, true, true) ) - input_sequence += 1 - await create_timer(1.0).timeout - player.apply_authoritative_network_input( - _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(input_sequence, false, false, false, &"", 3) + _movement_input(4, false, false, true) ) - var disconnect_deadline: int = Time.get_ticks_msec() + 15000 + await create_timer(2.0).timeout + player.apply_authoritative_network_input( + _movement_input(5, false, false, true, &"draw", 1) + ) + await create_timer(1.0).timeout + player.apply_authoritative_network_input( + _movement_input(6, false, false, true, &"strike", 2, true) + ) + await create_timer(2.0).timeout + player.apply_authoritative_network_input( + _movement_input(7, false, false, false, &"", 3) + ) + var disconnect_deadline: int = Time.get_ticks_msec() + 8000 while ( Time.get_ticks_msec() < disconnect_deadline and session.is_authenticated_peer(remote_peer_id) @@ -702,27 +333,12 @@ 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() + 22000 + var observation_deadline: int = Time.get_ticks_msec() + 18000 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" @@ -763,44 +379,15 @@ func _run_client() -> void: and saw_dust ): break - 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 + 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) print("Movement multiplayer client validation: PASS") session.disconnect_session("") main.queue_free() @@ -838,39 +425,6 @@ 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 6b53c08..2ace76f 100644 --- a/tests/net_attachment_validation.gd +++ b/tests/net_attachment_validation.gd @@ -102,12 +102,6 @@ func _run() -> void: 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.") diff --git a/tests/network_chat_protocol_validation.gd b/tests/network_chat_protocol_validation.gd deleted file mode 100644 index 9368189..0000000 --- a/tests/network_chat_protocol_validation.gd +++ /dev/null @@ -1,55 +0,0 @@ -extends SceneTree - -const EDGE_PADDING: String = " \t\n ​⠀" - - -func _initialize() -> void: - call_deferred("_validate_protocol") - - -func _validate_protocol() -> void: - _validate_type_and_empty_handling() - _validate_message_cleanup() - _validate_protocol_limits() - print("Network chat protocol validation: PASS") - quit() - - -func _validate_type_and_empty_handling() -> void: - assert(NetworkChatProtocol.sanitize_body(null) == "") - assert(NetworkChatProtocol.sanitize_body(42) == "") - assert(NetworkChatProtocol.sanitize_body(EDGE_PADDING) == "") - assert(NetworkChatProtocol.sanitize_body("\u0001") == "") - - -func _validate_message_cleanup() -> void: - assert(NetworkChatProtocol.sanitize_body(" hello ") == "hello") - assert(NetworkChatProtocol.sanitize_body("a\tb\nc") == "a b c") - assert(NetworkChatProtocol.sanitize_body("word word") == "word word") - assert(NetworkChatProtocol.sanitize_body(" !!! ") == "!!!") - assert( - NetworkChatProtocol.sanitize_body( - EDGE_PADDING + "visible" + EDGE_PADDING - ) == "visible" - ) - - -func _validate_protocol_limits() -> void: - var maximum_body: String = "a".repeat( - NetworkChatProtocol.MAX_VISIBLE_CHARACTERS - ) - assert(NetworkChatProtocol.sanitize_body(maximum_body) == maximum_body) - assert( - NetworkChatProtocol.sanitize_body(maximum_body + "a") == "" - ) - var maximum_utf8_body: String = "🐟".repeat( - NetworkChatProtocol.MAX_VISIBLE_CHARACTERS - ) - assert( - maximum_utf8_body.to_utf8_buffer().size() - == NetworkChatProtocol.MAX_UTF8_BYTES - ) - assert( - NetworkChatProtocol.sanitize_body(maximum_utf8_body) - == maximum_utf8_body - ) diff --git a/tests/network_chat_protocol_validation.gd.uid b/tests/network_chat_protocol_validation.gd.uid deleted file mode 100644 index 5e98b42..0000000 --- a/tests/network_chat_protocol_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bj7nq2k6q5c7f diff --git a/tests/on_screen_keyboard_validation.gd b/tests/on_screen_keyboard_validation.gd index a685c65..1c324a2 100644 --- a/tests/on_screen_keyboard_validation.gd +++ b/tests/on_screen_keyboard_validation.gd @@ -55,7 +55,6 @@ 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") ) @@ -88,13 +87,11 @@ 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 05f8ee9..3712fd4 100644 --- a/tests/operator_multiplayer_validation.gd +++ b/tests/operator_multiplayer_validation.gd @@ -36,10 +36,6 @@ 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)) @@ -69,7 +65,6 @@ func _run_host() -> void: assert(players_page != null) players_page.call("_refresh") assert(_has_button_text(players_page, "deop")) - assert(_has_button_tooltip(players_page, "scrub art")) var unban_deadline: int = Time.get_ticks_msec() + 12000 while ( @@ -153,9 +148,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(3) as Button).visible) - players_page.call("_select_tab", 3) - assert(int(players_page.get("_current_tab")) == 3) + assert((tabs.get_child(2) as Button).visible) + players_page.call("_select_tab", 2) + assert(int(players_page.get("_current_tab")) == 2) var local_entry: PlayerListEntry = _entry_for_peer( service, session.get_local_peer_id() ) @@ -180,7 +175,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(3) as Button).visible) + assert(not (tabs.get_child(2) 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 @@ -256,11 +251,3 @@ 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 a76a3dd..2250706 100644 --- a/tests/player_experience_validation.gd +++ b/tests/player_experience_validation.gd @@ -143,21 +143,14 @@ func _validate_save_migration() -> void: version_five, 5, ) - assert(int(migrated.get("save_version", -1)) == 11) + assert(int(migrated.get("save_version", -1)) == 8) var experience_data: Dictionary = migrated.get("experience", {}) assert(int(experience_data.get("total_experience", -1)) == 0) var world_data: Dictionary = migrated.get("world", {}) assert(is_equal_approx(float(world_data.get("time_hours", -1.0)), 8.0)) - assert( - int(world_data.get("seed", 0)) - == PlayerSaveManager.DEFAULT_WORLD_SEED - ) 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 42f97ca..16e52c3 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), - 20.0, + 1.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 4d2bd70..669c155 100644 --- a/tests/profile_multiplayer_validation.gd +++ b/tests/profile_multiplayer_validation.gd @@ -56,10 +56,6 @@ 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 @@ -156,10 +152,15 @@ func _run_client() -> void: var chat_service := main.get_node( "%NetworkChatService" ) as NetworkChatService - # Player-hosted rooms deliberately send no prior scrollback to joining or - # reconnecting clients. Live messages sent after authentication still work. - await create_timer(0.5).timeout - assert(not chat_service.get_history().any( + var history_deadline: int = Time.get_ticks_msec() + 8000 + while Time.get_ticks_msec() < history_deadline: + if chat_service.get_history().any( + func(message: Dictionary) -> bool: + return str(message.get("body", "")) == HOST_HISTORY_MESSAGE + ): + break + await process_frame + assert(chat_service.get_history().any( func(message: Dictionary) -> bool: return str(message.get("body", "")) == HOST_HISTORY_MESSAGE )) diff --git a/tests/progression_archive_validation.gd b/tests/progression_archive_validation.gd deleted file mode 100644 index 30f0df6..0000000 --- a/tests/progression_archive_validation.gd +++ /dev/null @@ -1,377 +0,0 @@ -extends SceneTree - -const MainScene: PackedScene = preload("res://main/main.tscn") - - -func _initialize() -> void: - call_deferred("_run") - - -func _run() -> void: - 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"))) - - 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 - 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")) - assert(save_path.ends_with("player/player_save.nfsave")) - assert(FileAccess.file_exists(save_path)) - assert(not FileAccess.file_exists(save_path.get_base_dir().path_join( - "player_save.json" - ))) - _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"]) == 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" - ) - var exported: Dictionary = save_manager.export_progression_archive( - archive_path - ) - assert(bool(exported.get("ok", false))) - assert(FileAccess.file_exists(archive_path)) - _assert_opaque(archive_path) - var inspected: Dictionary = save_manager.inspect_progression_archive( - archive_path - ) - assert(bool(inspected.get("ok", false))) - assert(int(inspected.get("wallet_balance", -1)) == 4321) - assert(int(inspected.get("world_seed", -1)) == 864209) - - assert(player.wallet.restore_balance(7)) - assert(save_manager.save_now()) - var imported: Dictionary = save_manager.import_progression_archive( - archive_path - ) - assert(bool(imported.get("ok", false))) - 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"] - ) - assert(save_manager.delete_progression_save()) - var legacy_path: String = save_path.get_base_dir().path_join( - "player_save.json" - ) - var legacy_file := FileAccess.open(legacy_path, FileAccess.WRITE) - assert(legacy_file != null) - legacy_file.store_string(JSON.stringify(legacy_data, "\t")) - legacy_file.close() - assert(save_manager.load_player_data()) - assert(FileAccess.file_exists(save_path)) - 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: - 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" - ) - 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." - ) - var migrated_save: String = migrated_root.path_join( - "player/player_save.nfsave" - ) - assert(FileAccess.file_exists(migrated_save)) - 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: - await process_frame - await create_timer(0.1).timeout - print("Progression archive validation: PASS") - 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()) - var encoded_hex: String = bytes.hex_encode() - assert("save_version".to_utf8_buffer().hex_encode() not in encoded_hex) - assert("wallet".to_utf8_buffer().hex_encode() not in encoded_hex) diff --git a/tests/progression_archive_validation.gd.uid b/tests/progression_archive_validation.gd.uid deleted file mode 100644 index 59699fd..0000000 --- a/tests/progression_archive_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ccl47ftc1cu5l diff --git a/tests/session_switch_multiplayer_validation.gd b/tests/session_switch_multiplayer_validation.gd index 86c9a84..68cfcc7 100644 --- a/tests/session_switch_multiplayer_validation.gd +++ b/tests/session_switch_multiplayer_validation.gd @@ -31,10 +31,6 @@ 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 f79700e..74c86d2 100644 --- a/tests/surface_drawing_multiplayer_validation.gd +++ b/tests/surface_drawing_multiplayer_validation.gd @@ -2,7 +2,7 @@ extends SceneTree const MainScene: PackedScene = preload("res://main/main.tscn") const TEST_PORT: int = 18133 -const WAIT_MSEC: int = 60000 +const WAIT_MSEC: int = 20000 func _initialize() -> void: @@ -24,15 +24,9 @@ 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(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(1, WorldLayout.STARTER_ISLAND)) assert(session.start_private_host(TEST_PORT)) + var save_manager := main.get("_save_manager") as PlayerSaveManager + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -64,40 +58,6 @@ 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 )) @@ -123,10 +83,6 @@ func _run_host() -> void: str(overwritten_cell["author_fingerprint"]) == remote_record.identity_fingerprint ) - assert( - remote_record.identity_fingerprint - in overwritten_state.get("participant_fingerprints", []) - ) assert(service.request_cell_edits(canvas_id, [{ "x": 8, @@ -156,64 +112,7 @@ func _run_host() -> void: assert(service.request_guide_visibility(canvas_id, false, true)) await create_timer(1.0).timeout assert(service.clear_session_artwork()) - var stamp_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < stamp_deadline - and service.get_canvas_ids().is_empty() - ): - await process_frame - assert(service.get_canvas_ids().size() == 1) - var stamp_id: String = service.get_canvas_ids()[0] - var stamp_state: Dictionary = service.get_canvas_state(stamp_id) - assert(bool(stamp_state.get("stamp", false))) - assert(bool(stamp_state["finalized"])) - assert((stamp_state["cells"] as Array).size() == 1) - assert(str(stamp_state["cells"][0]["color_id"]) == "coral") - assert( - stamp_state.get("participant_fingerprints", []) - == [remote_record.identity_fingerprint] - ) - # Give the client a full observation window before the authoritative clear. await create_timer(1.0).timeout - assert( - service.clear_artwork_by_fingerprint( - remote_record.identity_fingerprint - ) == 1 - ) - assert(service.get_canvas_ids().is_empty()) - var second_stamp_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < second_stamp_deadline - and service.get_canvas_ids().is_empty() - ): - 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 - var remote_entry: PlayerListEntry = null - for entry: PlayerListEntry in player_list.get_entries(): - if entry.peer_id == remote_peer_id: - remote_entry = entry - break - assert(remote_entry != null and remote_entry.can_ban) - assert(player_list.ban( - remote_peer_id, - remote_record.identity_fingerprint, - remote_record.display_name, - remote_entry.revision, - )) - assert(service.get_canvas_ids().is_empty()) - var removed_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < removed_deadline - and session.is_authenticated_peer(remote_peer_id) - ): - await process_frame - assert(not session.is_authenticated_peer(remote_peer_id)) print("Surface drawing multiplayer host validation: PASS") session.disconnect_session("") main.queue_free() @@ -260,20 +159,6 @@ 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, @@ -325,63 +210,8 @@ func _run_client() -> void: if service.get_canvas_ids().is_empty(): break assert(service.get_canvas_ids().is_empty()) - var data_root := main.get("_data_root") as PlayerDataRoot - var stamp_directory: String = data_root.root_path.path_join("artwork") - assert(DirAccess.make_dir_recursive_absolute(stamp_directory) == OK) - var stamp_path: String = stamp_directory.path_join("multiplayer-stamp.png") - var stamp_image := Image.create(16, 16, false, Image.FORMAT_RGBA8) - stamp_image.fill(Color.TRANSPARENT) - stamp_image.set_pixel(3, 11, SurfaceDrawingPalette.get_color(&"coral")) - assert(stamp_image.save_png(stamp_path) == OK) - assert(service.select_saved_stamp(stamp_path)) - var stamp_surface: Dictionary = _surface_below_local_player(main) - assert(not stamp_surface.is_empty()) - assert(service.request_stamp_at_surface( - stamp_surface["position"], stamp_surface["normal"], Vector3.RIGHT - )) - var shared_stamp_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < shared_stamp_deadline - and service.get_canvas_ids().is_empty() - ): - await process_frame - assert(service.get_canvas_ids().size() == 1) - var stamp_state: Dictionary = service.get_canvas_state( - service.get_canvas_ids()[0] - ) - assert(bool(stamp_state.get("stamp", false))) - assert(bool(stamp_state["finalized"])) - assert(str(stamp_state["cells"][0]["color_id"]) == "coral") - assert( - session.get_local_identity_fingerprint() - in stamp_state.get("participant_fingerprints", []) - ) - var clear_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < clear_deadline - and not service.get_canvas_ids().is_empty() - ): - await process_frame - assert(service.get_canvas_ids().is_empty()) - assert(service.request_stamp_at_surface( - stamp_surface["position"], stamp_surface["normal"], Vector3.RIGHT - )) - var second_stamp_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < second_stamp_deadline - and service.get_canvas_ids().is_empty() - ): - await process_frame - assert(service.get_canvas_ids().size() == 1) - var ban_deadline: int = Time.get_ticks_msec() + WAIT_MSEC - while ( - Time.get_ticks_msec() < ban_deadline - and session.state != NetworkSession.State.SERVER_LOST - ): - await process_frame - assert(session.state == NetworkSession.State.SERVER_LOST) - assert(service.get_canvas_ids().is_empty()) print("Surface drawing multiplayer client validation: PASS") + session.disconnect_session("") main.queue_free() for _frame: int in 4: await process_frame @@ -434,18 +264,3 @@ 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 85110cd..8835127 100644 --- a/tests/surface_drawing_runtime_validation.gd +++ b/tests/surface_drawing_runtime_validation.gd @@ -20,13 +20,9 @@ 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(1, WorldLayout.STARTER_ISLAND)) + assert(save_manager.initialize_new_game()) main.call("_enter_gameplay") await physics_frame await physics_frame @@ -71,28 +67,6 @@ func _run() -> void: state["cells"][0]["author_fingerprint"] == session.get_local_identity_fingerprint() ) - 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( - SurfaceDrawingPalette.get_color(&"ocean_teal") - )) assert(service.request_guide_visibility(canvas_id, false)) state = service.get_canvas_state(canvas_id) assert(not bool(state["guide_visible"])) @@ -104,7 +78,6 @@ func _run() -> void: assert(service.request_guide_visibility(canvas_id, false, true)) assert(bool(service.get_canvas_state(canvas_id)["finalized"])) assert(canvas.is_finalized()) - assert(not canvas.has_guide_geometry()) assert(service.request_canvas_at_surface( hit["position"], hit["normal"], Vector3.RIGHT )) @@ -136,38 +109,6 @@ func _run() -> void: assert(player_list.get_session_artwork_counts() == Vector2i(2, 1)) assert(player_list.reset_session_artwork()) assert(service.get_canvas_ids().is_empty()) - var stamp_entries: Array[Dictionary] = service.get_saved_stamp_entries() - assert(stamp_entries.size() == 1) - assert(str(stamp_entries[0]["path"]) == export_path) - assert(int(stamp_entries[0]["grid_size"]) == 16) - assert(bool(stamp_entries[0]["available"])) - service.activate(Vector2(640.0, 360.0)) - assert(service.select_saved_stamp(export_path)) - assert(service.is_stamp_mode()) - assert(service.request_stamp_at_surface( - hit["position"], hit["normal"], Vector3.RIGHT - )) - assert(service.get_canvas_ids().size() == 1) - var stamp_id: String = service.get_canvas_ids()[0] - var stamp_state: Dictionary = service.get_canvas_state(stamp_id) - assert(bool(stamp_state["stamp"])) - assert(bool(stamp_state["finalized"])) - assert(not bool(stamp_state["guide_visible"])) - assert((stamp_state["cells"] as Array).size() == 1) - assert(int(stamp_state["cells"][0]["x"]) == 8) - assert(int(stamp_state["cells"][0]["y"]) == 8) - assert(str(stamp_state["cells"][0]["color_id"]) == "ocean_teal") - assert( - stamp_state.get("participant_fingerprints", []) - == [session.get_local_identity_fingerprint()] - ) - var stamp_canvas_nodes: Dictionary = service.get("_canvas_nodes") - var stamp_canvas := stamp_canvas_nodes[stamp_id] as SurfaceDrawingCanvas - assert(stamp_canvas.is_finalized()) - assert(not stamp_canvas.has_guide_geometry()) - service.set_placement_mode(false) - assert(not service.is_stamp_mode()) - assert(service.clear_session_artwork()) print("Surface drawing runtime validation: PASS") session.disconnect_session("") diff --git a/tests/surface_drawing_texture_renderer_validation.gd b/tests/surface_drawing_texture_renderer_validation.gd deleted file mode 100644 index ed99383..0000000 --- a/tests/surface_drawing_texture_renderer_validation.gd +++ /dev/null @@ -1,101 +0,0 @@ -extends SceneTree - -const CANVAS_COUNT: int = 5 -const GRID_SIZE: int = 32 -const FINGERPRINT: String = ( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -) - - -func _initialize() -> void: - call_deferred("_run") - - -func _run() -> void: - var world := Node3D.new() - root.add_child(world) - var color_ids: Array[StringName] = SurfaceDrawingPalette.get_color_ids() - var cells: Array[Dictionary] = [] - for y: int in range(GRID_SIZE): - for x: int in range(GRID_SIZE): - cells.append({ - "x": x, - "y": y, - "color_id": str(color_ids[(x + y) % color_ids.size()]), - "author_fingerprint": FINGERPRINT, - }) - var canvases: Array[SurfaceDrawingCanvas] = [] - var persistent_meshes: Array[Mesh] = [] - var persistent_textures: Array[Texture2D] = [] - for canvas_index: int in range(CANVAS_COUNT): - var canvas := SurfaceDrawingCanvas.new() - world.add_child(canvas) - assert(canvas.setup({ - "session_id": "texture-renderer-session", - "canvas_id": "canvas-%d" % canvas_index, - "origin": [float(canvas_index) * 3.0, 0.0, 0.0], - "normal": [0.0, 1.0, 0.0], - "tangent": [1.0, 0.0, 0.0], - "width": GRID_SIZE, - "height": GRID_SIZE, - "cell_size": SurfaceDrawingProtocol.CELL_SIZE, - "revision": 0, - "guide_visible": true, - "finalized": false, - "layer": canvas_index, - "creator_fingerprint": FINGERPRINT, - "cells": cells, - }, null)) - assert(canvas.get_rendered_pixel_count() == GRID_SIZE * GRID_SIZE) - var pixel_instance := canvas.get("_pixel_instance") as MeshInstance3D - assert(pixel_instance != null) - assert(pixel_instance.mesh.get_surface_count() == 1) - var material := pixel_instance.mesh.surface_get_material( - 0 - ) as StandardMaterial3D - assert(material != null) - assert(material.albedo_texture is ImageTexture) - canvases.append(canvas) - persistent_meshes.append(pixel_instance.mesh) - persistent_textures.append(material.albedo_texture) - for canvas_index: int in range(CANVAS_COUNT): - var canvas: SurfaceDrawingCanvas = canvases[canvas_index] - assert(canvas.apply_update({ - "session_id": "texture-renderer-session", - "canvas_id": "canvas-%d" % canvas_index, - "revision": 1, - "edits": [{ - "x": canvas_index, - "y": canvas_index, - "color_id": "coral", - "author_fingerprint": FINGERPRINT, - }], - })) - var pixel_instance := canvas.get("_pixel_instance") as MeshInstance3D - var material := pixel_instance.mesh.surface_get_material( - 0 - ) as StandardMaterial3D - assert(pixel_instance.mesh == persistent_meshes[canvas_index]) - assert(material.albedo_texture == persistent_textures[canvas_index]) - assert(canvas.apply_guide_update({ - "session_id": "texture-renderer-session", - "canvas_id": "canvas-%d" % canvas_index, - "revision": 2, - "guide_visible": false, - "finalized": true, - })) - assert(not canvas.has_guide_geometry()) - await process_frame - for canvas: SurfaceDrawingCanvas in canvases: - var artwork_mesh_count: int = 0 - for child: Node in canvas.get_children(): - if child is MultiMeshInstance3D: - assert(false, "Art Kit pixels regressed to per-color MultiMeshes.") - if child is MeshInstance3D: - artwork_mesh_count += 1 - assert(artwork_mesh_count == 1) - assert(canvas.get_export_image().get_size() == Vector2i(32, 32)) - world.queue_free() - await process_frame - print("Surface drawing texture renderer validation: PASS") - quit() diff --git a/tests/surface_drawing_texture_renderer_validation.gd.uid b/tests/surface_drawing_texture_renderer_validation.gd.uid deleted file mode 100644 index c64b594..0000000 --- a/tests/surface_drawing_texture_renderer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://qj7jd2p3b4p8 diff --git a/tests/surface_drawing_validation.gd b/tests/surface_drawing_validation.gd index ac48a67..596cec0 100644 --- a/tests/surface_drawing_validation.gd +++ b/tests/surface_drawing_validation.gd @@ -90,21 +90,6 @@ func _validate_protocol_bounds() -> void: unsupported_size["width"] = 48 unsupported_size["height"] = 48 assert(not SurfaceDrawingProtocol.validate_canvas_request(unsupported_size)) - var stamp_pixels := PackedByteArray() - stamp_pixels.resize(16 * 16) - stamp_pixels[0] = 1 - var stamp_request: Dictionary = canvas_request.duplicate(true) - stamp_request["request_id"] = "stamp-1" - stamp_request["pixels"] = stamp_pixels - assert(SurfaceDrawingProtocol.validate_stamp_request(stamp_request)) - var invalid_stamp: Dictionary = stamp_request.duplicate(true) - var invalid_pixels: PackedByteArray = invalid_stamp["pixels"] - invalid_pixels[0] = SurfaceDrawingPalette.COLORS.size() + 1 - invalid_stamp["pixels"] = invalid_pixels - assert(not SurfaceDrawingProtocol.validate_stamp_request(invalid_stamp)) - var empty_stamp: Dictionary = stamp_request.duplicate(true) - empty_stamp["pixels"] = PackedByteArray() - assert(not SurfaceDrawingProtocol.validate_stamp_request(empty_stamp)) var guide_request: Dictionary = { "request_id": "guide-1", "session_id": "session", @@ -131,11 +116,9 @@ func _validate_art_unlocks() -> void: assert(unlocks.unlock_product(&"marker_ocean_teal")) assert(unlocks.unlock_product(&"brush_4x")) assert(unlocks.unlock_product(&"grid_128x")) - assert(unlocks.unlock_product(PlayerArtUnlocks.STAMP_PRODUCT_ID)) assert(unlocks.is_color_unlocked(&"ocean_teal")) assert(unlocks.is_brush_size_unlocked(4)) assert(unlocks.is_grid_size_unlocked(128)) - assert(unlocks.is_stamp_unlocked()) assert(not unlocks.restore_mask(PlayerArtUnlocks.ALL_UNLOCK_MASK + 1)) unlocks.free() @@ -194,16 +177,6 @@ func _validate_canvas_geometry_and_collaboration() -> void: "cells": [], } assert(canvas.setup(state, null)) - var pixel_instance := canvas.get("_pixel_instance") as MeshInstance3D - assert(pixel_instance != null) - assert(pixel_instance.name == "ArtworkTexture") - var persistent_mesh: Mesh = pixel_instance.mesh - var pixel_material := persistent_mesh.surface_get_material( - 0 - ) as StandardMaterial3D - assert(pixel_material != null) - var persistent_texture: Texture2D = pixel_material.albedo_texture - assert(persistent_texture is ImageTexture) var first_center: Vector3 = canvas.get_cell_world_position(0, 0) assert(canvas.cell_at_world_point(first_center) == Vector2i(0, 0)) assert(canvas.contains_world_point(first_center)) @@ -219,15 +192,6 @@ func _validate_canvas_geometry_and_collaboration() -> void: }], } assert(canvas.apply_update(first_update)) - assert(pixel_instance.mesh == persistent_mesh) - assert(pixel_material.albedo_texture == persistent_texture) - assert(canvas.get_rendered_pixel_count() == 1) - var export_image: Image = canvas.get_export_image() - assert(export_image.get_size() == Vector2i(16, 16)) - assert(export_image.get_pixel(3, 11).is_equal_approx( - SurfaceDrawingPalette.get_color(&"coral") - )) - assert(export_image.get_pixel(0, 0).is_equal_approx(Color.TRANSPARENT)) var finish_update: Dictionary = { "session_id": "session", "canvas_id": "canvas-1", @@ -238,9 +202,6 @@ func _validate_canvas_geometry_and_collaboration() -> void: assert(canvas.apply_guide_update(finish_update)) assert(not canvas.is_guide_visible()) assert(canvas.is_finalized()) - assert(not canvas.has_guide_geometry()) - assert(pixel_instance.mesh == persistent_mesh) - assert(pixel_material.albedo_texture == persistent_texture) await process_frame var finished_pixel_scale: float = canvas.get_rendered_pixel_size() assert( @@ -262,8 +223,6 @@ func _validate_canvas_geometry_and_collaboration() -> void: }], } assert(canvas.apply_update(second_update)) - assert(pixel_instance.mesh == persistent_mesh) - assert(pixel_material.albedo_texture == persistent_texture) var cells: Array[Dictionary] = canvas.get_authoritative_cells() assert(cells.size() == 1) assert(cells[0]["color_id"] == "blue") @@ -281,10 +240,6 @@ func _validate_canvas_geometry_and_collaboration() -> void: } assert(canvas.apply_update(erase_update)) assert(canvas.get_authoritative_cells().is_empty()) - assert(canvas.get_rendered_pixel_count() == 0) - assert(canvas.get_export_image().get_pixel(3, 11).is_equal_approx( - Color.TRANSPARENT - )) world.queue_free() await process_frame @@ -327,7 +282,6 @@ func _validate_blocked_author_visibility() -> void: "cell_size": SurfaceDrawingProtocol.CELL_SIZE, "revision": 1, "creator_fingerprint": FINGERPRINT_A, - "participant_fingerprints": [FINGERPRINT_A, FINGERPRINT_B], "cells": [ { "x": 1, @@ -344,30 +298,20 @@ func _validate_blocked_author_visibility() -> void: ], } assert(canvas.setup(state, relationships)) - assert(canvas.is_hidden_by_relationship()) - assert(canvas.get_rendered_pixel_count() == 0) + assert(_rendered_pixel_count(canvas) == 1) relationships.set("_records", {}) canvas.refresh_relationship_visibility() await process_frame - assert(not canvas.is_hidden_by_relationship()) - assert(canvas.get_rendered_pixel_count() == 2) - relationships.set("_records", { - FINGERPRINT_B: {"blocked": true, "muted": true}, - }) - assert(canvas.apply_update({ - "session_id": "session", - "canvas_id": "blocked-author-canvas", - "revision": 2, - "participant_fingerprints": [FINGERPRINT_A, FINGERPRINT_B], - "edits": [{ - "x": 2, - "y": 1, - "color_id": "", - "author_fingerprint": "", - }], - })) - canvas.refresh_relationship_visibility() - assert(canvas.is_hidden_by_relationship()) - assert(canvas.get_rendered_pixel_count() == 0) + assert(_rendered_pixel_count(canvas) == 2) world.queue_free() await process_frame + + +func _rendered_pixel_count(canvas: SurfaceDrawingCanvas) -> int: + var count: int = 0 + for child: Node in canvas.get_children(): + if child is MultiMeshInstance3D: + var instance := child as MultiMeshInstance3D + if instance.multimesh != null: + count += instance.multimesh.instance_count + return count diff --git a/tests/terrain_biome_validation.gd b/tests/terrain_biome_validation.gd deleted file mode 100644 index 968ff5e..0000000 --- a/tests/terrain_biome_validation.gd +++ /dev/null @@ -1,135 +0,0 @@ -extends SceneTree - -const BIOME_CATALOG: TerrainBiomeCatalog = preload( - "res://world/generation/biomes/terrain_biome_catalog.tres" -) -const PROP_CATALOG: TerrainPropCatalog = preload( - "res://world/generation/props/terrain_prop_catalog.tres" -) -const EXPECTED_BIOMES: Array[StringName] = [ - &"biome_plains", - &"biome_forest", - &"biome_pine_forest", - &"biome_coast", -] -const TEST_SEED := 13001 - -var _failures: Array[String] = [] - - -func _initialize() -> void: - call_deferred(&"_run") - - -func _run() -> void: - _validate_catalog() - _validate_assignment() - _finish() - - -func _validate_catalog() -> void: - for error: String in BIOME_CATALOG.validation_errors(): - _check(false, error) - _check( - BIOME_CATALOG.definitions.size() == EXPECTED_BIOMES.size(), - "The biome catalog must contain all initial authored profiles.", - ) - for biome_id: StringName in EXPECTED_BIOMES: - var biome := BIOME_CATALOG.definition_for_id(biome_id) - _check(biome != null, "The biome catalog is missing %s." % biome_id) - if biome == null: - continue - for rule: TerrainBiomePropRule in biome.prop_rules: - for prop_id_value: String in rule.allowed_prop_ids: - var prop := PROP_CATALOG.definition_for_id( - StringName(prop_id_value) - ) - _check( - prop != null and rule.allows_prop(prop), - "%s has an invalid %s prop rule." - % [biome_id, prop_id_value], - ) - - -func _validate_assignment() -> void: - var records := _synthetic_records() - var first := TerrainBiomeAssigner.assign( - BIOME_CATALOG, - records, - TEST_SEED, - ) - var second := TerrainBiomeAssigner.assign( - BIOME_CATALOG, - records, - TEST_SEED, - ) - _check(first == second, "Biome assignment must be deterministic by seed.") - _check( - TerrainBiomeAssigner.fingerprint(first).length() == 64, - "Biome assignments must expose a SHA-256 fingerprint.", - ) - var counts := TerrainBiomeAssigner.counts(first) - for biome_id: StringName in EXPECTED_BIOMES: - _check( - counts.get(biome_id, 0) > 0, - "The synthetic map must contain %s." % biome_id, - ) - _check( - first.get(Vector2i(3, 3), &"") == &"biome_plains", - "The spawn-tagged center must remain plains.", - ) - for record: Dictionary in records: - var coordinate: Vector2i = record["coordinate"] - var tags: PackedStringArray = record["tags"] - var biome_id: StringName = first.get(coordinate, &"") - if "fresh_water" in tags: - _check( - biome_id == &"", - "Freshwater-only chunks must not inherit a land-prop biome.", - ) - continue - var biome := BIOME_CATALOG.definition_for_id(biome_id) - _check( - biome != null and biome.supports_chunk_tags(tags), - "Biome %s does not support chunk %s." - % [biome_id, coordinate], - ) - - -func _synthetic_records() -> Array[Dictionary]: - var result: Array[Dictionary] = [] - for row: int in 7: - for column: int in 7: - var coordinate := Vector2i(column, row) - var tags := PackedStringArray(["land", "walkable", "grass"]) - if row == 0: - tags = PackedStringArray(["land", "walkable", "sand"]) - elif coordinate == Vector2i(0, 6): - tags = PackedStringArray([ - "land", - "walkable", - "fresh_water", - "pond", - ]) - elif coordinate == Vector2i(3, 3): - tags.append("spawn") - result.append({ - "coordinate": coordinate, - "tags": tags, - }) - return result - - -func _check(condition: bool, message: String) -> void: - if not condition: - _failures.append(message) - - -func _finish() -> void: - if _failures.is_empty(): - print("Terrain biome validation: PASS") - quit(0) - return - for failure: String in _failures: - printerr("Terrain biome validation: ", failure) - quit(1) diff --git a/tests/terrain_biome_validation.gd.uid b/tests/terrain_biome_validation.gd.uid deleted file mode 100644 index 40de9e4..0000000 --- a/tests/terrain_biome_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cxioi62f6oap0 diff --git a/tests/terrain_chunk_generator_validation.gd b/tests/terrain_chunk_generator_validation.gd deleted file mode 100644 index ec736d9..0000000 --- a/tests/terrain_chunk_generator_validation.gd +++ /dev/null @@ -1,2082 +0,0 @@ -extends SceneTree - -const CATALOG: TerrainChunkCatalog = preload( - "res://world/generation/chunks/terrain_chunk_catalog.tres" -) -const EXPECTED_IDS: Array[String] = [ - "chunk_0000", - "chunk_0001", - "chunk_0002", - "chunk_0003", - "chunk_0004", - "chunk_0005", - "chunk_0006", - "chunk_0007", - "chunk_0008", - "chunk_0009", - "chunk_0010", - "chunk_0011", - "chunk_0012", - "chunk_0013", - "chunk_0014", - "chunk_0015", - "chunk_0016", - "chunk_0017", - "chunk_0018", - "chunk_0019", - "chunk_0020", - "chunk_0021", - "chunk_0022", - "chunk_0023", - "chunk_0024", - "chunk_0025", - "chunk_0026", - "chunk_0027", - "chunk_0028", - "chunk_0029", - "chunk_0030", - "chunk_0031", - "chunk_0032", - "chunk_0033", - "chunk_0034", - "chunk_0035", - "chunk_0036", - "chunk_0037", - "chunk_0038", - "chunk_9999", - "chunk_9998", - "chunk_9997", - "chunk_9996", - "chunk_9995", - "chunk_spawn", -] -const REQUIRED_IDS: Array[String] = [ - "chunk_spawn", - "chunk_0001", - "chunk_0002", - "chunk_0003", - "chunk_0004", -] -const TEST_SEED := 13001 -const CONNECTOR_STRESS_SEED := 287 -const EXPECTED_SOLVER_VARIANT_COUNT := 35 -const EXPECTED_VARIANT_COUNTS: Dictionary[StringName, int] = { - &"chunk_0000": 4, - &"chunk_0001": 4, - &"chunk_0002": 4, - &"chunk_0003": 4, - &"chunk_0004": 4, - &"chunk_0005": 4, - &"chunk_0006": 4, - &"chunk_0007": 4, - &"chunk_0008": 4, - &"chunk_0009": 4, - &"chunk_0010": 4, - &"chunk_0011": 4, - &"chunk_0012": 4, - &"chunk_0013": 4, - &"chunk_0014": 4, - &"chunk_0015": 4, - &"chunk_0016": 4, - &"chunk_0017": 4, - &"chunk_0018": 4, - &"chunk_0019": 1, - &"chunk_0020": 4, - &"chunk_0021": 4, - &"chunk_0022": 4, - &"chunk_0023": 4, - &"chunk_0024": 4, - &"chunk_0025": 4, - &"chunk_0026": 4, - &"chunk_0027": 4, - &"chunk_0028": 4, - &"chunk_0029": 4, - &"chunk_0030": 4, - &"chunk_0031": 4, - &"chunk_0032": 4, - &"chunk_0033": 4, - &"chunk_0034": 4, - &"chunk_0035": 4, - &"chunk_0036": 4, - &"chunk_0037": 4, - &"chunk_0038": 4, - &"chunk_9999": 4, - &"chunk_9998": 4, - &"chunk_9997": 4, - &"chunk_9996": 4, - &"chunk_9995": 4, - &"chunk_spawn": 1, -} - -var _failures: Array[String] = [] - - -func _initialize() -> void: - call_deferred(&"_run") - - -func _run() -> void: - _validate_catalog() - _validate_profiles() - _validate_second_tier_coastal_layout() - _validate_generation() - _finish() - - -func _validate_catalog() -> void: - for error: String in CATALOG.validation_errors(): - _check(false, error) - _check( - CATALOG.definitions.size() == EXPECTED_IDS.size(), - "Catalog must contain the authored chunks and spawn definition.", - ) - for stable_id: String in EXPECTED_IDS: - var definition := CATALOG.definition_for_id(StringName(stable_id)) - _check(definition != null, "Catalog is missing %s." % stable_id) - if definition == null: - continue - _check( - definition.packed_scene != null, - "%s must reference an imported GLB." % stable_id, - ) - var grass := CATALOG.definition_for_id(&"chunk_0000") - var sand := CATALOG.definition_for_id(&"chunk_0001") - var beach := CATALOG.definition_for_id(&"chunk_0002") - var grass_ocean_edge := CATALOG.definition_for_id(&"chunk_0005") - var grass_beach_transition := CATALOG.definition_for_id(&"chunk_0006") - var grass_ocean_corner := CATALOG.definition_for_id(&"chunk_0007") - var beach_ocean_corner := CATALOG.definition_for_id(&"chunk_0008") - var grass_sand_diagonal := CATALOG.definition_for_id(&"chunk_0013") - var pond := CATALOG.definition_for_id(&"chunk_0004") - var cliff_sea_edge := CATALOG.definition_for_id(&"chunk_0014") - var cliff_sea_corner := CATALOG.definition_for_id(&"chunk_0015") - var cliff_sea_transition_right := CATALOG.definition_for_id(&"chunk_9999") - var cliff_sea_transition_left := CATALOG.definition_for_id(&"chunk_9998") - var cliff_beach_transition_right := CATALOG.definition_for_id(&"chunk_9997") - var cliff_beach_transition_left := CATALOG.definition_for_id(&"chunk_9996") - var stream_variant := CATALOG.definition_for_id(&"chunk_0016") - var lake_edge := CATALOG.definition_for_id(&"chunk_0017") - var lake_edge_variant := CATALOG.definition_for_id(&"chunk_0037") - var lake_corner := CATALOG.definition_for_id(&"chunk_0018") - var lake_fill := CATALOG.definition_for_id(&"chunk_0019") - var lake_diagonal := CATALOG.definition_for_id(&"chunk_0020") - var lake_narrow := CATALOG.definition_for_id(&"chunk_0021") - var lake_regular_to_narrow := CATALOG.definition_for_id(&"chunk_0022") - 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") - var river_outlet_left := CATALOG.definition_for_id(&"chunk_0032") - var river_bend_c := CATALOG.definition_for_id(&"chunk_0033") - var river_bend_b := CATALOG.definition_for_id(&"chunk_0034") - var river_bend_a := CATALOG.definition_for_id(&"chunk_0035") - var river_bend_d := CATALOG.definition_for_id(&"chunk_0036") - var river_cap := CATALOG.definition_for_id(&"chunk_9995") - var cliff_top := CATALOG.definition_for_id(&"chunk_0009") - var cliff_corner := CATALOG.definition_for_id(&"chunk_0010") - var cliff_edge := CATALOG.definition_for_id(&"chunk_0011") - var cliff_ramp := CATALOG.definition_for_id(&"chunk_0012") - var cliff_third_tier_edge := CATALOG.definition_for_id(&"chunk_0026") - var cliff_third_tier_corner := CATALOG.definition_for_id(&"chunk_0027") - var cliff_third_tier_top := CATALOG.definition_for_id(&"chunk_0028") - var spawn := CATALOG.definition_for_id(&"chunk_spawn") - _check( - ( - grass != null - and sand != null - and beach != null - and grass_ocean_edge != null - and grass_beach_transition != null - and grass_ocean_corner != null - and beach_ocean_corner != null - and grass_sand_diagonal != null - and pond != null - and cliff_sea_edge != null - and cliff_sea_corner != null - and cliff_sea_transition_right != null - and cliff_sea_transition_left != null - and cliff_beach_transition_right != null - and cliff_beach_transition_left != null - and stream_variant != null - and lake_edge != null - and lake_edge_variant != null - and lake_corner != null - and lake_fill != null - and lake_diagonal != null - and lake_narrow != null - and lake_regular_to_narrow != null - 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 - and river_outlet_left != null - and river_bend_a != null - and river_bend_b != null - and river_bend_c != null - and river_bend_d != null - and river_cap != null - and cliff_top != null - and cliff_corner != null - and cliff_edge != null - and cliff_ramp != null - and cliff_third_tier_edge != null - and cliff_third_tier_corner != null - and cliff_third_tier_top != null - and spawn != null - ), - "The authored biome-rule definitions must be available.", - ) - if ( - grass != null - and sand != null - and beach != null - and grass_ocean_edge != null - and grass_beach_transition != null - and grass_ocean_corner != null - and beach_ocean_corner != null - and grass_sand_diagonal != null - and pond != null - and cliff_sea_edge != null - and cliff_sea_corner != null - and cliff_sea_transition_right != null - and cliff_sea_transition_left != null - and cliff_beach_transition_right != null - and cliff_beach_transition_left != null - and stream_variant != null - and lake_edge != null - and lake_edge_variant != null - and lake_corner != null - and lake_fill != null - and lake_diagonal != null - and lake_narrow != null - and lake_regular_to_narrow != null - 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 - and river_outlet_left != null - and river_bend_a != null - and river_bend_b != null - and river_bend_c != null - and river_bend_d != null - and river_cap != null - and cliff_top != null - and cliff_corner != null - and cliff_edge != null - and cliff_ramp != null - and cliff_third_tier_edge != null - and cliff_third_tier_corner != null - and cliff_third_tier_top != null - and spawn != null - ): - _check( - sand.allows_non_water_neighbor(beach), - "Flat sand must permit an adjacent authored beach.", - ) - _check( - sand.allows_non_water_neighbor(grass), - "Flat sand must permit the inland transition to grass.", - ) - _check( - grass.allows_non_water_neighbor(sand), - "Grass must permit the inland side of a flat-sand transition.", - ) - _check( - ( - "sand" in sand.required_neighbor_tags - and "coast" in sand.required_neighbor_tags - and sand.maximum_boundary_distance == 1 - ), - ( - "Every flat-sand chunk must remain attached to sand or authored " - + "coast within the first inland terrain ring." - ), - ) - _check( - spawn.minimum_required_neighbors == 3, - "Spawn must retain its three-sided safe-grass requirement.", - ) - _check( - beach.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The authored beach must descend eastward into ocean before rotation.", - ) - _check( - grass_ocean_edge.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The authored grass cliff must face eastward ocean before rotation.", - ) - _check( - grass_beach_transition.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The authored grass/beach join must face eastward ocean before rotation.", - ) - _check( - grass_beach_transition.minimum_required_neighbors == 2 - and "coast" in grass_beach_transition.required_neighbor_tags, - "The grass/beach join must remain between two coastline chunks.", - ) - _check( - grass_beach_transition.allows_non_water_neighbor_on_edge( - grass, - TerrainChunkTopology.Edge.WEST, - ) - and not grass_beach_transition.allows_non_water_neighbor_on_edge( - sand, - TerrainChunkTopology.Edge.WEST, - ), - "The grass-backed transition edge must accept grass and reject sand.", - ) - _check( - grass_beach_transition.allows_non_water_neighbor_on_edge( - beach, - TerrainChunkTopology.Edge.NORTH, - ) - and grass_beach_transition.allows_non_water_neighbor_on_edge( - grass_ocean_edge, - TerrainChunkTopology.Edge.SOUTH, - ), - "The transition's coastline seams must retain their authored roles.", - ) - _check( - not grass_ocean_edge.allows_non_water_neighbor_on_edge( - sand, - TerrainChunkTopology.Edge.WEST, - ), - "The straight grass coast's inland edge must reject sand.", - ) - _check( - grass_ocean_corner.ocean_facing_edges - == ( - (1 << int(TerrainChunkTopology.Edge.EAST)) - | (1 << int(TerrainChunkTopology.Edge.SOUTH)) - ), - "The authored grass corner must expose east and south to ocean.", - ) - _check( - grass_ocean_corner.minimum_required_neighbors == 2 - and ( - "grass_ocean_edge" - in grass_ocean_corner.required_neighbor_tags - ), - "The grass corner must join two straight grass ocean edges.", - ) - _check( - grass_ocean_corner.allows_non_water_neighbor_on_edge( - grass_ocean_edge, - TerrainChunkTopology.Edge.NORTH, - ) - and grass_ocean_corner.allows_non_water_neighbor_on_edge( - grass_ocean_edge, - TerrainChunkTopology.Edge.WEST, - ), - "Both corner land seams must accept straight grass ocean edges.", - ) - _check( - beach_ocean_corner.ocean_facing_edges - == ( - (1 << int(TerrainChunkTopology.Edge.EAST)) - | (1 << int(TerrainChunkTopology.Edge.SOUTH)) - ), - "The authored beach corner must expose east and south to ocean.", - ) - _check( - beach_ocean_corner.minimum_required_neighbors == 2 - and ( - "beach_ocean_edge" - in beach_ocean_corner.required_neighbor_tags - ), - "The beach corner must join two straight beach ocean edges.", - ) - _check( - grass_sand_diagonal.must_be_interior - and not grass_sand_diagonal.participates_in_base_solver - and grass_sand_diagonal.maximum_boundary_distance == 2 - and "mixed_surface" in grass_sand_diagonal.tags, - ( - "The grass-sand diagonal must remain an inland post-process " - + "mixed-surface chunk." - ), - ) - _check( - grass_sand_diagonal.surface_tags_for_edge( - TerrainChunkTopology.Edge.NORTH - ) == PackedStringArray(["sand"]) - and grass_sand_diagonal.surface_tags_for_edge( - TerrainChunkTopology.Edge.WEST - ) == PackedStringArray(["sand"]) - and grass_sand_diagonal.surface_tags_for_edge( - TerrainChunkTopology.Edge.EAST - ) == PackedStringArray(["grass"]) - and grass_sand_diagonal.surface_tags_for_edge( - TerrainChunkTopology.Edge.SOUTH - ) == PackedStringArray(["grass"]), - "The diagonal's authored edges must retain two sand and two grass sides.", - ) - var stream := CATALOG.definition_for_id(&"chunk_0003") - _check( - pond.water_inlet_edges == pond.water_outlet_edges - and pond.water_inlet_edges - == (1 << int(TerrainChunkTopology.Edge.NORTH)), - "A pond must terminate either end of an inland freshwater chain.", - ) - _check( - pond.maximum_placements == 2, - "Generated worlds must contain only one pond/stream chain.", - ) - _check( - stream != null - and is_equal_approx(stream.selection_weight, 0.3) - and is_equal_approx(stream_variant.selection_weight, 0.3) - and stream.maximum_placements == 2 - and stream_variant.maximum_placements == 1 - and "pond" in stream.tags - and "river" not in stream.tags - and stream_variant.tags == stream.tags - and stream_variant.allowed_neighbor_tags - == stream.allowed_neighbor_tags - and stream_variant.water_inlet_edges == stream.water_inlet_edges - and stream_variant.water_outlet_edges == stream.water_outlet_edges - and stream_variant.water_surface_size == stream.water_surface_size - and stream.water_surface_offset.x < 0.0 - and stream_variant.water_surface_offset.x > 0.0 - and is_equal_approx( - stream_variant.water_surface_offset.y, - stream.water_surface_offset.y, - ), - ( - "Both pond-stream visuals must share one combined selection weight " - + "and mirrored water footprints." - ), - ) - _check( - ( - not lake_edge.participates_in_base_solver - and not lake_edge_variant.participates_in_base_solver - and not lake_corner.participates_in_base_solver - and not lake_fill.participates_in_base_solver - and not lake_diagonal.participates_in_base_solver - and not lake_narrow.participates_in_base_solver - and not lake_regular_to_narrow.participates_in_base_solver - and not lake_narrow_to_regular.participates_in_base_solver - and lake_edge.water_inlet_edges == lake_edge.water_outlet_edges - and lake_edge.water_inlet_edges == 7 - and lake_edge_variant.water_inlet_edges - == lake_edge.water_inlet_edges - and lake_edge_variant.water_outlet_edges - == lake_edge.water_outlet_edges - and lake_edge_variant.water_surface_size - == lake_edge.water_surface_size - and lake_edge_variant.water_surface_offset - == lake_edge.water_surface_offset - and lake_corner.water_inlet_edges - == lake_corner.water_outlet_edges - and lake_corner.water_inlet_edges == 6 - and lake_fill.water_inlet_edges - == lake_fill.water_outlet_edges - and lake_fill.water_inlet_edges == 15 - and lake_fill.water_surface_size == Vector2(10.0, 10.0) - and lake_diagonal.water_inlet_edges - == lake_diagonal.water_outlet_edges - and lake_diagonal.water_inlet_edges == 6 - and lake_diagonal.maximum_placements == 4 - and lake_diagonal.water_surface_polygon.size() == 6 - and lake_narrow.water_inlet_edges == 14 - and lake_narrow.water_outlet_edges == 14 - and lake_narrow.water_surface_polygon.size() == 4 - and lake_regular_to_narrow.water_inlet_edges == 14 - and lake_regular_to_narrow.water_outlet_edges == 14 - and lake_regular_to_narrow.water_surface_polygon.size() == 5 - and lake_narrow_to_regular.water_inlet_edges == 14 - and lake_narrow_to_regular.water_outlet_edges == 14 - and lake_narrow_to_regular.water_surface_polygon.size() == 5 - and "lake" in lake_edge.tags - and "lake" in lake_edge_variant.tags - and "lake" in lake_corner.tags - and "lake" in lake_fill.tags - and "lake" in lake_diagonal.tags - and "lake" in lake_narrow.tags - and "lake" in lake_regular_to_narrow.tags - and "lake" in lake_narrow_to_regular.tags - ), - "The deterministic lake ring and bottom must remain connected freshwater chunks.", - ) - _check( - ( - 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 - and not river_outlet_left.participates_in_base_solver - and not river_bend_a.participates_in_base_solver - and not river_bend_b.participates_in_base_solver - and not river_bend_c.participates_in_base_solver - and not river_bend_d.participates_in_base_solver - and not river_cap.participates_in_base_solver - and river_edge.water_inlet_edges == 14 - 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 - and river_source_left.water_outlet_edges == 3 - and river_outlet_right.water_inlet_edges == 14 - and river_outlet_right.water_outlet_edges == 14 - and river_outlet_left.water_inlet_edges == 11 - and river_outlet_left.water_outlet_edges == 11 - and river_bend_a.water_inlet_edges == 14 - and river_bend_a.water_outlet_edges == 14 - and river_bend_b.water_inlet_edges == 12 - and river_bend_b.water_outlet_edges == 12 - and river_bend_c.water_inlet_edges == 15 - and river_bend_c.water_outlet_edges == 15 - and river_bend_c.continuous_water_seam_edges == 15 - and river_bend_d.water_inlet_edges == 13 - and river_bend_d.water_outlet_edges == 13 - and river_bend_d.continuous_water_seam_edges == 1 - and river_cap.water_inlet_edges == 6 - 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 - and river_outlet_left.water_surface_polygon.size() == 19 - and river_outlet_right.ocean_facing_edges == 2 - and river_outlet_left.ocean_facing_edges == 2 - and river_cap.water_surface_polygon.size() == 6 - 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 - and "river_outlet_left" in river_outlet_left.tags - and "river_bend_a" in river_bend_a.tags - and "river_bend_b" in river_bend_b.tags - and "river_bend_c" in river_bend_c.tags - and "river_bend_d" in river_bend_d.tags - and "river" in river_cap.tags - ), - ( - "The river banks, bend, cliff source, ocean outlet, and legacy " - + "caps must remain connected freshwater chunks." - ), - ) - for cliff_definition: TerrainChunkDefinition in [ - cliff_top, - cliff_corner, - cliff_edge, - cliff_ramp, - ]: - _check( - cliff_definition.overlay_only - and cliff_definition.must_be_interior - and cliff_definition.base_layer_scene != null - and cliff_definition.base_layer_mesh_name == &"chunk_0000", - "Every second-tier piece must overlay level-one grass inland.", - ) - for cliff_definition: TerrainChunkDefinition in [ - cliff_third_tier_top, - cliff_third_tier_corner, - cliff_third_tier_edge, - ]: - _check( - cliff_definition.overlay_only - and cliff_definition.must_be_interior - and cliff_definition.base_layer_scene != null - and cliff_definition.base_layer_mesh_name == &"chunk_0000" - and "elevation_3" in cliff_definition.tags, - "Every third-tier piece must overlay level-one grass inland.", - ) - for coastal_cliff: TerrainChunkDefinition in [ - cliff_sea_edge, - cliff_sea_corner, - ]: - _check( - coastal_cliff.overlay_only - and coastal_cliff.base_layer_scene == null - and not coastal_cliff.must_be_interior - and coastal_cliff.prefers_map_boundary - and "coast" in coastal_cliff.tags - and "elevation_2_sea_edge" in coastal_cliff.tags, - ( - "Each second-tier sea piece must be a complete coastal " - + "overlay without an inland grass base." - ), - ) - for transition: TerrainChunkDefinition in [ - cliff_sea_transition_right, - cliff_sea_transition_left, - ]: - _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 inland corner " - + "over an authored level-one coastline." - ), - ) - _check( - cliff_sea_transition_right.base_layer_quarter_turns == 3 - and cliff_sea_transition_right.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.SOUTH)), - "The right coastal transition must align its south-facing base coast.", - ) - _check( - cliff_sea_transition_left.base_layer_quarter_turns == 1 - and cliff_sea_transition_left.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The left coastal transition must align its east-facing base coast.", - ) - for transition: TerrainChunkDefinition in [ - cliff_beach_transition_right, - cliff_beach_transition_left, - ]: - _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 - and transition.prefers_map_boundary - and "sand" in transition.tags - and "transition" in transition.tags, - ( - "Each raised beach endpoint must close over an authored " - + "level-one beach corner." - ), - ) - _check( - cliff_beach_transition_right.base_layer_quarter_turns == 3 - and cliff_beach_transition_right.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.SOUTH)) - and cliff_beach_transition_left.base_layer_quarter_turns == 1 - and cliff_beach_transition_left.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The raised beach endpoint corners must face their open coastline.", - ) - _check( - cliff_sea_edge.ocean_facing_edges - == (1 << int(TerrainChunkTopology.Edge.EAST)), - "The second-tier sea edge must face east before rotation.", - ) - _check( - cliff_sea_corner.ocean_facing_edges - == ( - (1 << int(TerrainChunkTopology.Edge.EAST)) - | (1 << int(TerrainChunkTopology.Edge.SOUTH)) - ), - "The second-tier sea corner must face east and south before rotation.", - ) - _check( - cliff_sea_corner.minimum_required_neighbors == 2 - and ( - "elevation_2_sea_edge" - in cliff_sea_corner.required_neighbor_tags - ), - "The second-tier sea corner must join two straight sea edges.", - ) - _check( - cliff_top.minimum_required_neighbors == 4 - and "elevation_2" in cliff_top.required_neighbor_tags, - "The second-tier top must be enclosed on all four sides.", - ) - _check( - "ramp" in cliff_ramp.tags - and cliff_ramp.maximum_placements > 0, - "The second-tier ramp must remain available without being required.", - ) - _check( - cliff_third_tier_top.minimum_required_neighbors == 4 - and "elevation_3" in cliff_third_tier_top.required_neighbor_tags - and "ramp" not in cliff_third_tier_edge.tags - and "ramp" not in cliff_third_tier_corner.tags, - "The third-tier set must form a closed, intentionally unramped plateau.", - ) - - -func _validate_profiles() -> void: - for definition: TerrainChunkDefinition in CATALOG.definitions: - var variants := TerrainChunkAnalyzer.create_variants( - definition, - CATALOG.chunk_size, - ) - _check( - not variants.is_empty(), - "%s must produce at least one rotation variant." - % definition.stable_id, - ) - for variant: TerrainChunkVariant in variants: - _check( - variant.edge_profiles.size() == 4, - "%s must expose four edge profiles." % variant.stable_key(), - ) - var ocean_edges := variant.rotated_edge_mask( - definition.ocean_facing_edges - ) - for edge_index: int in variant.edge_profiles.size(): - var profile := variant.edge_profiles[edge_index] - _check( - ( - not profile.points.is_empty() - or (ocean_edges & (1 << edge_index)) != 0 - ), - ( - "%s has an empty non-ocean edge profile." - % variant.stable_key() - ), - ) - - -func _validate_second_tier_coastal_layout() -> void: - var generator := TerrainChunkGenerator.new() - generator.catalog = CATALOG - generator.grid_size = Vector2i(4, 4) - generator.generate_on_ready = false - generator.build_collision = false - generator.force_center_chunk_id = &"" - root.add_child(generator) - var keys := PackedStringArray() - for row: int in generator.grid_size.y: - for column: int in generator.grid_size.x: - var at_north := row == 0 - var at_east := column == generator.grid_size.x - 1 - var at_south := row == generator.grid_size.y - 1 - var at_west := column == 0 - if at_north and at_west: - keys.append("chunk_0015@2") - elif at_north and at_east: - keys.append("chunk_0015@1") - elif at_south and at_east: - keys.append("chunk_0015@0") - elif at_south and at_west: - keys.append("chunk_0015@3") - elif at_north: - keys.append("chunk_0014@1") - elif at_east: - keys.append("chunk_0014@0") - elif at_south: - keys.append("chunk_0014@3") - elif at_west: - keys.append("chunk_0014@2") - else: - keys.append("chunk_0009@0") - _check( - generator.generate_from_placement_keys(keys), - ( - "The second-tier sea edge and corner must form a complete " - + "raised coastal perimeter." - ), - ) - if generator.placement_keys().size() == keys.size(): - _check( - _all_neighbor_edges_match(generator), - "Every raised coastal-perimeter seam must match.", - ) - _check( - _count_placements(generator.placement_keys(), "chunk_0014") == 8 - and _count_placements( - generator.placement_keys(), "chunk_0015" - ) == 4, - "The raised coastal perimeter must use its straight and corner pieces.", - ) - for record: Dictionary in generator.placement_records(): - var stable_id: StringName = record.get("stable_id", &"") - if stable_id not in [&"chunk_0014", &"chunk_0015"]: - continue - var coordinate: Vector2i = record.get( - "coordinate", Vector2i.ZERO - ) - var variant := _find_variant( - generator, - stable_id, - int(record.get("rotation_quarters", 0)), - ) - _check( - variant != null - and generator._variant_respects_ocean_boundary( - variant, coordinate - ), - "Every second-tier sea opening must face outside the terrain grid.", - ) - var generated := generator.get_generated_chunks_root() - if generated != null: - for child: Node in generated.get_children(): - var stable_id := StringName( - child.get_meta(&"terrain_chunk_id", &"") - ) - if stable_id in [&"chunk_0014", &"chunk_0015"]: - _check( - child.get_node_or_null("TerrainBaseLayer") == null, - "Second-tier sea pieces must not render inland grass over ocean.", - ) - generator.free() - - -func _validate_generation() -> void: - var first := _make_generator() - root.add_child(first) - var first_solved := first.generate() - _check(first_solved, "Generator must solve the prototype 9x9 grid.") - if not first_solved: - first.free() - return - var first_keys := first.placement_keys() - _check(first_keys.size() == 81, "Generator must place exactly 81 chunks.") - for stable_id: String in REQUIRED_IDS: - _check( - _placements_contain(first_keys, stable_id), - "Generated diagnostic must contain %s." % stable_id, - ) - _check( - _all_neighbor_edges_match(first), - "Every generated neighboring edge must match.", - ) - _check( - _count_placements(first_keys, "chunk_spawn") == 1, - "Generated layouts must contain exactly one spawn chunk.", - ) - _check( - first_keys[40].begins_with("chunk_spawn@"), - "The spawn chunk must occupy the center cell.", - ) - _validate_layout_rules(first) - _validate_authored_rotations(first) - _validate_generation_summary(first) - var first_generated_root := first.get_generated_chunks_root() - _check( - first.generate(), - "Repeated generation on one generator must solve.", - ) - _check( - first.placement_keys() == first_keys, - "Repeated generation on one generator must remain deterministic.", - ) - _check( - first.get_generated_chunks_root() != first_generated_root, - "Successful regeneration must replace the generated scene atomically.", - ) - - var second := _make_generator() - root.add_child(second) - var second_solved := second.generate() - _check(second_solved, "Repeated deterministic generation must solve.") - if not second_solved: - first.free() - second.free() - return - _check( - second.placement_keys() == first_keys, - "The same seed and catalog must produce the same layout.", - ) - var restored := _make_generator() - restored.generation_seed = TEST_SEED + 999 - root.add_child(restored) - _check( - restored.generate_from_placement_keys(first_keys), - "A resolved placement manifest must rebuild successfully.", - ) - _check( - restored.placement_keys() == first_keys, - "A resolved placement manifest must preserve exact rotations.", - ) - first.free() - second.free() - restored.free() - - for seed_offset: int in range(1, 6): - var generator := _make_generator() - generator.generation_seed = TEST_SEED + seed_offset - root.add_child(generator) - var solved := generator.generate() - _check( - solved, - "Generator must solve seed %d." % generator.generation_seed, - ) - if solved: - var keys := generator.placement_keys() - for stable_id: String in REQUIRED_IDS: - _check( - _placements_contain(keys, stable_id), - "Seed %d must contain %s." - % [generator.generation_seed, stable_id], - ) - _check( - _all_neighbor_edges_match(generator), - "Seed %d has a mismatched neighboring edge." - % generator.generation_seed, - ) - _validate_layout_rules(generator) - generator.free() - - var connector_stress := _make_generator() - connector_stress.generation_seed = CONNECTOR_STRESS_SEED - connector_stress.maximum_backtracks = 100 - root.add_child(connector_stress) - _check( - connector_stress.generate(), - "Connector propagation must solve the known stress seed.", - ) - _check( - connector_stress._backtrack_count < 100, - "Connector propagation must reject unsupported branches early.", - ) - connector_stress.free() - - -func _validate_authored_rotations(generator: TerrainChunkGenerator) -> void: - var counts: Dictionary[StringName, int] = {} - for variant: TerrainChunkVariant in generator._variants: - var stable_id := variant.definition.stable_id - counts[stable_id] = counts.get(stable_id, 0) + 1 - for stable_id: StringName in EXPECTED_VARIANT_COUNTS: - _check( - counts.get(stable_id, 0) == EXPECTED_VARIANT_COUNTS[stable_id], - "%s must preserve every explicitly allowed rotation." % stable_id, - ) - - var stream := CATALOG.definition_for_id(&"chunk_0003") - var alternate_stream := CATALOG.definition_for_id(&"chunk_0016") - _check( - stream != null and alternate_stream != null, - "Both stream visual definitions must be available.", - ) - if stream == null or alternate_stream == null: - return - for quarter_turns: int in 4: - var stream_variant := _find_variant( - generator, - &"chunk_0003", - quarter_turns, - ) - _check( - stream_variant != null, - "The stream must support rotation %d." % quarter_turns, - ) - var alternate_variant := _find_variant( - generator, - &"chunk_0016", - quarter_turns, - ) - _check( - alternate_variant != null, - "The alternate stream must support rotation %d." % quarter_turns, - ) - if stream_variant == null or alternate_variant == null: - continue - var expected_inlet := 1 << int(TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.NORTH, - quarter_turns, - )) - var expected_outlet := 1 << int(TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.SOUTH, - quarter_turns, - )) - _check( - stream_variant.rotated_edge_mask(stream.water_inlet_edges) - == expected_inlet, - "The rotated stream inlet must follow its authored orientation.", - ) - _check( - stream_variant.rotated_edge_mask(stream.water_outlet_edges) - == expected_outlet, - "The rotated stream outlet must follow its authored orientation.", - ) - _check( - alternate_variant.rotated_edge_mask( - alternate_stream.water_inlet_edges - ) == expected_inlet - and alternate_variant.rotated_edge_mask( - alternate_stream.water_outlet_edges - ) == expected_outlet, - "The alternate stream connectors must rotate exactly like the original.", - ) - for edge_value: int in TerrainChunkTopology.Edge.values(): - var edge := edge_value as TerrainChunkTopology.Edge - _check( - stream_variant.profile(edge).signature( - TerrainChunkGenerator.CONSTRAINT_PROFILE_QUANTIZATION - ) == alternate_variant.profile(edge).signature( - TerrainChunkGenerator.CONSTRAINT_PROFILE_QUANTIZATION - ), - "Both stream visuals must expose identical terrain edge profiles.", - ) - - var beach := CATALOG.definition_for_id(&"chunk_0002") - _check(beach != null, "The beach definition must be available.") - if beach == null: - return - for quarter_turns: int in 4: - var beach_variant := _find_variant( - generator, - &"chunk_0002", - quarter_turns, - ) - _check( - beach_variant != null, - "The beach must support rotation %d." % quarter_turns, - ) - if beach_variant == null: - continue - var expected_ocean_edge := 1 << int( - TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.EAST, - quarter_turns, - ) - ) - _check( - beach_variant.rotated_edge_mask(beach.ocean_facing_edges) - == expected_ocean_edge, - "The rotated beach must keep its low edge facing the ocean.", - ) - _check( - not generator._variant_respects_ocean_boundary( - beach_variant, - Vector2i(3, 3), - ), - "A beach slope must never direct its low edge into the map.", - ) - var boundary_coordinate := Vector2i(3, 3) - match TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.EAST, - quarter_turns, - ): - TerrainChunkTopology.Edge.NORTH: - boundary_coordinate.y = 0 - TerrainChunkTopology.Edge.EAST: - boundary_coordinate.x = generator.grid_size.x - 1 - TerrainChunkTopology.Edge.SOUTH: - boundary_coordinate.y = generator.grid_size.y - 1 - TerrainChunkTopology.Edge.WEST: - boundary_coordinate.x = 0 - _check( - generator._variant_respects_ocean_boundary( - beach_variant, - boundary_coordinate, - ), - "A beach slope must be legal when its low edge faces open ocean.", - ) - - var grass_ocean_edge := CATALOG.definition_for_id(&"chunk_0005") - var grass_beach_transition := CATALOG.definition_for_id(&"chunk_0006") - var grass_ocean_corner := CATALOG.definition_for_id(&"chunk_0007") - var beach_ocean_corner := CATALOG.definition_for_id(&"chunk_0008") - _check( - ( - grass_ocean_edge != null - and grass_beach_transition != null - and grass_ocean_corner != null - and beach_ocean_corner != null - ), - "The authored coastline additions must be available.", - ) - if ( - grass_ocean_edge == null - or grass_beach_transition == null - or grass_ocean_corner == null - or beach_ocean_corner == null - ): - return - var beach_zero := _find_variant(generator, &"chunk_0002", 0) - var grass_edge_zero := _find_variant(generator, &"chunk_0005", 0) - var grass_edge_south := _find_variant(generator, &"chunk_0005", 3) - var transition_zero := _find_variant(generator, &"chunk_0006", 0) - var corner_zero := _find_variant(generator, &"chunk_0007", 0) - var beach_corner_zero := _find_variant(generator, &"chunk_0008", 0) - _check( - beach_zero != null - and grass_edge_zero != null - and grass_edge_south != null - and transition_zero != null - and corner_zero != null - and beach_corner_zero != null, - "The unrotated coastline variants must be available.", - ) - if ( - beach_zero != null - and grass_edge_zero != null - and grass_edge_south != null - and transition_zero != null - and corner_zero != null - and beach_corner_zero != null - ): - _check( - grass_edge_zero.profile( - TerrainChunkTopology.Edge.EAST - ).points.is_empty(), - "The grass cliff's authored east edge must remain open to ocean.", - ) - _check( - transition_zero.profile( - TerrainChunkTopology.Edge.NORTH - ).matches( - beach_zero.profile(TerrainChunkTopology.Edge.SOUTH), - generator.edge_match_tolerance, - ), - "The transition's north side must match the authored beach.", - ) - _check( - transition_zero.profile( - TerrainChunkTopology.Edge.SOUTH - ).matches( - grass_edge_zero.profile(TerrainChunkTopology.Edge.NORTH), - generator.edge_match_tolerance, - ), - "The transition's south side must match the grass cliff.", - ) - _check( - corner_zero.profile(TerrainChunkTopology.Edge.EAST).points.is_empty() - and corner_zero.profile( - TerrainChunkTopology.Edge.SOUTH - ).points.is_empty(), - "The corner's authored east and south edges must remain open to ocean.", - ) - _check( - corner_zero.profile(TerrainChunkTopology.Edge.NORTH).matches( - grass_edge_zero.profile(TerrainChunkTopology.Edge.SOUTH), - generator.edge_match_tolerance, - ), - "The corner's north side must join a straight grass ocean edge.", - ) - _check( - corner_zero.profile(TerrainChunkTopology.Edge.WEST).matches( - grass_edge_south.profile(TerrainChunkTopology.Edge.EAST), - generator.edge_match_tolerance, - ), - "The corner's west side must join a straight grass ocean edge.", - ) - _check( - beach_corner_zero.profile(TerrainChunkTopology.Edge.NORTH).matches( - beach_zero.profile(TerrainChunkTopology.Edge.SOUTH), - generator.edge_match_tolerance, - ), - "The beach corner's north side must join a straight beach.", - ) - var beach_south := _find_variant(generator, &"chunk_0002", 3) - _check( - beach_south != null - and beach_corner_zero.profile( - TerrainChunkTopology.Edge.WEST - ).matches( - beach_south.profile(TerrainChunkTopology.Edge.EAST), - generator.edge_match_tolerance, - ), - "The beach corner's west side must join a rotated straight beach.", - ) - var cliff_top_zero := _find_variant(generator, &"chunk_0009", 0) - var cliff_edge_zero := _find_variant(generator, &"chunk_0011", 0) - var cliff_edge_south := _find_variant(generator, &"chunk_0011", 3) - var cliff_sea_edge_zero := _find_variant(generator, &"chunk_0014", 0) - var cliff_sea_edge_south := _find_variant(generator, &"chunk_0014", 3) - var cliff_sea_corner_zero := _find_variant(generator, &"chunk_0015", 0) - _check( - cliff_top_zero != null - and cliff_edge_zero != null - and cliff_edge_south != null - and cliff_sea_edge_zero != null - and cliff_sea_edge_south != null - and cliff_sea_corner_zero != null, - "The inland and coastal second-tier cliff variants must be available.", - ) - if ( - cliff_top_zero != null - and cliff_edge_zero != null - and cliff_edge_south != null - and cliff_sea_edge_zero != null - and cliff_sea_edge_south != null - and cliff_sea_corner_zero != null - ): - _check( - cliff_sea_edge_zero.profile( - TerrainChunkTopology.Edge.EAST - ).points.is_empty(), - "The second-tier sea edge must remain open on its ocean side.", - ) - _check( - cliff_sea_corner_zero.profile( - TerrainChunkTopology.Edge.EAST - ).points.is_empty() - and cliff_sea_corner_zero.profile( - TerrainChunkTopology.Edge.SOUTH - ).points.is_empty(), - "The second-tier sea corner must retain both ocean openings.", - ) - _check( - generator._edges_are_compatible( - cliff_sea_edge_zero, - TerrainChunkTopology.Edge.WEST, - cliff_top_zero, - TerrainChunkTopology.Edge.EAST, - ), - "The second-tier sea edge must join the raised grass top inland.", - ) - _check( - generator._edges_are_compatible( - cliff_sea_corner_zero, - TerrainChunkTopology.Edge.NORTH, - cliff_sea_edge_zero, - TerrainChunkTopology.Edge.SOUTH, - ) - and generator._edges_are_compatible( - cliff_sea_corner_zero, - TerrainChunkTopology.Edge.WEST, - cliff_sea_edge_south, - TerrainChunkTopology.Edge.EAST, - ), - "The second-tier sea corner must join two straight sea edges.", - ) - _check( - generator._edges_are_compatible( - cliff_sea_edge_zero, - TerrainChunkTopology.Edge.NORTH, - cliff_edge_zero, - TerrainChunkTopology.Edge.SOUTH, - ) - and generator._edges_are_compatible( - cliff_sea_edge_zero, - TerrainChunkTopology.Edge.SOUTH, - cliff_edge_zero, - TerrainChunkTopology.Edge.NORTH, - ), - ( - "A coastal cliff edge must transition directly into its " - + "inland edge counterpart." - ), - ) - _check( - generator._edges_are_compatible( - cliff_sea_corner_zero, - TerrainChunkTopology.Edge.NORTH, - cliff_edge_zero, - TerrainChunkTopology.Edge.SOUTH, - ) - and generator._edges_are_compatible( - cliff_sea_corner_zero, - TerrainChunkTopology.Edge.WEST, - cliff_edge_south, - TerrainChunkTopology.Edge.EAST, - ), - ( - "A coastal cliff corner must transition directly into " - + "ordinary inland cliff edges." - ), - ) - var flat_grass := _find_variant(generator, &"chunk_0000", 0) - var flat_sand := _find_variant(generator, &"chunk_0001", 0) - _check( - flat_grass != null and flat_sand != null, - "Flat grass and sand variants must be available for seam validation.", - ) - if flat_grass != null and flat_sand != null: - for quarter_turns: int in 4: - var transition := _find_variant( - generator, - &"chunk_0006", - quarter_turns, - ) - if transition == null: - continue - var inland_edge := TerrainChunkTopology.rotated_edge( - TerrainChunkTopology.Edge.WEST, - quarter_turns, - ) - var neighbor_edge := TerrainChunkTopology.opposite_edge(inland_edge) - _check( - generator._edges_are_compatible( - transition, - inland_edge, - flat_grass, - neighbor_edge, - ), - "Every transition rotation must accept grass behind it.", - ) - _check( - not generator._edges_are_compatible( - transition, - inland_edge, - flat_sand, - neighbor_edge, - ), - "No transition rotation may accept sand behind it.", - ) - for quarter_turns: int in 4: - var diagonal := _find_variant( - generator, - &"chunk_0013", - quarter_turns, - ) - _check( - diagonal != null, - "The grass-sand diagonal must support rotation %d." - % quarter_turns, - ) - if diagonal == null: - continue - for source_edge_value: int in TerrainChunkTopology.Edge.values(): - var source_edge := source_edge_value as TerrainChunkTopology.Edge - var edge := TerrainChunkTopology.rotated_edge( - source_edge, - quarter_turns, - ) - var neighbor_edge := TerrainChunkTopology.opposite_edge(edge) - var expects_sand := source_edge in [ - TerrainChunkTopology.Edge.NORTH, - TerrainChunkTopology.Edge.WEST, - ] - var expected := flat_sand if expects_sand else flat_grass - var rejected := flat_grass if expects_sand else flat_sand - _check( - generator._edges_are_compatible( - diagonal, - edge, - expected, - neighbor_edge, - ), - "Each rotated diagonal edge must accept its authored surface.", - ) - _check( - not generator._edges_are_compatible( - diagonal, - edge, - rejected, - neighbor_edge, - ), - "No rotated diagonal edge may accept the opposite surface.", - ) - var lake_diagonal_northwest := _find_variant(generator, &"chunk_0020", 0) - var lake_diagonal_northeast := _find_variant(generator, &"chunk_0020", 3) - var lake_narrow_top := _find_variant(generator, &"chunk_0021", 0) - var lake_narrow_left := _find_variant(generator, &"chunk_0021", 1) - var lake_regular_to_narrow := _find_variant(generator, &"chunk_0022", 0) - var lake_narrow_to_regular := _find_variant(generator, &"chunk_0023", 0) - var lake_regular_top := _find_variant(generator, &"chunk_0017", 3) - var lake_regular_variant_top := _find_variant(generator, &"chunk_0037", 3) - _check( - ( - lake_diagonal_northwest != null - and lake_diagonal_northeast != null - and lake_narrow_top != null - and lake_narrow_left != null - and lake_regular_to_narrow != null - and lake_narrow_to_regular != null - and lake_regular_top != null - and lake_regular_variant_top != null - ), - "Every authored diagonal lake perimeter variant must be available.", - ) - if ( - lake_diagonal_northwest != null - and lake_diagonal_northeast != null - and lake_narrow_top != null - and lake_narrow_left != null - and lake_regular_to_narrow != null - and lake_narrow_to_regular != null - and lake_regular_top != null - and lake_regular_variant_top != null - ): - _check( - lake_regular_variant_top.topology_signature(0.001) - == lake_regular_top.topology_signature(0.001), - "Both regular lake edge visuals must expose identical seams.", - ) - _check( - generator._edges_are_compatible( - lake_diagonal_northwest, - TerrainChunkTopology.Edge.EAST, - lake_narrow_top, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_diagonal_northwest, - TerrainChunkTopology.Edge.SOUTH, - lake_narrow_left, - TerrainChunkTopology.Edge.NORTH, - ), - "Both diagonal banks must join the exact narrow lake profile.", - ) - _check( - generator._edges_are_compatible( - lake_narrow_top, - TerrainChunkTopology.Edge.EAST, - lake_narrow_to_regular, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_narrow_to_regular, - TerrainChunkTopology.Edge.EAST, - lake_regular_top, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_regular_top, - TerrainChunkTopology.Edge.EAST, - lake_regular_to_narrow, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_regular_to_narrow, - TerrainChunkTopology.Edge.EAST, - lake_narrow_top, - TerrainChunkTopology.Edge.WEST, - ), - "The narrow lake run must transition exactly into the regular edge.", - ) - _check( - generator._edges_are_compatible( - lake_diagonal_northwest, - TerrainChunkTopology.Edge.EAST, - lake_narrow_to_regular, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_narrow_to_regular, - TerrainChunkTopology.Edge.EAST, - lake_regular_to_narrow, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - lake_regular_to_narrow, - TerrainChunkTopology.Edge.EAST, - lake_diagonal_northeast, - TerrainChunkTopology.Edge.WEST, - ), - "The five-chunk lake side must remain valid without a narrow run.", - ) - var river_cap_northwest := _find_variant(generator, &"chunk_9995", 0) - var river_cap_northeast := _find_variant(generator, &"chunk_9995", 3) - var river_cap_southwest := _find_variant(generator, &"chunk_9995", 1) - var river_cap_southeast := _find_variant(generator, &"chunk_9995", 2) - var river_edge_top := _find_variant(generator, &"chunk_0024", 0) - var river_edge_variant_top := _find_variant(generator, &"chunk_0025", 0) - 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) - var river_outlet_left := _find_variant(generator, &"chunk_0032", 0) - var river_bend_a := _find_variant(generator, &"chunk_0035", 0) - var river_bend_b := _find_variant(generator, &"chunk_0034", 0) - var river_bend_c := _find_variant(generator, &"chunk_0033", 2) - var river_bend_d := _find_variant(generator, &"chunk_0036", 0) - var beach_east := _find_variant(generator, &"chunk_0002", 0) - var canonical_bend_specs := generator._river_bend_placement_specs( - Vector2i(5, 5), - 0, - ) - var rotated_bend_specs := generator._river_bend_placement_specs( - Vector2i(5, 5), - 1, - ) - _check( - ( - canonical_bend_specs.size() == 4 - and canonical_bend_specs[2]["id"] == &"chunk_0033" - and int(canonical_bend_specs[2]["turns"]) == 2 - and rotated_bend_specs.size() == 4 - and rotated_bend_specs[2]["id"] == &"chunk_0033" - and int(rotated_bend_specs[2]["turns"]) == 3 - ), - "River bend C must retain its authored half-turn at every bend rotation.", - ) - _check( - ( - river_cap_northwest != null - and river_cap_northeast != null - and river_cap_southwest != null - and river_cap_southeast != null - and river_edge_top != null - and river_edge_variant_top != null - 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 - and river_outlet_left != null - and river_bend_a != null - and river_bend_b != null - and river_bend_c != null - and river_bend_d != null - and beach_east != null - ), - ( - "Every authored river-bank, bend, source, outlet, and legacy-cap " - + "variant must be available." - ), - ) - if ( - river_cap_northwest != null - and river_cap_northeast != null - and river_cap_southwest != null - and river_cap_southeast != null - and river_edge_top != null - and river_edge_variant_top != null - 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 - and river_outlet_left != null - and river_bend_a != null - and river_bend_b != null - and river_bend_c != null - 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, - TerrainChunkTopology.Edge.SOUTH, - river_source_left, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_source_right, - TerrainChunkTopology.Edge.EAST, - river_edge_top, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_source_left, - TerrainChunkTopology.Edge.EAST, - river_edge_variant_bottom, - TerrainChunkTopology.Edge.WEST, - ), - "The paired cliff source must open directly into both river banks.", - ) - _check( - generator._edges_are_compatible( - river_bend_a, - TerrainChunkTopology.Edge.EAST, - river_bend_b, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_bend_a, - TerrainChunkTopology.Edge.SOUTH, - river_bend_c, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_bend_b, - TerrainChunkTopology.Edge.SOUTH, - river_bend_d, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_bend_c, - TerrainChunkTopology.Edge.EAST, - river_bend_d, - TerrainChunkTopology.Edge.WEST, - ), - "The four authored river-bend quadrants must form one continuous turn.", - ) - _check( - generator._edges_are_compatible( - river_edge_top, - TerrainChunkTopology.Edge.EAST, - river_bend_a, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_edge_variant_bottom, - TerrainChunkTopology.Edge.EAST, - river_bend_c, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_bend_c, - TerrainChunkTopology.Edge.SOUTH, - river_edge_vertical_left, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_bend_d, - TerrainChunkTopology.Edge.SOUTH, - river_edge_vertical_right, - TerrainChunkTopology.Edge.NORTH, - ), - "The bend must connect both incoming and outgoing authored river banks.", - ) - _check( - generator._edges_are_compatible( - river_edge_top, - TerrainChunkTopology.Edge.EAST, - river_outlet_right, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_edge_variant_bottom, - TerrainChunkTopology.Edge.EAST, - river_outlet_left, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_outlet_right, - TerrainChunkTopology.Edge.SOUTH, - river_outlet_left, - TerrainChunkTopology.Edge.NORTH, - ), - "Both river banks must terminate in the paired beach outlet.", - ) - _check( - generator._edges_are_compatible( - beach_east, - TerrainChunkTopology.Edge.SOUTH, - river_outlet_right, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_outlet_left, - TerrainChunkTopology.Edge.SOUTH, - beach_east, - TerrainChunkTopology.Edge.NORTH, - ), - "The ocean outlet must remain straddled by ordinary beach tiles.", - ) - _check( - generator._edges_are_compatible( - river_cap_northwest, - TerrainChunkTopology.Edge.EAST, - river_edge_top, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_edge_top, - TerrainChunkTopology.Edge.EAST, - river_edge_variant_top, - TerrainChunkTopology.Edge.WEST, - ) - and generator._edges_are_compatible( - river_edge_variant_top, - TerrainChunkTopology.Edge.EAST, - river_cap_northeast, - TerrainChunkTopology.Edge.WEST, - ), - "Both river-bank visuals must chain exactly between composite caps.", - ) - _check( - generator._edges_are_compatible( - river_cap_northwest, - TerrainChunkTopology.Edge.SOUTH, - river_cap_southwest, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_edge_top, - TerrainChunkTopology.Edge.SOUTH, - river_edge_variant_bottom, - TerrainChunkTopology.Edge.NORTH, - ) - and generator._edges_are_compatible( - river_cap_northeast, - TerrainChunkTopology.Edge.SOUTH, - river_cap_southeast, - TerrainChunkTopology.Edge.NORTH, - ), - "Opposing river banks and end caps must close the water channel.", - ) - for stable_id: StringName in [ - &"chunk_0005", - &"chunk_0006", - &"chunk_0007", - &"chunk_0008", - &"chunk_0014", - &"chunk_0015", - &"chunk_9999", - &"chunk_9998", - &"chunk_9997", - &"chunk_9996", - ]: - for quarter_turns: int in 4: - var coast_variant := _find_variant( - generator, - stable_id, - quarter_turns, - ) - _check( - coast_variant != null, - "%s must support rotation %d." % [stable_id, quarter_turns], - ) - if coast_variant == null: - continue - _check( - not generator._variant_respects_ocean_boundary( - coast_variant, - Vector2i(3, 3), - ), - "%s must never place its ocean edge inside the map." % stable_id, - ) - var coast_definition := CATALOG.definition_for_id(stable_id) - if coast_definition == null: - continue - var boundary_coordinate := Vector2i(3, 3) - var ocean_edges := coast_variant.rotated_edge_mask( - coast_definition.ocean_facing_edges - ) - for edge_value: int in TerrainChunkTopology.Edge.values(): - if (ocean_edges & (1 << edge_value)) == 0: - continue - match edge_value as TerrainChunkTopology.Edge: - TerrainChunkTopology.Edge.NORTH: - boundary_coordinate.y = 0 - TerrainChunkTopology.Edge.EAST: - boundary_coordinate.x = generator.grid_size.x - 1 - TerrainChunkTopology.Edge.SOUTH: - boundary_coordinate.y = generator.grid_size.y - 1 - TerrainChunkTopology.Edge.WEST: - boundary_coordinate.x = 0 - _check( - generator._variant_respects_ocean_boundary( - coast_variant, - boundary_coordinate, - ), - "Each coast rotation must fit its matching open map boundary.", - ) - - -func _validate_generation_summary(generator: TerrainChunkGenerator) -> void: - var summary := generator._build_summary() - _check( - int(summary.get("variant_count", 0)) == 174, - "The current catalog must expose all 174 authored rotations.", - ) - _check( - int(summary.get("solver_variant_count", 0)) - == EXPECTED_SOLVER_VARIANT_COUNT, - "Equivalent visual rotations must share one solver constraint.", - ) - _check( - int(summary.get("adjacent_repeat_edges", -1)) - == generator._count_adjacent_repeat_edges(), - "The summary must report adjacent repeated chunk definitions.", - ) - _check( - str(summary.get("layout_fingerprint", "")) - == generator.placement_fingerprint(), - "The summary must identify the exact resolved layout.", - ) - _check( - generator.placement_fingerprint().length() == 64, - "The resolved layout fingerprint must be SHA-256.", - ) - var variant_counts: Dictionary = summary.get("variant_counts", {}) - for stable_id: StringName in EXPECTED_VARIANT_COUNTS: - _check( - int(variant_counts.get(stable_id, 0)) - == EXPECTED_VARIANT_COUNTS[stable_id], - "The summary must report %s rotation candidates." % stable_id, - ) - - -func _find_variant( - generator: TerrainChunkGenerator, - stable_id: StringName, - quarter_turns: int, -) -> TerrainChunkVariant: - for variant: TerrainChunkVariant in generator._variants: - if ( - variant.definition.stable_id == stable_id - and variant.quarter_turns == quarter_turns - ): - return variant - return null - - -func _make_generator() -> TerrainChunkGenerator: - var generator := TerrainChunkGenerator.new() - generator.catalog = CATALOG - generator.grid_size = Vector2i(9, 9) - generator.generation_seed = TEST_SEED - generator.generate_on_ready = false - generator.build_collision = false - generator.force_center_chunk_id = &"chunk_spawn" - generator.required_chunk_ids = PackedStringArray(REQUIRED_IDS) - generator.grass_sand_smoothing_enabled = true - generator.maximum_backtracks = 100000 - return generator - - -func _placements_contain(keys: PackedStringArray, stable_id: String) -> bool: - for key: String in keys: - if key.begins_with(stable_id + "@"): - return true - return false - - -func _count_placements(keys: PackedStringArray, stable_id: String) -> int: - var count := 0 - for key: String in keys: - if key.begins_with(stable_id + "@"): - count += 1 - return count - - -func _all_neighbor_edges_match(generator: TerrainChunkGenerator) -> bool: - for index: int in generator._placements.size(): - var coordinate := Vector2i( - index % generator.grid_size.x, - index / generator.grid_size.x, - ) - var current: TerrainChunkVariant = generator._placements[index] - if coordinate.x > 0: - var west: TerrainChunkVariant = generator._placements[index - 1] - if not generator._edges_are_compatible( - current, - TerrainChunkTopology.Edge.WEST, - west, - TerrainChunkTopology.Edge.EAST, - ): - return false - if coordinate.y > 0: - var north: TerrainChunkVariant = ( - generator._placements[index - generator.grid_size.x] - ) - if not generator._edges_are_compatible( - current, - TerrainChunkTopology.Edge.NORTH, - north, - TerrainChunkTopology.Edge.SOUTH, - ): - return false - return true - - -func _validate_layout_rules(generator: TerrainChunkGenerator) -> void: - _check( - generator._neighbor_requirement_validation_error( - generator._placements - ).is_empty(), - "Every generated chunk must satisfy its authored neighbor count.", - ) - _check( - generator._walkable_connectivity_validation_error( - generator._placements - ).is_empty(), - "All walkable generated terrain must remain connected to spawn.", - ) - var center := Vector2i( - generator.grid_size.x / 2, - generator.grid_size.y / 2, - ) - var safe_spawn_neighbors := 0 - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - center - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - var neighbor := generator._placements[ - neighbor_coordinate.y * generator.grid_size.x - + neighbor_coordinate.x - ] - if "spawn_safe" in neighbor.definition.tags: - safe_spawn_neighbors += 1 - _check( - safe_spawn_neighbors >= 3, - "At least three cardinal spawn neighbors must be safe flat grass.", - ) - for index: int in generator._placements.size(): - var placement := generator._placements[index] - var coordinate := Vector2i( - index % generator.grid_size.x, - index / generator.grid_size.x, - ) - if "coast" in placement.definition.tags: - _check( - generator._variant_respects_ocean_boundary( - placement, - coordinate, - ), - "Every coastline chunk must direct its ocean edge outside the grid.", - ) - var ocean_edges := placement.rotated_edge_mask( - placement.definition.ocean_facing_edges - ) - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - var outside := not generator._coordinate_is_inside_grid( - neighbor_coordinate - ) - _check( - ((ocean_edges & (1 << edge_value)) != 0) == outside, - "Every map-boundary edge must use authored coastline geometry.", - ) - if placement.definition.stable_id == &"chunk_0006": - var touches_beach := false - var touches_grass_edge := false - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - if not generator._coordinate_is_inside_grid(neighbor_coordinate): - continue - var neighbor := generator._placements[ - neighbor_coordinate.y * generator.grid_size.x - + neighbor_coordinate.x - ] - touches_beach = ( - touches_beach - or neighbor.definition.stable_id == &"chunk_0002" - ) - touches_grass_edge = ( - touches_grass_edge - or neighbor.definition.stable_id == &"chunk_0005" - ) - _check( - touches_beach and touches_grass_edge, - "Every grass/beach transition must join both authored edge types.", - ) - if placement.definition.stable_id == &"chunk_0007": - var straight_edge_neighbors := 0 - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - if not generator._coordinate_is_inside_grid(neighbor_coordinate): - continue - var neighbor := generator._placements[ - neighbor_coordinate.y * generator.grid_size.x - + neighbor_coordinate.x - ] - if neighbor.definition.stable_id == &"chunk_0005": - straight_edge_neighbors += 1 - _check( - straight_edge_neighbors == 2, - "Every grass corner must join two straight grass ocean edges.", - ) - if placement.definition.stable_id == &"chunk_0008": - var straight_beach_neighbors := 0 - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - if not generator._coordinate_is_inside_grid(neighbor_coordinate): - continue - var neighbor := generator._placements[ - neighbor_coordinate.y * generator.grid_size.x - + neighbor_coordinate.x - ] - if neighbor.definition.stable_id == &"chunk_0002": - straight_beach_neighbors += 1 - _check( - straight_beach_neighbors == 2, - "Every beach corner must join two straight beach ocean edges.", - ) - if placement.definition.stable_id != &"chunk_0001": - continue - var touches_sand_or_coast := false - for edge_value: int in TerrainChunkTopology.Edge.values(): - var neighbor_coordinate := ( - coordinate - + TerrainChunkTopology.grid_offset( - edge_value as TerrainChunkTopology.Edge - ) - ) - if not generator._coordinate_is_inside_grid(neighbor_coordinate): - continue - var neighbor := generator._placements[ - neighbor_coordinate.y * generator.grid_size.x - + neighbor_coordinate.x - ] - if ( - "sand" in neighbor.definition.tags - or "coast" in neighbor.definition.tags - ): - touches_sand_or_coast = true - _check( - touches_sand_or_coast, - "Every flat-sand chunk must remain attached to sand or coast.", - ) - - -func _check(condition: bool, message: String) -> void: - if not condition: - _failures.append(message) - - -func _finish() -> void: - if _failures.is_empty(): - print("Terrain chunk generator validation: PASS") - quit(0) - return - for failure: String in _failures: - printerr("Terrain chunk generator validation: ", failure) - quit(1) diff --git a/tests/terrain_chunk_generator_validation.gd.uid b/tests/terrain_chunk_generator_validation.gd.uid deleted file mode 100644 index d13a22b..0000000 --- a/tests/terrain_chunk_generator_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bt6pjgkomx76s diff --git a/tests/texture_sampling_validation.gd b/tests/texture_sampling_validation.gd index dcccc38..deeabce 100644 --- a/tests/texture_sampling_validation.gd +++ b/tests/texture_sampling_validation.gd @@ -1,11 +1,6 @@ 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] = [] @@ -88,14 +83,9 @@ 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" in source) == expects_mipmaps, - ( - "Projected terrain mipmap policy mismatch: %s" - if expects_mipmaps - else "Texture import generates unapproved mipmaps: %s" - ) % path, + "mipmaps/generate=true" not in source, + "Texture import generates mipmaps: %s" % path, ) diff --git a/tests/title_credits_validation.gd b/tests/title_credits_validation.gd index e5ac4cc..abee11e 100644 --- a/tests/title_credits_validation.gd +++ b/tests/title_credits_validation.gd @@ -21,10 +21,6 @@ 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 @@ -38,32 +34,9 @@ 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 action uses its icon in the square-button presentation", + "credits bubble uses its authored icon", ) _expect(credits_page != null, "title screen contains the credits page") _expect(not credits_page.visible, "credits page starts closed") @@ -71,39 +44,29 @@ func _run() -> void: Rect2(Vector2.ZERO, bubble_field.size).encloses( Rect2(credits_button.position, credits_button.size) ), - "credits button stays inside the authored title field", + "credits bubble stays inside the authored title field", ) _expect( credits_button.mouse_filter == Control.MOUSE_FILTER_STOP, - "credits button accepts pointer input", + "credits bubble accepts pointer input", ) - if OS.has_environment("straywild_TITLE_MENU_CAPTURE"): + if OS.has_environment("NETFISHING_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("straywild_TITLE_MENU_CAPTURE") + OS.get_environment("NETFISHING_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", @@ -117,11 +80,11 @@ func _run() -> void: back_button.mouse_filter == Control.MOUSE_FILTER_STOP, "credits back button accepts pointer clicks", ) - if OS.has_environment("straywild_CREDITS_CAPTURE"): + if OS.has_environment("NETFISHING_CREDITS_CAPTURE"): await process_frame _expect( _save_capture( - OS.get_environment("straywild_CREDITS_CAPTURE") + OS.get_environment("NETFISHING_CREDITS_CAPTURE") ) == OK, "credits validation capture saves successfully", ) @@ -134,30 +97,6 @@ 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() @@ -195,7 +134,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 button", + "navigation return restores focus to the credits bubble", ) var chillnfill_name := credits_page.get_node( @@ -210,6 +149,18 @@ func _run() -> void: var chillnfill_credit := credits_page.get_node( "Paper/Margin/Layout/Columns/CreativeCredits/ChillnfillCredit" ) as Label + var adamantris_name := credits_page.get_node( + "Paper/Margin/Layout/Columns/CreativeCredits/AdamantrisName" + ) as Label + var adamantris_credit := credits_page.get_node( + "Paper/Margin/Layout/Columns/CreativeCredits/AdamantrisCredit" + ) as Label + var tekgator_name := credits_page.get_node( + "Paper/Margin/Layout/Columns/CreativeCredits/TekgatorName" + ) as Label + var tekgator_credit := credits_page.get_node( + "Paper/Margin/Layout/Columns/CreativeCredits/TekgatorCredit" + ) as Label var credits_paper := credits_page.get_node("Paper") as PanelContainer var audio_credits := credits_page.get_node( "Paper/Margin/Layout/Columns/AdditionalCredits/AudioCredits" @@ -228,18 +179,35 @@ func _run() -> void: "in-game credits describe the supplied model families", ) _expect( - "kat • animalese source recording" in audio_credits.text, - "in-game credits name kat's animalese source contribution", + adamantris_name.text == "adamantris", + "in-game credits name adamantris", ) _expect( - "kim • animalese source recording" in audio_credits.text, - "in-game credits name kim's animalese source contribution", + "hand-net model" in adamantris_credit.text.to_lower() + and "texture artwork" in adamantris_credit.text.to_lower(), + "in-game credits describe adamantris's hand-net contribution", + ) + _expect( + tekgator_name.text == "Tekgator", + "in-game credits name Tekgator", + ) + _expect( + "shop icon" in tekgator_credit.text.to_lower(), + "in-game credits describe Tekgator's shop icon artwork", + ) + _expect( + "kat • animalese voice sample" in audio_credits.text, + "in-game credits name kat's animalese voice contribution", + ) + _expect( + "kim • animalese voice sample" in audio_credits.text, + "in-game credits name kim's animalese voice contribution", ) _expect( credits_paper.get_global_rect().encloses( - audio_credits.get_global_rect() + tekgator_credit.get_global_rect() ), - "audio credits stay inside the authored credits panel", + "contributor credits stay inside the authored credits panel", ) title_screen.queue_free() diff --git a/tests/tree_gathering_prototype_validation.gd b/tests/tree_gathering_prototype_validation.gd index 2814e19..d97f67e 100644 --- a/tests/tree_gathering_prototype_validation.gd +++ b/tests/tree_gathering_prototype_validation.gd @@ -7,9 +7,6 @@ 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: @@ -18,7 +15,6 @@ 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() @@ -36,74 +32,11 @@ 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.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(is_equal_approx(beetle.sprite_pixel_size, 0.005)) 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) @@ -128,7 +61,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.0075)) + assert(is_equal_approx(sprite.pixel_size, 0.005)) 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 6e6182a..b9e8bce 100644 --- a/tests/ui_scaling_runtime_validation.gd +++ b/tests/ui_scaling_runtime_validation.gd @@ -66,6 +66,12 @@ 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) @@ -159,6 +165,26 @@ 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 @@ -284,13 +310,13 @@ func _run() -> void: chat_panel.position.x * effective_scale, ] ) - if OS.has_environment("straywild_UI_SCALE_CAPTURE"): + if OS.has_environment("NETFISHING_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("straywild_UI_SCALE_CAPTURE"), + OS.get_environment("NETFISHING_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 6928969..dacc5a0 100644 --- a/tests/unified_inventory_validation.gd +++ b/tests/unified_inventory_validation.gd @@ -35,41 +35,6 @@ 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) @@ -97,7 +62,6 @@ 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( @@ -142,53 +106,8 @@ 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 @@ -198,14 +117,6 @@ 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_multiplayer_validation.gd b/tests/world_layout_multiplayer_validation.gd deleted file mode 100644 index 51e7be6..0000000 --- a/tests/world_layout_multiplayer_validation.gd +++ /dev/null @@ -1,126 +0,0 @@ -extends SceneTree - -const MainScene: PackedScene = preload("res://main/main.tscn") -const TEST_PORT: int = 18155 -const TEST_SEED: int = 86421357 - - -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("World layout multiplayer 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 save_manager := main.get("_save_manager") as PlayerSaveManager - assert(bool(main.call( - "_apply_world", - WorldLayout.STARTER_ISLAND, - TEST_SEED, - true, - ))) - assert(bool(main.call( - "_prepare_host_world", - WorldLayout.STARTER_ISLAND, - TEST_SEED, - ))) - assert(save_manager.initialize_new_game( - TEST_SEED, - WorldLayout.STARTER_ISLAND, - )) - assert(session.start_private_host(TEST_PORT)) - main.call("_enter_gameplay") - assert(session.set_host_open(true)) - var remote_peer_id: int = await _wait_for_remote_peer(session) - assert(remote_peer_id > 1) - assert(session.peer_supports_capability( - remote_peer_id, - NetworkProtocol.WORLD_LAYOUT_CAPABILITY, - )) - 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("World layout 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 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()) - assert(session.supports_server_capability( - NetworkProtocol.WORLD_LAYOUT_CAPABILITY - )) - var metadata: Dictionary = session.get_last_server_metadata() - assert(str(metadata.get("world_layout", "")) == String( - WorldLayout.STARTER_ISLAND - )) - assert(int(metadata.get("world_seed", 0)) == TEST_SEED) - var world := main.get("_test_world") as TestWorld - assert(world.get_world_layout() == WorldLayout.STARTER_ISLAND) - assert(world.get_generation_seed() == TEST_SEED) - assert(world.get_node_or_null("Regions/StarterIslandRegion") != null) - assert(world.get_fishing_shop() != null) - assert(world.get_player_storage() != null) - print("World layout 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_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 _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/world_layout_multiplayer_validation.gd.uid b/tests/world_layout_multiplayer_validation.gd.uid deleted file mode 100644 index e666cb2..0000000 --- a/tests/world_layout_multiplayer_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bg52pbgv5ykjc diff --git a/tests/world_layout_validation.gd b/tests/world_layout_validation.gd deleted file mode 100644 index e6eec39..0000000 --- a/tests/world_layout_validation.gd +++ /dev/null @@ -1,159 +0,0 @@ -extends SceneTree - -const TestWorldScene: PackedScene = preload("res://world/test_world.tscn") -const SetupPageScene: PackedScene = preload( - "res://ui/new_game_setup_page.tscn" -) - - -func _initialize() -> void: - call_deferred("_run") - - -func _run() -> void: - root.size = Vector2i(1280, 720) - _validate_layout_values() - await _validate_setup_page() - await _validate_world_switching() - _validate_network_metadata() - print("World layout validation: PASS") - quit() - - -func _validate_layout_values() -> void: - assert(WorldLayout.is_valid(WorldLayout.GENERATED)) - assert(WorldLayout.is_valid(String(WorldLayout.STARTER_ISLAND))) - assert(not WorldLayout.is_valid(&"unknown")) - assert(WorldLayout.normalized("unknown") == WorldLayout.GENERATED) - assert(WorldLayout.display_name(WorldLayout.STARTER_ISLAND) == "starter island") - - -func _validate_setup_page() -> void: - assert(NewGameSetupPage.parse_seed_text(" 24680 ") == 24680) - assert(NewGameSetupPage.parse_seed_text("0") == 0) - assert(NewGameSetupPage.parse_seed_text("2147483647") == 0) - assert(NewGameSetupPage.parse_seed_text("") == 0) - var text_seed: int = NewGameSetupPage.parse_seed_text("voyager island") - assert(text_seed > 0 and text_seed <= PlayerSaveManager.MAX_WORLD_SEED) - assert(NewGameSetupPage.parse_seed_text(" voyager island ") == text_seed) - assert(NewGameSetupPage.parse_seed_text("voyager island") == text_seed) - assert(NewGameSetupPage.parse_seed_text("Voyager Island") != text_seed) - var page := SetupPageScene.instantiate() as NewGameSetupPage - root.add_child(page) - await process_frame - page.open_page(true) - await process_frame - assert(page.visible) - var paper := page.get_node("%Paper") as PanelContainer - assert(paper.get_combined_minimum_size().x <= paper.size.x) - assert(paper.get_combined_minimum_size().y <= paper.size.y) - assert(page.get_selected_world_layout() == WorldLayout.GENERATED) - assert(page.get_selected_world_seed() > 0) - assert((page.get_node("%OverwriteWarning") as Label).visible) - var generated_button := page.get_node("%GeneratedButton") as Button - var starter_button := page.get_node("%StarterButton") as Button - var random_button := page.get_node("%RandomSeedButton") as Button - var custom_button := page.get_node("%CustomSeedButton") as Button - var seed_edit := page.get_node("%SeedEdit") as LineEdit - var start_button := page.get_node("%StartButton") as Button - var back_button := page.get_node("%BackButton") as Button - assert(generated_button.get_node(generated_button.focus_neighbor_right) == starter_button) - assert(generated_button.get_node(generated_button.focus_neighbor_bottom) == random_button) - assert(random_button.get_node(random_button.focus_neighbor_right) == custom_button) - assert(start_button.get_node(start_button.focus_neighbor_right) == back_button) - page.call("_choose_custom_seed") - assert(seed_edit.editable) - assert(custom_button.get_node(custom_button.focus_neighbor_bottom) == seed_edit) - assert(seed_edit.get_node(seed_edit.focus_neighbor_bottom) == start_button) - page.call("_set_world_layout", WorldLayout.STARTER_ISLAND) - assert(not (page.get_node("%SeedSection") as Control).visible) - var request: Dictionary = {} - page.start_requested.connect(func(layout: StringName, seed: int) -> void: - request["layout"] = layout - request["seed"] = seed - ) - page.call("_request_start") - assert(request.get("layout") == WorldLayout.STARTER_ISLAND) - assert(int(request.get("seed", 0)) > 0) - page.queue_free() - await process_frame - - -func _validate_world_switching() -> void: - var world := TestWorldScene.instantiate() as TestWorld - 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) - assert(world.activate_world(WorldLayout.STARTER_ISLAND, 13579)) - assert(world.get_world_layout() == WorldLayout.STARTER_ISLAND) - assert(world.get_generation_seed() == 13579) - assert(world.get_node_or_null("Regions/StarterIslandRegion") != null) - assert(world.get_node_or_null("Regions/GeneratedWorldRegion") == null) - 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) - assert(world.get_node_or_null("Regions/GeneratedWorldRegion") != null) - assert(world.get_node_or_null("Regions/StarterIslandRegion") == null) - world.queue_free() - await process_frame - - -func _validate_world_boundary_clearance(world: TestWorld) -> void: - var active_region := world.get("_active_region") as WorldRegion - assert(active_region != null) - var half := active_region.get_playable_half_extents() - var north := world.get_node("WorldBounds/North") as StaticBody3D - var south := world.get_node("WorldBounds/South") as StaticBody3D - var west := world.get_node("WorldBounds/West") as StaticBody3D - var east := world.get_node("WorldBounds/East") as StaticBody3D - var fishing_defaults := FishingSpot.new() - assert( - TestWorld.WORLD_BOUNDARY_SHORELINE_CLEARANCE - > fishing_defaults.maximum_cast_distance + 1.0 - ) - fishing_defaults.free() - assert(north.position.z - half.y >= 18.0) - assert(-south.position.z - half.y >= 18.0) - assert(-west.position.x - half.x >= 18.0) - assert(east.position.x - half.x >= 18.0) - - -func _validate_network_metadata() -> void: - var hello: Dictionary = NetworkProtocol.make_server_hello( - true, - NetworkProtocol.RejectionCode.NONE, - "session", - 2, - 1, - 16, - "room", - 97531, - WorldLayout.STARTER_ISLAND, - ) - assert(str(hello.get("world_layout", "")) == String( - WorldLayout.STARTER_ISLAND - )) - assert(int(hello.get("world_seed", 0)) == 97531) - assert( - NetworkProtocol.WORLD_LAYOUT_CAPABILITY - in PackedStringArray(hello.get("capability_flags", [])) - ) diff --git a/tests/world_layout_validation.gd.uid b/tests/world_layout_validation.gd.uid deleted file mode 100644 index 9002c58..0000000 --- a/tests/world_layout_validation.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bgxgyqq73sdpi diff --git a/tests/world_spawn_multiplayer_validation.gd b/tests/world_spawn_multiplayer_validation.gd index f5ffd2e..c2b4101 100644 --- a/tests/world_spawn_multiplayer_validation.gd +++ b/tests/world_spawn_multiplayer_validation.gd @@ -2,10 +2,9 @@ extends SceneTree const MainScene: PackedScene = preload("res://main/main.tscn") const TEST_PORT: int = 18170 -const EXPECTED_POPULATION: int = 12 +const EXPECTED_POPULATION: int = 8 const EXPECTED_BY_TYPE: Dictionary = { &"crab_brown": 2, - &"crab_blue": 4, &"clam_manila": 3, &"beetle_stag_common": 3, } @@ -39,10 +38,6 @@ 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)) @@ -162,10 +157,6 @@ 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)) @@ -201,10 +192,7 @@ func _validate_respawn_budget(service: Node) -> void: false, true, ) - assert( - (service.get("_entities") as Dictionary).size() - == EXPECTED_POPULATION - crab_ids.size() - ) + assert((service.get("_entities") as Dictionary).size() == 6) var now: float = Time.get_ticks_msec() / 1000.0 var respawns: Array = service.get("_respawns") @@ -217,27 +205,18 @@ func _validate_respawn_budget(service: Node) -> void: respawns[index] = respawn service.call("_update_respawns") - assert( - (service.get("_entities") as Dictionary).size() - == EXPECTED_POPULATION - 1 - ) + assert((service.get("_entities") as Dictionary).size() == 7) 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() - == EXPECTED_POPULATION - 1 - ) + assert((service.get("_entities") as Dictionary).size() == 7) 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() - == EXPECTED_POPULATION - ) + assert((service.get("_entities") as Dictionary).size() == 8) 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 e300808..11d2ac7 100644 --- a/tests/world_spawn_protocol_validation.gd +++ b/tests/world_spawn_protocol_validation.gd @@ -16,18 +16,14 @@ const CalendarSeasonType = preload("res://world/calendar_season.gd") func _initialize() -> void: - call_deferred(&"_run") - - -func _run() -> void: - assert(NetworkProtocol.PROTOCOL_VERSION == 12) + assert(NetworkProtocol.PROTOCOL_VERSION == 8) assert( NetworkWorldSpawnProtocol.CAPABILITY == NetworkProtocol.WORLD_SPAWN_CAPABILITY ) assert(NetworkWorldSpawnProtocol.SNAPSHOT_ENTITIES_PER_ENVELOPE <= 4) _validate_catalog_statuses() - await _validate_billboard_presentation() + _validate_billboard_presentation() _validate_envelopes() print("World spawn protocol validation: PASS") quit() @@ -55,17 +51,6 @@ 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") @@ -88,8 +73,6 @@ 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) @@ -97,27 +80,11 @@ func _validate_catalog_statuses() -> void: assert(FishCatalog.get_fish_by_id(&"beetle_stag_common") == beetle.catch_data) assert(not beetle.catch_data.is_fishable()) - 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"]: + for type_id: StringName in [ + &"crab_ghost", + &"crab_blue", + &"crab_dungeness", + ]: var entry: GatherableData = Gatherables.get_entry(type_id) assert(entry != null) assert(entry.is_valid()) @@ -136,9 +103,8 @@ func _validate_catalog_statuses() -> void: ) var available: Array[GatherableData] = Gatherables.get_available_entries() - assert(available.size() == 4) + assert(available.size() == 3) assert(available.has(brown)) - assert(available.has(blue)) assert(available.has(clam)) assert(available.has(beetle)) var winter_available: Array[GatherableData] = ( @@ -146,7 +112,6 @@ 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 @@ -181,27 +146,8 @@ 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() - 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)) + hotspot.call("_ensure_water_spurt_visual") var hole := hotspot.get_node("WaterSpurt/BurrowMark") as MeshInstance3D assert(hole != null) assert(hole.cast_shadow == GeometryInstance3D.SHADOW_CASTING_SETTING_OFF) @@ -210,18 +156,6 @@ 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 635ad4f..114a15b 100644 --- a/tests/world_time_multiplayer_validation.gd +++ b/tests/world_time_multiplayer_validation.gd @@ -30,10 +30,6 @@ 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( @@ -136,14 +132,8 @@ func _run_client() -> void: var calendar_panel := ( chat_ui.get_node("WorldCalendarPanel") as PanelContainer ) - var calendar_row := ( - calendar_panel.get_node("WorldCalendarRow") as HBoxContainer - ) var calendar_label := ( - calendar_row.get_node("WorldCalendarLabel") as Label - ) - var calendar_balance := ( - calendar_row.get_node("WorldCalendarBalance") as CurrencyAmount + calendar_panel.get_node("WorldCalendarLabel") as Label ) var weather_icon := chat_ui.get_node("WorldWeatherIcon") as WeatherIcon var chat_panel := chat_ui.get_node("ChatPanel") as PanelContainer @@ -153,15 +143,6 @@ func _run_client() -> void: assert(calendar_panel.visible) assert(calendar_label.text == world_time.get_calendar_text()) assert(not calendar_label.text.is_empty()) - assert( - calendar_label.horizontal_alignment - == HORIZONTAL_ALIGNMENT_LEFT - ) - assert(calendar_label.size_flags_horizontal == Control.SIZE_EXPAND_FILL) - var player := chat_ui.get("_player") as Player - assert(calendar_balance.amount == player.wallet.get_balance()) - assert(player.wallet.credit(1)) - assert(calendar_balance.amount == player.wallet.get_balance()) assert(weather_icon.visible) assert(weather_icon.get_weather() == WorldWeatherService.Weather.RAINY) assert(is_equal_approx(clock_panel.position.y, 10.0)) diff --git a/tests/world_time_validation.gd b/tests/world_time_validation.gd index 3caea2b..b0b36a1 100644 --- a/tests/world_time_validation.gd +++ b/tests/world_time_validation.gd @@ -200,15 +200,13 @@ func _validate_system_clock_authority() -> void: func _validate_fishing_availability() -> void: var day_context := FishingContextType.new() - # Cover both freshwater habitat families so this test isolates time-of-day - # gating from the separate pond-versus-river availability rules. - day_context.location_tags = [&"starter_pond", &"river"] + day_context.location_tags = [&"starter_pond"] day_context.is_night = false var night_context := FishingContextType.new() - night_context.location_tags = [&"starter_pond", &"river"] + night_context.location_tags = [&"starter_pond"] night_context.is_night = true var transition_context := FishingContextType.new() - transition_context.location_tags = [&"starter_pond", &"river"] + transition_context.location_tags = [&"starter_pond"] transition_context.is_night = true transition_context.is_day_night_transition = true @@ -304,7 +302,7 @@ func _validate_environment_presentation() -> void: var sky := Sky.new() var sky_material := ShaderMaterial.new() sky_material.shader = preload( - "res://world/environment/straywild_sky.gdshader" + "res://world/environment/netfishing_sky.gdshader" ) sky.sky_material = sky_material environment.sky = sky @@ -352,7 +350,7 @@ func _validate_environment_presentation() -> void: "res://world/materials/stylized_water.gdshader" ) var sky_shader: Shader = preload( - "res://world/environment/straywild_sky.gdshader" + "res://world/environment/netfishing_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 7bc5114..c346e93 100644 --- a/tests/world_weather_validation.gd +++ b/tests/world_weather_validation.gd @@ -10,9 +10,6 @@ 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") @@ -283,7 +280,7 @@ func _validate_weather_presentation() -> void: var sky := Sky.new() var sky_material := ShaderMaterial.new() sky_material.shader = preload( - "res://world/environment/straywild_sky.gdshader" + "res://world/environment/netfishing_sky.gdshader" ) sky.sky_material = sky_material environment.sky = sky @@ -524,28 +521,11 @@ 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 )) @@ -557,39 +537,11 @@ 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 deleted file mode 100644 index 758be87..0000000 --- a/tools/art/export_creature_art.py +++ /dev/null @@ -1,256 +0,0 @@ -#!/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 deleted file mode 100644 index d4a278e..0000000 --- a/tools/blender/export_terrain_chunks.py +++ /dev/null @@ -1,873 +0,0 @@ -#!/usr/bin/env python3 -"""Export convention-named terrain chunk collections to individual GLBs. - -Run through Blender rather than a standalone Python interpreter: - - blender --background terrain_chunks.blend \ - --python tools/blender/export_terrain_chunks.py -- \ - --output /path/to/terrain_chunks - -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. 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 - -import argparse -import hashlib -import json -import math -import re -import struct -import sys -from dataclasses import dataclass -from pathlib import Path -from typing import Iterable - -import bpy -from mathutils import Vector - - -CHUNK_SIZE_METERS = 10.0 -# Match the runtime boundary analyzer's five-millimeter authoring tolerance. -DEFAULT_TOLERANCE = 0.005 -COLLECTION_PATTERN = re.compile( - r"^chunk_(?P\d{4})(?:_(?P