Fixed comma in plasma mushroom naming

This commit is contained in:
Willem Cazander 2024-12-19 15:43:39 +01:00
parent 122ba31e5f
commit 96bd84ea1a
3 changed files with 24 additions and 7 deletions

View file

@ -27,6 +27,8 @@
package love.distributedrebirth.nx01.warp.core; package love.distributedrebirth.nx01.warp.core;
import java.util.Objects;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import love.distributedrebirth.nx01.warp.core.react.WarpReact; import love.distributedrebirth.nx01.warp.core.react.WarpReact;
@ -44,17 +46,35 @@ public class WarpCoreSpeedMonitor implements WarpReactTypeScript {
public static final WarpReactPlasma API = WarpReactPlasma.ofClass(WarpCoreSpeedMonitor.class); public static final WarpReactPlasma API = WarpReactPlasma.ofClass(WarpCoreSpeedMonitor.class);
private static final WarpReactPlasma API_DILITHIUM = WarpCoreReactor.DILITHIUM; private static final WarpReactPlasma API_DILITHIUM = WarpCoreReactor.DILITHIUM;
private static final Logger LOG = Logger.getLogger(WarpCoreSpeedMonitor.class.getName()); private static final Logger LOG = Logger.getLogger(WarpCoreSpeedMonitor.class.getName());
private Level level = Level.FINE;
@Override @Override
public void onEvent(WarpReactPlasmaPulse<WarpSpaceAntimatterInducer> signal) { public void onEvent(WarpReactPlasmaPulse<WarpSpaceAntimatterInducer> signal) {
WarpReact react = signal.getReact(); WarpReact react = signal.getReact();
react.claim(API); react.claim(API);
react.requireSlot(API, API_DILITHIUM); react.requireSlot(API, API_DILITHIUM);
react.registrate(API_DILITHIUM, WarpSpacePlasmaAdd.class, v -> { react.registrate(API_DILITHIUM, WarpSpacePlasmaAdd.class, v -> {
LOG.fine("slot-add: " + v.getData().getSlot().getSlotPath()); LOG.log(level, "slot-add: " + v.getData().getSlot().getSlotPath());
}); });
react.registrate(API_DILITHIUM, WarpSpacePlasmaRemove.class, v -> { react.registrate(API_DILITHIUM, WarpSpacePlasmaRemove.class, v -> {
LOG.fine("slot-remove: " + v.getData().getSlot().getSlotPath()); LOG.log(level, "slot-remove: " + v.getData().getSlot().getSlotPath());
});
react.claimIn(API, UpdateLogLevel.class);
react.registrate(API, UpdateLogLevel.class, v -> {
level = v.getData().getLevel();
}); });
} }
public final class UpdateLogLevel {
private final Level level;
public UpdateLogLevel(Level level) {
this.level = Objects.requireNonNull(level);
}
public Level getLevel() {
return level;
}
}
} }

View file

@ -95,7 +95,7 @@ public final class WarpReactPlasma {
} }
public static WarpReactPlasma ofClassQualified(Class<?> scriptClz, String qualifier) { public static WarpReactPlasma ofClassQualified(Class<?> scriptClz, String qualifier) {
return new WarpReactPlasma(null, scriptClz.getPackageName() + ":type=" + scriptClz.getSimpleName() + ":name=" + qualifier); return new WarpReactPlasma(null, scriptClz.getPackageName() + ":type=" + scriptClz.getSimpleName() + ",name=" + qualifier);
} }
public static WarpReactPlasma ofClass(Class<?> scriptClz) { public static WarpReactPlasma ofClass(Class<?> scriptClz) {

View file

@ -29,7 +29,6 @@ package love.distributedrebirth.nx01.zerofungus.server;
import java.util.logging.Logger; import java.util.logging.Logger;
import love.distributedrebirth.nx01.warp.core.react.WarpReactPlasma;
import love.distributedrebirth.nx01.warp.core.react.WarpReactPlasmaPulse; import love.distributedrebirth.nx01.warp.core.react.WarpReactPlasmaPulse;
import love.distributedrebirth.nx01.warp.core.react.WarpReactTypeScript; import love.distributedrebirth.nx01.warp.core.react.WarpReactTypeScript;
import love.distributedrebirth.nx01.warp.core.space.WarpSpaceAntimatterInducer; import love.distributedrebirth.nx01.warp.core.space.WarpSpaceAntimatterInducer;
@ -38,12 +37,10 @@ import love.distributedrebirth.nx01.warp.core.space.WarpSpaceAntimatterInducer;
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ZFunRtsServerBooted implements WarpReactTypeScript { public class ZFunRtsServerBooted implements WarpReactTypeScript {
public static final WarpReactPlasma API = WarpReactPlasma.ofClass(ZFunRtsServerBooted.class);
private static final Logger logger = Logger.getLogger(ZFunRtsServerBooted.class.getName()); private static final Logger logger = Logger.getLogger(ZFunRtsServerBooted.class.getName());
@Override @Override
public void onEvent(WarpReactPlasmaPulse<WarpSpaceAntimatterInducer> signal) { public void onEvent(WarpReactPlasmaPulse<WarpSpaceAntimatterInducer> signal) {
signal.getReact().claim(API);
logger.info("╔═╗┌─┐┬─┐┌─┐ .╔═╗┬ ┬┌┐┌╔═╗┬ ┬┌─┐"); logger.info("╔═╗┌─┐┬─┐┌─┐ .╔═╗┬ ┬┌┐┌╔═╗┬ ┬┌─┐");
logger.info("╔═╝├┤ ├┬┘│ │ . ╠╣ │ ││││║ ╦│ │└─┐"); logger.info("╔═╝├┤ ├┬┘│ │ . ╠╣ │ ││││║ ╦│ │└─┐");
logger.info("╚═╝└─┘┴└─└─┘. ╚ └─┘┘└┘╚═╝└─┘└─┘"); logger.info("╚═╝└─┘┴└─└─┘. ╚ └─┘┘└┘╚═╝└─┘└─┘");