mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 01:15:52 +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:
@@ -1330,9 +1330,8 @@ public class ScriptLib {
|
||||
return -1;
|
||||
}
|
||||
|
||||
//TODO check
|
||||
public int SetPlatformRouteId(int entityConfigId, int routeId){
|
||||
logger.info("[LUA] Call SetPlatformRouteId {} {}", entityConfigId, routeId);
|
||||
logger.debug("[LUA] Call SetPlatformRouteId {} {}", entityConfigId, routeId);
|
||||
|
||||
val entity = getSceneScriptManager().getScene().getEntityByConfigId(entityConfigId);
|
||||
if(entity == null){
|
||||
@@ -1365,12 +1364,9 @@ public class ScriptLib {
|
||||
return 0;
|
||||
}
|
||||
|
||||
//TODO check
|
||||
public int StartPlatform(int configId){
|
||||
logger.debug("[LUA] Call StartPlatform {} ", configId);
|
||||
|
||||
val entity = sceneScriptManager.get().getScene().getEntityByConfigId(configId);
|
||||
|
||||
if(!(entity instanceof EntityGadget entityGadget)) {
|
||||
return 1;
|
||||
}
|
||||
@@ -1378,9 +1374,8 @@ public class ScriptLib {
|
||||
return entityGadget.startPlatform() ? 0 : 2;
|
||||
}
|
||||
|
||||
//TODO check
|
||||
public int StopPlatform(int configId){
|
||||
logger.info("[LUA] Call StopPlatform {} ", configId);
|
||||
logger.debug("[LUA] Call StopPlatform {} ", configId);
|
||||
val entity = sceneScriptManager.get().getScene().getEntityByConfigId(configId);
|
||||
if(!(entity instanceof EntityGadget entityGadget)) {
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user