Added more reactor fields to debug
This commit is contained in:
parent
4952761c16
commit
30f7f00b23
|
@ -80,6 +80,12 @@ public class WarpCorePlasmaConduit {
|
||||||
synchronized (claimTypesOut) {
|
synchronized (claimTypesOut) {
|
||||||
result.slotTypesOut.addAll(claimTypesOut);
|
result.slotTypesOut.addAll(claimTypesOut);
|
||||||
}
|
}
|
||||||
|
synchronized (requireServices) {
|
||||||
|
result.requireServices.addAll(requireServices);
|
||||||
|
}
|
||||||
|
synchronized (requireSlots) {
|
||||||
|
result.requireSlots.addAll(requireSlots);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,13 @@ import java.util.List;
|
||||||
import love.distributedrebirth.nx01.warp.core.react.WarpReactPlasma;
|
import love.distributedrebirth.nx01.warp.core.react.WarpReactPlasma;
|
||||||
|
|
||||||
|
|
||||||
public class WarpCorePlasmaIntermixChamber {
|
public final class WarpCorePlasmaIntermixChamber {
|
||||||
|
|
||||||
private final WarpReactPlasma slot;
|
private final WarpReactPlasma slot;
|
||||||
final List<Class<?>> slotTypesIn = new ArrayList<>();
|
final List<Class<?>> slotTypesIn = new ArrayList<>();
|
||||||
final List<Class<?>> slotTypesOut = new ArrayList<>();
|
final List<Class<?>> slotTypesOut = new ArrayList<>();
|
||||||
|
final List<Class<?>> requireServices = new ArrayList<>();
|
||||||
|
final List<WarpReactPlasma> requireSlots = new ArrayList<>();
|
||||||
|
|
||||||
public WarpCorePlasmaIntermixChamber(WarpReactPlasma slot) {
|
public WarpCorePlasmaIntermixChamber(WarpReactPlasma slot) {
|
||||||
this.slot = slot;
|
this.slot = slot;
|
||||||
|
@ -27,4 +29,12 @@ public class WarpCorePlasmaIntermixChamber {
|
||||||
public List<Class<?>> getSlotTypesOut() {
|
public List<Class<?>> getSlotTypesOut() {
|
||||||
return slotTypesOut;
|
return slotTypesOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Class<?>> getRequireServices() {
|
||||||
|
return requireServices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WarpReactPlasma> getRequireSlots() {
|
||||||
|
return requireSlots;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -31,6 +31,8 @@ public class WarpCorePlasmaInspectorServlet extends HttpServlet {
|
||||||
out.println("\t<slot path=\"" + slot.getSlotPath() + "\">\n");
|
out.println("\t<slot path=\"" + slot.getSlotPath() + "\">\n");
|
||||||
printClaims(out, "in", contract.getSlotTypesIn());
|
printClaims(out, "in", contract.getSlotTypesIn());
|
||||||
printClaims(out, "out", contract.getSlotTypesOut());
|
printClaims(out, "out", contract.getSlotTypesOut());
|
||||||
|
printRequireServices(out, contract.getRequireServices());
|
||||||
|
printRequireSlots(out, contract.getRequireSlots());
|
||||||
out.println("</slot>\n");
|
out.println("</slot>\n");
|
||||||
}
|
}
|
||||||
out.println("\t</reactor>\n");
|
out.println("\t</reactor>\n");
|
||||||
|
@ -49,4 +51,30 @@ public class WarpCorePlasmaInspectorServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
out.println("\t\t</claim-"+tag+">\n");
|
out.println("\t\t</claim-"+tag+">\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void printRequireServices(PrintWriter out, List<Class<?>> clazzes) {
|
||||||
|
if (clazzes.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
out.println("\t\t<require-services>\n");
|
||||||
|
for (Class<?> cls : clazzes) {
|
||||||
|
out.print("\t\t\t<require-service>");
|
||||||
|
out.print(cls);
|
||||||
|
out.println("</require-service>\n");
|
||||||
|
}
|
||||||
|
out.println("\t\t</require-services>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void printRequireSlots(PrintWriter out, List<WarpReactPlasma> slots) {
|
||||||
|
if (slots.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
out.println("\t\t<require-slots>\n");
|
||||||
|
for (WarpReactPlasma slot : slots) {
|
||||||
|
out.print("\t\t\t<require-slot>");
|
||||||
|
out.print(slot.getSlotPath());
|
||||||
|
out.println("</require-slot>\n");
|
||||||
|
}
|
||||||
|
out.println("\t\t</require-slots>\n");
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue