Add @Player.SetDifficullty(int) command

This commit is contained in:
JappaWakka 2025-04-17 19:30:56 +02:00
parent e4dc1e2adc
commit 41c5d35864
2 changed files with 4 additions and 0 deletions

View File

@ -457,6 +457,8 @@
Case "showbattleanimations"
Core.Player.ShowBattleAnimations = CInt(argument)
IsReady = True
Case "setdifficulty"
Core.Player.DifficultyMode = CInt(argument).Clamp(0, 2)
Case "setgender"
Select Case argument
Case "0", "Male", "male"

View File

@ -530,7 +530,9 @@ Namespace ScriptVersion2
r(New ScriptCommand("player", "save", "Saves the game."))
r(New ScriptCommand("player", "setrivalname", {New ScriptArgument("name", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's name."))
r(New ScriptCommand("player", "setrivalskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's skin."))
r(New ScriptCommand("player", "setgender", {New ScriptArgument("gender", ScriptArgument.ArgumentTypes.Str, {"0-2, Male, Female, Other"})}.ToList(), "Sets the rival's skin."))
r(New ScriptCommand("player", "setopacity", {New ScriptArgument("opacity", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Sets the player entity's opacity."))
r(New ScriptCommand("player", "SetDifficulty", {New ScriptArgument("difficultyLevel", ScriptArgument.ArgumentTypes.Int, {"0-2"})}.ToList(), "Sets the difficulty level for the player."))
r(New ScriptCommand("player", "QuitGame", {New ScriptArgument("doFade", ScriptArgument.ArgumentTypes.Bool, True, "")}.ToList(), "Quits the game and goes back to the Main Menu (with optionally a fade out and in)."))
r(New ScriptCommand("player", "DoWalkAnimation", {New ScriptArgument("walkAnimation", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Enables or disables the player's walking animation when walking or during a @player.move command."))
r(New ScriptCommand("player", "RemoveItemData", {New ScriptArgument("levelPath", ScriptArgument.ArgumentTypes.Str), New ScriptArgument("itemIndex", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Makes the specified item index of the specified map spawn again after it has been found."))