From 6fe581dff9e9d7d32e8a3b6b60e9d100d792150a Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Fri, 28 Jul 2023 13:06:04 +0200 Subject: [PATCH] Add @player.removefrontieremblem(str,bool) --- P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb | 12 ++++++++++++ P3D/World/ActionScript/V2/ScriptLibrary.vb | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb index f45b8b68c..7ab46c31b 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb @@ -299,6 +299,18 @@ End If End If IsReady = True + Case "removefrontieremblem" + If argument.Split(",").Count = 1 Then + ActionScript.UnregisterID("frontier_" & argument & "_gold") + ActionScript.UnregisterID("frontier_" & argument & "_silver") + Else + If CBool(argument.GetSplit(1, ",")) = False Then + ActionScript.UnregisterID("frontier_" & argument.GetSplit(0, ",") & "_silver") + Else + ActionScript.UnregisterID("frontier_" & argument.GetSplit(0, ",") & "_gold") + End If + End If + IsReady = True Case "achieveemblem" GameJolt.Emblem.AchieveEmblem(argument) diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index b684e7321..1c14fbec2 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -504,7 +504,8 @@ Namespace ScriptVersion2 r(New ScriptCommand("player", "getbadge", {New ScriptArgument("badgeID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Adds the given Badge to the player's Badges and displays a message.")) r(New ScriptCommand("player", "removebadge", {New ScriptArgument("badgeID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Removes the given Badge from the player's Badges.")) r(New ScriptCommand("player", "addbadge", {New ScriptArgument("badgeID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Adds the given Badge from the player's Badges.")) - r(New ScriptCommand("player", "addfrontieremblem", {New ScriptArgument("frontierEmblemID", ScriptArgument.ArgumentTypes.Str), New ScriptArgument("SilverOrGold", ScriptArgument.ArgumentTypes.Bool, True, "1")}.ToList(), "Adds a frontier emblem (silver or gold) to the player's emblems. 0 = silver, 1 = gold")) + r(New ScriptCommand("player", "addfrontieremblem", {New ScriptArgument("frontierEmblemID", ScriptArgument.ArgumentTypes.Str), New ScriptArgument("SilverOrGold", ScriptArgument.ArgumentTypes.Bool, True, "1")}.ToList(), "Adds a frontier emblem (silver or gold) to the player's emblems. Second argument can be 0 = silver, 1 = gold")) + r(New ScriptCommand("player", "removefrontieremblem", {New ScriptArgument("frontierEmblemID", ScriptArgument.ArgumentTypes.Int), New ScriptArgument("SilverOrGold", ScriptArgument.ArgumentTypes.Bool, True, "")}.ToList(), "Removes a frontier emblem from the player's emblems. Second argument can be 0 = silver, 1 = gold. Without it, both silver and gold emblems will be removed.")) r(New ScriptCommand("player", "achieveemblem", {New ScriptArgument("emblemName", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Makes the player achieve an emblem (GameJolt only).")) r(New ScriptCommand("player", "addbp", {New ScriptArgument("amount", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Adds the given amount to the player's Battle Points.")) r(New ScriptCommand("player", "showrod", {New ScriptArgument("rodID", ScriptArgument.ArgumentTypes.Int, {"0-2"})}.ToList(), "Displays a Fishing Rod on the screen."))