mark ones still to test, fix edit of map markers

This commit is contained in:
CWX
2025-02-01 19:29:48 +00:00
parent 78f1815972
commit b9be82e7a3
3 changed files with 25 additions and 16 deletions
@@ -12,10 +12,10 @@ public record HideoutEventActions
public const string HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart"; // worked
public const string HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction"; // worked
public const string HIDEOUT_RECORD_SHOOTING_RANGE_POINTS = "RecordShootingRangePoints"; // worked
public const string HIDEOUT_IMPROVE_AREA = "HideoutImproveArea";
public const string HIDEOUT_CANCEL_PRODUCTION_COMMAND = "HideoutCancelProductionCommand";
public const string HIDEOUT_IMPROVE_AREA = "HideoutImproveArea"; // <--------------- Test
public const string HIDEOUT_CANCEL_PRODUCTION_COMMAND = "HideoutCancelProductionCommand"; // <--------------- Test
public const string HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START = "HideoutCircleOfCultistProductionStart"; // Borked
public const string HIDEOUT_DELETE_PRODUCTION_COMMAND = "HideoutDeleteProductionCommand";
public const string HIDEOUT_DELETE_PRODUCTION_COMMAND = "HideoutDeleteProductionCommand"; // <--------------- Test
public const string HIDEOUT_CUSTOMIZATION_APPLY_COMMAND = "HideoutCustomizationApply"; // worked
public const string HIDEOUT_CUSTOMIZATION_SET_MANNEQUIN_POSE = "HideoutCustomizationSetMannequinPose"; // worked
}
+10 -10
View File
@@ -12,13 +12,13 @@ public record ItemEventActions
public const string TOGGLE = "Toggle"; // worked
public const string TAG = "Tag"; // worked
public const string BIND = "Bind"; // worked
public const string UNBIND = "Unbind"; // ??
public const string UNBIND = "Unbind"; // <--------------- Test
public const string EXAMINE = "Examine"; // worked
public const string READ_ENCYCLOPEDIA = "ReadEncyclopedia"; // worked
public const string APPLY_INVENTORY_CHANGES = "ApplyInventoryChanges"; // worked
public const string CREATE_MAP_MARKER = "CreateMapMarker"; // worked
public const string DELETE_MAP_MARKER = "DeleteMapMarker"; // worked
public const string EDIT_MAP_MARKER = "EditMapMarker"; // Borked
public const string EDIT_MAP_MARKER = "EditMapMarker"; // worked
public const string OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer"; // worked
public const string HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent"; // worked
public const string SAVE_WEAPON_BUILD = "SaveWeaponBuild"; // this is an endpoint now?
@@ -26,9 +26,9 @@ public record ItemEventActions
public const string REMOVE_BUILD = "RemoveBuild"; // this is an endpoint now?
public const string SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild"; // this is an endpoint now?
public const string REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild"; // this is an endpoint now?
public const string REDEEM_PROFILE_REWARD = "RedeemProfileReward"; // ??
public const string REDEEM_PROFILE_REWARD = "RedeemProfileReward"; // <--------------- Test
public const string SET_FAVORITE_ITEMS = "SetFavoriteItems"; // worked
public const string QUEST_FAIL = "QuestFail";
public const string QUEST_FAIL = "QuestFail"; // <--------------- Test
public const string PIN_LOCK = "PinLock"; // worked
public const string ADD_NOTE = "AddNote"; // worked
public const string EDIT_NOTE = "EditNote"; // worked
@@ -42,17 +42,17 @@ public record ItemEventActions
public const string RAGFAIR_ADD_OFFER = "RagFairAddOffer"; // worked
public const string TRADER_REPAIR = "TraderRepair"; // worked
public const string REPAIR = "Repair"; // worked
public const string SELL_ALL_FROM_SAVAGE = "SellAllFromSavage";
public const string SELL_ALL_FROM_SAVAGE = "SellAllFromSavage"; // <--------------- Test
public const string RAGFAIR_BUY_OFFER = "RagFairBuyOffer"; // worked
public const string TRADING_CONFIRM = "TradingConfirm"; // worked
public const string BUY_FROM_TRADER = "buy_from_trader"; // worked
public const string SELL_TO_TRADER = "sell_to_trader"; // worked
public const string CHANGE_WISHLIST_ITEM_CATEGORY = "ChangeWishlistItemCategory"; // cant test till add works
public const string REMOVE_FROM_WISHLIST = "RemoveFromWishList"; // cant test till add works
public const string ADD_TO_WISHLIST = "AddToWishList"; // Borked
public const string CHANGE_WISHLIST_ITEM_CATEGORY = "ChangeWishlistItemCategory"; // worked
public const string REMOVE_FROM_WISHLIST = "RemoveFromWishList"; // worked
public const string ADD_TO_WISHLIST = "AddToWishList"; // worked
public const string INSURE = "Insure"; // worked
public const string RESTORE_HEALTH = "RestoreHealth";
public const string HEAL = "Heal";
public const string RESTORE_HEALTH = "RestoreHealth"; // <--------------- Test
public const string HEAL = "Heal"; // worked
public const string EAT = "Eat"; // worked
public const string CUSTOMIZATION_SET = "CustomizationSet"; // worked
public const string CUSTOMIZATION_BUY = "CustomizationBuy"; // worked
+12 -3
View File
@@ -57,15 +57,24 @@ public class MapMarkerService(
/// <param name="pmcData">Player profile</param>
/// <param name="request">Edit marker request</param>
/// <returns>Item</returns>
public Item EditMarkerOnMap(PmcData pmcData, InventoryEditMarkerRequestData request)
public Item? EditMarkerOnMap(PmcData pmcData, InventoryEditMarkerRequestData request)
{
// Get map from inventory
var mapItem = pmcData.Inventory.Items.FirstOrDefault((item) => item.Id == request.Item);
// edit marker
var indexOfExistingNote = mapItem.Upd.Map.Markers.IndexOf(request.MapMarker);
// the only thing that is consistent between the old and edit is the X and Y
// find the marker where X and Y match
var markerToRemove = mapItem.Upd.Map.Markers.FirstOrDefault(x => x.X == request.X && x.Y == request.Y);
if (markerToRemove is null)
{
_logger.Warning($"No marker found for item {request.Item}");
return null;
}
request.MapMarker.Note = SanitiseMapMarkerText(request.MapMarker.Note);
mapItem.Upd.Map.Markers.RemoveAt(indexOfExistingNote);
mapItem.Upd.Map.Markers.Remove(markerToRemove);
mapItem.Upd.Map.Markers.Add(request.MapMarker);
return mapItem;