feat(D-01/A): NPC speed reduction for V2 items (A12)
- onEquipped: apply RestraintEffectUtils speed reduction for non-Player entities with ARMS region and legs bound. Full immobilization for WRAP/LATEX_SACK pose types. - onUnequipped: remove speed reduction for non-Player entities - Players use MovementStyleManager (V2 tick-based), not this legacy path
This commit is contained in:
@@ -349,6 +349,17 @@ public class DataDrivenBondageItem extends AbstractV2BondageItem {
|
||||
if (holder != null) {
|
||||
holder.onEquipped(stack, entity);
|
||||
}
|
||||
|
||||
// NPC speed reduction (players use MovementStyleManager, not this legacy path)
|
||||
if (!(entity instanceof Player)) {
|
||||
Set<BodyRegionV2> regions = getOccupiedRegions(stack);
|
||||
if (regions.contains(BodyRegionV2.ARMS) && BindModeHelper.hasLegsBound(stack)) {
|
||||
com.tiedup.remake.items.base.PoseType pose = com.tiedup.remake.v2.bondage.PoseTypeHelper.getPoseType(stack);
|
||||
boolean fullImmobilization = pose == com.tiedup.remake.items.base.PoseType.WRAP
|
||||
|| pose == com.tiedup.remake.items.base.PoseType.LATEX_SACK;
|
||||
com.tiedup.remake.util.RestraintEffectUtils.applyBindSpeedReduction(entity, fullImmobilization);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -357,6 +368,14 @@ public class DataDrivenBondageItem extends AbstractV2BondageItem {
|
||||
if (holder != null) {
|
||||
holder.onUnequipped(stack, entity);
|
||||
}
|
||||
|
||||
// NPC speed cleanup
|
||||
if (!(entity instanceof Player)) {
|
||||
Set<BodyRegionV2> regions = getOccupiedRegions(stack);
|
||||
if (regions.contains(BodyRegionV2.ARMS)) {
|
||||
com.tiedup.remake.util.RestraintEffectUtils.removeBindSpeedReduction(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user