mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-14 16:04:40 +01:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user