From 94f311b43f9629aa3a49006f12fcf4f0d347a770 Mon Sep 17 00:00:00 2001 From: Lone_Wolf Date: Mon, 30 Dec 2019 12:48:38 -0800 Subject: [PATCH] Fix markdown --- api.md | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/api.md b/api.md index 82258cb..db6f8de 100644 --- a/api.md +++ b/api.md @@ -1,24 +1,26 @@ -#Grenades API +# Grenades API Still WIP. Please suggest new features here: https://forum.minetest.net/viewtopic.php?f=9&t=21466 -##API +## API - grenades.register_grenade("name", { -- Name of the grenade (Like 'smoke' or 'flashbang') - description = "", -- A short description of the grenade. - image = "", -- The name of the grenade's texture - on_explode = function(pos, name) - -- This function is called when the grenade 'explodes' - -- the place the grenade 'exploded' at - -- the name of the player that threw the grenade - end, - placeable = false, -- Optional, default is false - clock = 3, -- Optional, controls how long until grenade detonates. Default is 3 - particle = { -- Adds particles in the grenade's trail - image = "grenades_smoke.png", -- The particle's image - life = 1, -- How long (seconds) it takes for the particle to disappear - size = 4, -- Size of the particle - glow = 0, -- Brightens the texture in darkness - interval = 5, -- How long it takes before a particle can be added - } - }) +```lua +grenades.register_grenade("name", { -- Name of the grenade (Like 'smoke' or 'flashbang') + description = "", -- A short description of the grenade. + image = "", -- The name of the grenade's texture + on_explode = function(pos, name) + -- This function is called when the grenade 'explodes' + -- the place the grenade 'exploded' at + -- the name of the player that threw the grenade + end, + placeable = false, -- Optional, default is false + clock = 3, -- Optional, controls how long until grenade detonates. Default is 3 + particle = { -- Adds particles in the grenade's trail + image = "grenades_smoke.png", -- The particle's image + life = 1, -- How long (seconds) it takes for the particle to disappear + size = 4, -- Size of the particle + glow = 0, -- Brightens the texture in darkness + interval = 5, -- How long it takes before a particle can be added + } +}) +```