P3-01 : add TiedUpLivingMotions enum (11 motions + UX additions)
Nouvelle enum custom etendant LivingMotion — partage le meme ENUM_MANAGER que LivingMotions (vanilla EF), ordinals assignes a la suite sans collision. 8 motions design RIG : - POSE_DOG - POSE_PET_BED_SIT - POSE_PET_BED_SLEEP - POSE_FURNITURE_SEAT - POSE_KNEEL_BOUND - STRUGGLE_BOUND - WALK_BOUND - SNEAK_BOUND 3 ajouts UX (P0/P1) : - POSE_SLEEP_BOUND — sleep avec restraints (P0) - POSE_UNCONSCIOUS — steady-state post-capture (P0) - FALL_BOUND — no flailing en chute (P1) Class-load force dans TiedUpMod.commonSetup via values() — sans ca, les ordinals ne sont pas assignes tant que l'enum n'est pas touche (init lazy JLS). LivingMotions (vanilla) est class-loaded naturellement par les patches rig, pas besoin de force. Tests : 3 cas (11 entries, ordinals uniques intra-enum, pas de collision avec LivingMotions apres class-load croise).
This commit is contained in:
@@ -138,6 +138,11 @@ public class TiedUpMod {
|
||||
// Register dispenser behaviors (must be on main thread)
|
||||
event.enqueueWork(DispenserBehaviors::register);
|
||||
|
||||
// RIG Phase 3 — force class-load des motions custom TiedUp! pour assigner
|
||||
// les universalOrdinal() via ExtendableEnumManager (init lazy JLS sinon).
|
||||
// LivingMotions (vanilla EF) est class-loaded naturellement par les patches.
|
||||
com.tiedup.remake.rig.anim.TiedUpLivingMotions.values();
|
||||
|
||||
// RIG Phase 2 — dispatcher EntityType → EntityPatch (PLAYER Phase 2, NPCs Phase 5)
|
||||
event.enqueueWork(com.tiedup.remake.rig.patch.EntityPatchProvider::registerEntityPatches);
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
|
||||
*/
|
||||
|
||||
package com.tiedup.remake.rig.anim;
|
||||
|
||||
/**
|
||||
* Motions custom TiedUp! — extension de {@link LivingMotions} (motions vanilla EF).
|
||||
*
|
||||
* Chaque valeur partage le meme {@link LivingMotion#ENUM_MANAGER} que
|
||||
* {@link LivingMotions} : les universalOrdinal() sont assignes a la suite, sans
|
||||
* collision, a condition que les deux enums soient class-loaded avant usage.
|
||||
*
|
||||
* Les 8 premieres motions correspondent au design original RIG (cf.
|
||||
* docs/plans/rig/). Les 3 dernieres sont des ajouts UX (P0/P1) :
|
||||
* - POSE_SLEEP_BOUND : sleep avec restraints (P0)
|
||||
* - POSE_UNCONSCIOUS : steady-state post-capture (P0)
|
||||
* - FALL_BOUND : fall sans flailing (P1)
|
||||
*
|
||||
* Class-load force dans {@code TiedUpMod.commonSetup} via {@link #values()} —
|
||||
* sans ca, les ordinals ne sont pas assignes tant que l'enum n'est pas touche
|
||||
* (JLS : init lazy).
|
||||
*/
|
||||
public enum TiedUpLivingMotions implements LivingMotion {
|
||||
POSE_DOG,
|
||||
POSE_PET_BED_SIT,
|
||||
POSE_PET_BED_SLEEP,
|
||||
POSE_FURNITURE_SEAT,
|
||||
POSE_KNEEL_BOUND,
|
||||
STRUGGLE_BOUND,
|
||||
WALK_BOUND,
|
||||
SNEAK_BOUND,
|
||||
POSE_SLEEP_BOUND, // UX P0 — sleep avec restraints
|
||||
POSE_UNCONSCIOUS, // UX P0 — steady-state post-capture
|
||||
FALL_BOUND; // UX P1 — no flailing en chute
|
||||
|
||||
final int id;
|
||||
|
||||
TiedUpLivingMotions() {
|
||||
this.id = LivingMotion.ENUM_MANAGER.assign(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int universalOrdinal() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user