-
-
Notifications
You must be signed in to change notification settings - Fork 10
Developer Quick Reference
Daemon Forge edited this page Jan 10, 2022
·
3 revisions
The Controller for Basic Map
BasicMapController BasicMap()
class BasicMapController
The plan for this is to allow party mod to override then and allow for the swapping of markers from client markers to party markers
static string PARTY_KEY = "";
void RegisterGroup(string id, BasicMapGroupMetaData metaData, BasicMapMarkerFactory factory)
Return the markers for a specified group
array<autoptr BasicMapMarker> GetMarkers(string id)
void AddMarker(string groupId, autoptr BasicMapMarker marker)
void CreateMarker(string group, string name, vector pos, bool overrideSettings = false)
This doesn't work yet but should allow you to move markers from one group to another once I finish
void ChangeGroups(string from, string to, BasicMapMarker marker)
Sets the marker array to a new array
void SetMarkers(string groupId, array<ref BasicMapMarker> markers)
//Remove marker with the key (can do it without the key but theoretically would be harder on performance)
void RemoveMarker(string key, ref BasicMapMarker marker)
bool RemoveMarker(ref BasicMapMarker marker)
//If you know the index you can remove by index
void RemoveMarkerByIndex(string key, int index)
Clears the array but keeps the map entry
void ClearMarkers(string key)
Removes the full group from the map
void RemoveAllMarkers(string key)
void SetMarkersRemote(string group, array<autoptr BasicMapMarker> markers, PlayerIdentity toPlayer = NULL )
Sample
array<autoptr BasicMapMarker> markers = new array<autoptr BasicMapMarker> markers;
markers.Insert(new BasicMapMarker("MarkerName", position, "path\\to\\icon", {255,255,255}));
BasicMap().SetMarkersRemote("MODNAME", markers, PlayerIdentity); //Or Null to send to all players
void UpdateGroupRemote(string group, PlayerIdentity toPlayer = NULL ) //Broken right now
void RequestGroupUpdate(string group)
overrideSettings override the CanEdit Setting in the marker to allow you to hard code changes
BasicMapMarker GetMarkerByVector(vector pos, float distance = 10, bool overrideSettings = false)
overrideSettings override the CanEdit Setting in the marker to allow you to hard code changes
bool RemoveMarkerByVector(vector pos, float distance = 10, bool overrideSettings = false)
Called on the Initizliation of the Controller
void Init()
void ServerFirstRun()
//Markers are updated live this is more just on marker editor close or marker created
void OnMarkerSave(BasicMapMarker marker)
When a marker is deleted or removed
void OnMarkerDelete(BasicMapMarker marker)
void SetMarkersOnHUD(bool onHUD)
void ToggleMarkersOnHUD()
bool ShowMarkersOnHUD()
bool ShouldShowOnHUD(string group)
bool ShouldShowOnMap(string group)
BasicMapGroupMetaData GetGroup(string id)
string GetGroupName(string id)
map< string, ref BasicMapGroupMetaData> GetGroups()
int Count()
BasicMapMarker Marker(int i)
static string GetInfoText()
array<autoptr BasicMapMarker> ClientMarkers()
int AddClientMarker(BasicMapMarker marker)
BasicMapMarker ClientMarker(int i)