From 3e51436c0e9358857fa7866114adeee9496730e7 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Tue, 1 Aug 2023 11:17:54 +0200 Subject: [PATCH] Make Mailman Trophy achievable --- P3D/World/ActionScript/V2/ScriptCommands/DoItem.vb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoItem.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoItem.vb index daa6e87dc..910166c17 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoItem.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoItem.vb @@ -36,6 +36,18 @@ amount = int(item.MaxStack - Core.Player.Inventory.GetItemAmount(_itemID)).Clamp(0, 999) End If Core.Player.Inventory.AddItem(_itemID, amount) + If item.IsMail = True AndAlso item.IsGameModeItem = False Then + Dim hasAllMail = True + For m = 300 To 323 + If Core.Player.Inventory.GetItemAmount(m.ToString) = 0 Then + hasAllMail = False + Exit For + End If + Next + If hasAllMail = True Then + GameJolt.Emblem.AchieveEmblem("mailman") + End If + End If End If Case "remove" Dim amount As Integer = 1