Browse Source

Add advmarkers-ssm integration

master
luk3yx 8 months ago
parent
commit
8d0180feac
3 changed files with 14 additions and 1 deletions
  1. 1
    1
      LICENSE.md
  2. 3
    0
      README.md
  3. 10
    0
      init.lua

+ 1
- 1
LICENSE.md View File

@@ -1,7 +1,7 @@

# The MIT License (MIT)

*Copyright © 2018 by luk3yx*
*Copyright © 2019 by luk3yx*

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

+ 3
- 0
README.md View File

@@ -14,6 +14,8 @@ create HUDs on their own.
- `.add_mrkr`: Adds markers. You can use `.add_mrkr x,y,z Marker name` to add markers. Markers are (currently) cross-server, and adding a marker with (exactly) the same name as another will overwrite the original marker. If you replace `x,y,z` with `here`, the marker will be set to your current position, and replacing it with `there` will set the marker to the last `.coords` position.
- `.mrkr_export`: Exports your markers to an advmarkers string. Remember to not modify the text before copying it. You can use `.mrkr_export old` if you want an export string compatible with older versions of advmarkers (it should start with `M` instead of `J`). The old format will probably not work nicely with the planned server-side mod, however.
- `.mrkr_import`: Imports your markers from an advmarkers string (`.mrkr_import <advmarkers string>`). Any markers with the same name will not be overwritten, and if they do not have the same co-ordinates, `_` will be appended to the imported one.
- `.mrkr_upload`: Uploads your markers to your current server's advmarkers
[SSM].
- `.mrkrthere`: Sets a marker at the last `.coords` position.

If you die, a marker is automatically added at your death position, and will
@@ -30,3 +32,4 @@ at the `.coords` position with `.mrkrthere`, or add a permanent marker with
[marker]: https://github.com/Billy-S/kingdoms_game/blob/master/mods/marker
[GitHub]: https://github.com/luk3yx/minetest-chat_channels
[GitLab]: https://gitlab.com/luk3yx/minetest-chat_channels
[SSM]: https://gitlab.com/luk3yx/minetest-advmarkers-ssm

+ 10
- 0
init.lua View File

@@ -364,6 +364,16 @@ minetest.register_chatcommand('mrkr_import', {
end
})

-- Upload markers to the advmarkers server-side mod.
minetest.register_chatcommand('mrkr_upload', {
params = '',
description = 'Uploads all markers to this server\'s advmarkers storage.',
func = function(param)
local data = advmarkers.export()
minetest.run_server_chatcommand('mrkr_import', data)
end
})

-- Chat channels .coords integration.
-- You do not need to have chat channels installed for this to work.
if not minetest.registered_on_receiving_chat_message then

Loading…
Cancel
Save