[Client] MapMarkers

Started by Mars, June 05, 2020, 11:48:31 PM

Mars

MapMarkers

Marks on your map and mini-map.

How to use: You can add marks on your map by left clicking anywhere, works only with the full map (M key), but you can see the marks on the mini-map too. 
If you left click near a mark, you will remove it. 
You can remove all marks with right click and "remove all marks" command.
Also a right click command to "copy" a mark, same way as copy coordinates.  If you paste it in the chat, anyone with the mod will get a pink mark on their map, (only the last 5 pink marks are visible)
Your own marks are orange, the Marketplace marks (version 0.1.2) are orange too.


Screenshot:

   
Mod type: Client-side mod.

Latest version: 0.2.2

Changelog:
0.2.2
Changes for A29 Member visualizer.
0.2.1
Changes for A29 Base visualizers.
0.2.0
Changes to compile in A29
0.1.3
Changes to compile in A28.
0.1.2
Using ClientNotificationDisplayed event
0.1.1
Changes to compile in A27.

Download latest version A29: here (https://drive.google.com/file/d/13qkkxB6hX_B5jqcDplHteAdfYxECsejJ/view?usp=sharing)

GitHub : https://github.com/mars-x24/MapMarkers


How to install mod:
File "ModsConfig.xml":

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mods>
  <mod>core_1.0.0</mod>
  <mod>mapmarkers</mod>
</mods>


ai_enabled

This is an impressive mod. Congratulations! :-)
Thank you for working on it!

It might be tough to keep it updated for future versions as we will modify some of the source code.
Please consider uploading it to Github like Djekke does for his mods https://github.com/Djekke/CNEI

Regards!

Mars

Thanks, I understand the marketplace will probably die with A27 or later, but if you think this one can survive to A27 with some modifications, I will add it on github

It would be nice if you add an event like this one in the notification system, same as ChatSystem
ChatSystem.ClientChatRoomMessageReceived += ChatSystem_ClientChatRoomMessageReceived;

ai_enabled

Not in A27, maybe in A28 or even later so marketplace mod would prove useful. :-)

Regarding the C# event for the notification systemΓÇösure, we can add it easily.

Regards!

Mars

Updated the file to work in A27.  If anyone can test the "copy mark" from another player in chat, let me know if it still works.  From Marketplace notification too.

ai_enabled: Did you add an event for notification message yet?

ai_enabled

The event is not added yet. Still in my tasks list so it will be done during the experimental stage.

ai_enabled

The event is added in the latest experimental patch released yesterday. See NotificationSystem, ClientNotificationDisplayed event.

Regards!

Mars

Using it now, thanks!

Do you know how I can add my IWorldMapVisualizer in the list HUDMiniMap.visualisers without overriding the whole HUDMiniMap class? Same thing with WindowWorldMap.

ai_enabled

@Mars, there is currently no way to do so, I will think about it.

Mars

#9
Quote from: ai_enabled on July 03, 2020, 04:14:03 AM
The event is added in the latest experimental patch released yesterday. See NotificationSystem, ClientNotificationDisplayed event.

Regards!

It would be nice to have one in ClientShowItemsNotification too :)

ai_enabled

Quote from: Mars on September 24, 2020, 08:32:11 PM
I would be nice to have one in ClientShowItemsNotification too :)
Done for A28 UpdateΓÇöClientItemNotificationDisplayed event in NotificationSystem.

Mars

Nice, but the event is only giving me "HUDItemNotificationControl obj".

I need the ProtoItem, it is in the viewModel but it is private "private ViewModelHUDItemNotificationControl viewModel;"

ai_enabled

Oops! I think for now you can get it by casting obj.DataContext to ViewModelHUDItemNotificationControl but it may be empty as the control might be not loaded yet. You can try calling obj.UpdateLayout() to make it load immediately as it's already added in the notification panel.

Regards!

Mars

Worked with UpdateLayout(), thanks!

Mars