Fixes for alchemy dude's quest part 2 (#2362)

* Make platforms able to reset

platforms apparently are able to run again once reaching the last point. As well, canceling a timer seems to return a 0, not a 1

* Fix Seelies

Added HandlerClientScriptEventNotify (shoutouts to Hartie!) and cleaned up the platform stuff in ScriptLib.

There is a problem with HandlerClientScriptEventNotify where the client seems to only pass 0 into param1 instead of the configId. I coded in a workaround, but someone with greater access to things should check up on what is going on
This commit is contained in:
Nazrin
2023-09-14 17:44:30 -07:00
committed by GitHub
parent f955bb1e16
commit 84e1371499
4 changed files with 56 additions and 8 deletions

View File

@@ -256,6 +256,9 @@ public class EntityGadget extends EntityBaseGadget {
var route = this.getScene().getSceneRouteById(configRoute.getRouteId());
if (route != null) {
var points = route.getPoints();
if (configRoute.getStartIndex() == points.length - 1) {
configRoute.setStartIndex(0);
}
val currIndex = configRoute.getStartIndex();
Position prevpos;
@@ -301,6 +304,9 @@ public class EntityGadget extends EntityBaseGadget {
}
configRoute.setStartIndex(I);
this.position.set(points[I].getPos());
if(I == points.length - 1) {
configRoute.setStarted(false);
}
},
(int) time));
}