Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular ScriptLib update! #2349

Merged
merged 3 commits into from
Sep 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/main/java/emu/grasscutter/scripts/ScriptLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public int ChangeGroupVariableValueByGroup(String var, int value, int groupId){
* Set the actions and triggers to designated group
*/
public int RefreshGroup(LuaTable table) {
logger.debug("[LUA] Call RefreshGroup with {}",
logger.info("[LUA] Call RefreshGroup with {}",
scooterboo marked this conversation as resolved.
Show resolved Hide resolved
printTable(table));
// Kill and Respawn?
int groupId = table.get("group_id").toint();
Expand Down Expand Up @@ -1105,6 +1105,12 @@ public int MoveAvatarByPointArray(int uid, int targetId, LuaTable var3, String v
return 0;
}

public int MoveAvatarByPointArrayWithTemplate(int uid, int pointarray_id, int[] routelist, int var4, LuaTable var5){
logger.warn("[LUA] Call unimplemented MoveAvatarByPointArrayWithTemplate with {} {} {} {} {}", uid, pointarray_id, routelist, var4, printTable(var5));
//TODO implement var5 contains int speed
return 0;
}

public int MovePlayerToPos(LuaTable var1){
logger.warn("[LUA] Call unchecked MovePlayerToPos with {}", printTable(var1));
//TODO implement var1 contains int[] uid_list, Position pos, int radius, Position rot
Expand Down Expand Up @@ -1262,6 +1268,7 @@ public int[] GetOpeningDungeonListByRosterId(int var1){
}

public int SetWeatherAreaState(int var1, int var2) {
logger.debug("[LUA] Call SetWeatherAreaState with {} {}", var1, var2);
this.getSceneScriptManager().getScene().getPlayers()
.forEach(p -> p.setWeather(var1, ClimateType.getTypeByValue(var2)));
return 0;
Expand Down Expand Up @@ -1405,6 +1412,11 @@ public int RevokePlayerShowTemplateReminder(int var1, LuaValue var2){
return 0;
}

public int SetPlayerInteractOption(String var1){
logger.warn("[LUA] Call unimplemented SetPlayerInteractOption {}", var1);
return 0;
}

public int UnlockForce(int force){
logger.debug("[LUA] Call UnlockForce {}", force);
getSceneScriptManager().getScene().unlockForce(force);
Expand Down Expand Up @@ -1552,7 +1564,7 @@ public LuaTable GetActivityOpenAndCloseTimeByScheduleId(int scheduleId){
}

public int GetRegionConfigId(LuaTable var1){
logger.warn("[LUA] Call untested GetRegionConfigId with {}", printTable(var1));
logger.debug("[LUA] Call GetRegionConfigId with {}", printTable(var1));
var EntityId = var1.get("region_eid").toint();
var entity = getSceneScriptManager().getScene().getScriptManager().getRegionById(EntityId);
if (entity == null){
Expand Down
Loading