Author Topic: [Client] MapMarkers  (Read 6693 times)

Mars

  • Full Member
  • ***
  • Posts: 131
    • View Profile
[Client] MapMarkers
« on: June 05, 2020, 11:48:31 pm »
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

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


How to install mod:
File "ModsConfig.xml":
Code: [Select]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mods>
  <mod>core_1.0.0</mod>
  <mod>mapmarkers</mod>
</mods>
« Last Edit: December 23, 2020, 10:18:28 pm by Mars »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #1 on: June 06, 2020, 05:24:22 pm »
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

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #2 on: June 06, 2020, 10:23:07 pm »
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.ClientChatRoomMess ageReceived += ChatSystem_ClientChatRoomMess ageReceived;

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #3 on: June 09, 2020, 05:17:37 pm »
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

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #4 on: June 30, 2020, 08:48:32 pm »
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

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #5 on: June 30, 2020, 10:59:39 pm »
The event is not added yet. Still in my tasks list so it will be done during the experimental stage.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #6 on: July 03, 2020, 04:14:03 am »
The event is added in the latest experimental patch released yesterday. See NotificationSystem, ClientNotificationDisplayed event.

Regards!

Mars

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #7 on: July 05, 2020, 07:15:46 pm »
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

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #8 on: July 06, 2020, 02:02:06 am »
@Mars, there is currently no way to do so, I will think about it.

Mars

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #9 on: September 24, 2020, 08:32:11 pm »
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 :)
« Last Edit: October 06, 2020, 12:34:07 pm by Mars »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #10 on: October 02, 2020, 05:57:35 pm »
I would be nice to have one in ClientShowItemsNotification too :)
Done for A28 Update—ClientItemNotificationDisplayed event in NotificationSystem.

Mars

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #11 on: October 03, 2020, 06:07:02 pm »
Nice, but the event is only giving me "HUDItemNotificationControl obj".

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

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1945
    • View Profile
Re: [Client] MapMarkers
« Reply #12 on: October 03, 2020, 06:26:21 pm »
Oops! I think for now you can get it by casting obj.DataContext to ViewModelHUDItemNotificationC ontrol 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

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #13 on: October 03, 2020, 09:07:28 pm »
Worked with UpdateLayout(), thanks!

Mars

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: [Client] MapMarkers
« Reply #14 on: October 03, 2020, 09:11:05 pm »
Updated for A28