Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
public class DialogActionRemoveWaypointRebirth : BaseDialogAction
{
public override void PerformAction(EntityPlayer player)
{
LocalPlayerUI uiforPlayer = LocalPlayerUI.GetUIForPlayer(player as EntityPlayerLocal);
if (!string.IsNullOrEmpty(Value) && Value.ToLower() == "self")
{
var entityNPC = uiforPlayer.xui.Dialog.Respondent;
if (entityNPC != null)
{
EntityPlayerLocal primaryPlayer = GameManager.Instance.World.GetPrimaryPlayer();
Vector3i blockPosition = World.worldToBlockPos(entityNPC.position);
foreach (Waypoint waypoint in primaryPlayer.Waypoints.Collection.list)
{
if ((waypoint.pos.x <= blockPosition.x + 2)
&& (waypoint.pos.x >= blockPosition.x - 2)
&& (waypoint.pos.y <= blockPosition.y + 2)
&& (waypoint.pos.y >= blockPosition.y - 2)
&& (waypoint.pos.z <= blockPosition.z + 2)
&& (waypoint.pos.z >= blockPosition.z - 2)
&& waypoint.name.Text.ToLower().Trim() == Localization.Get(entityNPC.EntityClass.entityClassName).ToLower().Trim()
)
{
primaryPlayer.Waypoints.Collection.Remove(waypoint);
NavObjectManager.Instance.UnRegisterNavObject(waypoint.navObject);
XUiV_Window window = uiforPlayer.xui.GetWindow("mapTracking");
if (window != null)
{
((XUiC_MapWaypointList)window.Controller.GetChildById("waypointList")).UpdateWaypointsList(null);
}
break;
}
}
}
return;
}
}
}