Files
eagle0/.pre-commit-config.yaml
b3adebbb0a Add tiger beast effect using ithappy Animals FREE pack (#6475)
* Add tiger and lion beast effects using ithappy Animals FREE pack

Import the free ithappy Animals FREE asset pack and create tiger/lion
beast effects. The tiger model is reused at 1.7x scale for lion.
A custom TigerMapAnims controller maps ithappy's idle/walk/idle_rare/run
clips to AnimalEffect's expected idle/walk/eat/attack state names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove lion effect (scaled tiger is not convincing)

Lion falls back to generic vultures until a proper model is found.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ithappy files stored as LFS objects breaking Unity import

The broad ithappy/** LFS rule was storing text YAML files (.controller,
.mat, .prefab, .anim, etc.) as LFS objects, causing Unity to fail with
"File may be corrupted" errors. Remove the rule and re-add files so text
files are stored as regular git objects while binaries (.fbx, .png) are
still covered by per-extension LFS rules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Strip third-party scripts/physics from animal prefabs on spawn

ithappy Tiger_001 prefab includes CharacterController, CreatureMover,
and MovePlayerInput components that conflict with AnimalEffect's own
movement system. DestroyImmediate these after instantiation to prevent
"CharacterController.Move called on inactive controller" errors.

Also wires up tigerEffectPrefab in Gameplay.unity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Move beast effect prefabs to Addressables for CDN delivery (#6373)

Replace 33 serialized GameObject fields in ProvinceBeastsController with
Addressables.LoadAssetsAsync label-based loading ("beast-effects").
Prefabs stay in Assets/Eagle/Effects/ but are now delivered via CDN at
https://assets.eagle0.net/addressables/[BuildTarget] instead of being
bundled in the app binary. This removes ~80-100 MB of 3D models,
textures, and animations from the initial app download.

Loading strategy:
- Eager load in Start() (last priority — after music)
- Game state that arrives before loading completes is stashed and
  applied when ready
- If loading fails (offline, no cache), beasts simply don't render

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Add tiger and elephant beast effects using Animal Pack Deluxe

Route "tiger" and "elephant" beast names to dedicated TigerEffect and
ElephantEffect prefabs in ProvinceBeastsController. Prefabs to be wired
up in the Unity editor using existing Animal Pack Deluxe assets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Register TigerEffect in Addressable beast-effects group

The TigerEffect prefab was added in the add-tiger-effect branch but was
never registered in the Beast Effects Addressable group, so LookupPrefab
returned null at runtime. Also removes a duplicate "tiger" switch case
from the merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix AnimalEffect component removal errors on spawn

Instantiate prefabs inactive to prevent CharacterController stepOffset
validation errors, and remove MonoBehaviours in reverse component order
to respect [RequireComponent] dependency chains before removing
CharacterController.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ithappy Animals_FREE material to use Built-in Standard shader

The material shipped with a URP Lit shader reference, causing solid pink
rendering on Built-in render pipeline. Swap to Built-in Standard shader
and remove the URP version tracker MonoBehaviour.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix tiger animations by using standalone .anim clips

The ithappy Animals_FREE FBX was imported with avatarSetup: 0 (no
avatar), so its embedded animation clips had no bone binding data.
Switch TigerMapAnims.controller to reference the standalone .anim files
which have explicit transform path bindings. Also build a Generic avatar
at runtime for prefabs missing one, and set up the Animator before
activation so it initializes with correct avatar and controller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix duplicate Start/LoadBeastEffects from rebase

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused ithappy Animals_FREE assets

Only the tiger model, texture, material, and animations are needed.
Removes all other animals (chicken, deer, dog, horse, kitty, penguin),
demo scenes, skyboxes, scripts, floor material, animation controllers,
and render pipeline conversion files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove CharacterController and deleted scripts from Tiger prefab

The prefab still referenced CreatureMover and MovePlayerInput scripts
that were deleted in the previous commit, causing missing script errors
in the Unity editor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update Tiger_001 prefab after Unity re-serialization

Unity re-serialized the prefab after we removed the CharacterController
and missing script components. This is the clean editor-saved version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:44:05 -07:00

48 lines
1.3 KiB
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: [-i, --no-diff]
types_or: ["c++", "c#"]
exclude: >-
(?x)^src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/(
Plugins|
DungeonMonsters2D|
Dragon|
ithappy|
Polytope\ Studio|
RRFreelance-Characters|
Raccoon
)/
- repo: https://github.com/yoheimuta/protolint
rev: v0.42.2
hooks:
- id: protolint
args: [-fix]
exclude: ^src/main/protobuf/scalapb/
- repo: local
hooks:
- id: scalafmt
name: scalafmt
language: system
entry: scalafmt -i -f
types_or: ["scala"]
- repo: local
hooks:
- id: gazelle
name: gazelle
language: system
entry: ./scripts/pre-commit-gazelle.sh
files: '(\.go|\.proto|BUILD\.bazel|BUILD|WORKSPACE|WORKSPACE\.bazel|\.bzl)$'
pass_filenames: false