Remove internal phase comments and format code
Strip all Phase references, TODO/FUTURE roadmap notes, and internal planning comments from the codebase. Run Prettier for consistent formatting across all Java files.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.tiedup.remake.prison.service;
|
||||
|
||||
import com.tiedup.remake.cells.CellDataV2;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.cells.CellRegistryV2;
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.entities.AbstractTiedUpNpc;
|
||||
@@ -17,8 +16,8 @@ import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.state.ICaptor;
|
||||
import com.tiedup.remake.state.PlayerBindState;
|
||||
import com.tiedup.remake.util.KidnappedHelper;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import java.util.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
@@ -29,6 +28,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Centralized prisoner lifecycle service.
|
||||
@@ -109,7 +109,9 @@ public class PrisonerService {
|
||||
}
|
||||
|
||||
// 2. Leash attach
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(captive);
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(
|
||||
captive
|
||||
);
|
||||
if (kidnappedState == null) {
|
||||
// Rollback
|
||||
manager.escape(
|
||||
@@ -237,7 +239,9 @@ public class PrisonerService {
|
||||
}
|
||||
|
||||
// 3. Unleash: remove captor refs and drop leash
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(captive);
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(
|
||||
captive
|
||||
);
|
||||
if (kidnappedState != null) {
|
||||
kidnappedState.free(false); // Drop leash without dialogue/items
|
||||
captor.removeCaptive(kidnappedState, false);
|
||||
@@ -307,7 +311,9 @@ public class PrisonerService {
|
||||
);
|
||||
|
||||
// 3. Leash to new captor — forceCapturedBy for damsels
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(captive);
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(
|
||||
captive
|
||||
);
|
||||
if (kidnappedState == null) {
|
||||
// Rollback
|
||||
if (isPlayer) {
|
||||
@@ -378,7 +384,9 @@ public class PrisonerService {
|
||||
long gameTime = level.getGameTime();
|
||||
|
||||
// 1. Unleash
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(captive);
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(
|
||||
captive
|
||||
);
|
||||
if (kidnappedState != null && kidnappedState.isCaptive()) {
|
||||
kidnappedState.free(false);
|
||||
}
|
||||
@@ -451,7 +459,9 @@ public class PrisonerService {
|
||||
ICaptor oldCaptor,
|
||||
ICaptor newCaptor
|
||||
) {
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(captive);
|
||||
IBondageState kidnappedState = KidnappedHelper.getKidnappedState(
|
||||
captive
|
||||
);
|
||||
if (kidnappedState == null) {
|
||||
TiedUpMod.LOGGER.warn(
|
||||
"[PrisonerService] transferCaptive() no kidnapped state for {}",
|
||||
@@ -479,9 +489,7 @@ public class PrisonerService {
|
||||
TiedUpMod.LOGGER.warn(
|
||||
"[PrisonerService] transferCaptive() re-leash to new captor failed, attempting rollback"
|
||||
);
|
||||
if (
|
||||
captive instanceof AbstractTiedUpNpc npc
|
||||
) {
|
||||
if (captive instanceof AbstractTiedUpNpc npc) {
|
||||
npc.forceCapturedBy(oldCaptor);
|
||||
} else {
|
||||
kidnappedState.getCapturedBy(oldCaptor);
|
||||
@@ -739,9 +747,13 @@ public class PrisonerService {
|
||||
if (state != PrisonerState.CAPTURED) {
|
||||
boolean hasCollarOwners = collars.hasOwners(playerId);
|
||||
if (!hasCollarOwners) {
|
||||
IBondageState cap = KidnappedHelper.getKidnappedState(player);
|
||||
IBondageState cap = KidnappedHelper.getKidnappedState(
|
||||
player
|
||||
);
|
||||
ItemStack collar =
|
||||
cap != null ? cap.getEquipment(BodyRegionV2.NECK) : ItemStack.EMPTY;
|
||||
cap != null
|
||||
? cap.getEquipment(BodyRegionV2.NECK)
|
||||
: ItemStack.EMPTY;
|
||||
|
||||
if (
|
||||
!collar.isEmpty() &&
|
||||
|
||||
Reference in New Issue
Block a user