forked from nalc/death_messages
		
	Update mod.conf, reformat init.lua, and add luacheckrc
This commit is contained in:
		
							
								
								
									
										36
									
								
								.luacheckrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.luacheckrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| read_globals = { | ||||
| 	"DIR_DELIM", | ||||
| 	"minetest", "core", | ||||
| 	"dump", "dump2", | ||||
| 	"vector", | ||||
| 	"VoxelManip", "VoxelArea", | ||||
| 	"PseudoRandom", "PcgRandom", | ||||
| 	"ItemStack", | ||||
| 	"Settings", | ||||
| 	"unpack", | ||||
|  | ||||
| 	table = { | ||||
| 		fields = { | ||||
| 			"copy", | ||||
| 			"indexof", | ||||
| 			"insert_all", | ||||
| 			"key_value_swap", | ||||
| 		} | ||||
| 	}, | ||||
|  | ||||
| 	string = { | ||||
| 		fields = { | ||||
| 			"split", | ||||
| 			"trim", | ||||
| 		} | ||||
| 	}, | ||||
|  | ||||
| 	math = { | ||||
| 		fields = { | ||||
| 			"hypot", | ||||
| 			"sign", | ||||
| 			"factorial" | ||||
| 		} | ||||
| 	}, | ||||
| } | ||||
| max_line_length = 80 | ||||
| @@ -7,7 +7,7 @@ | ||||
|  | ||||
| A Minetest mod which sends a chat message when a player dies. | ||||
|  | ||||
| Version: 0.1.3 | ||||
| Version: 0.1.4 | ||||
| License: GPL v3 (see LICENSE.txt) | ||||
|  | ||||
| Dependencies: | ||||
|   | ||||
							
								
								
									
										18
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								init.lua
									
									
									
									
									
								
							| @@ -16,13 +16,13 @@ You should have received a copy of the GNU General Public License | ||||
| along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
| --]] | ||||
|  | ||||
| ----------------------------------------------------------------------------------------------- | ||||
| -------------------------------------------------------------------------------- | ||||
| local title = "Death Messages" | ||||
| local version = "0.1.2" | ||||
| local version = "0.1.4" | ||||
| local mname = "death_messages" | ||||
| ----------------------------------------------------------------------------------------------- | ||||
| -------------------------------------------------------------------------------- | ||||
| dofile(minetest.get_modpath("death_messages").."/settings.txt") | ||||
| ----------------------------------------------------------------------------------------------- | ||||
| -------------------------------------------------------------------------------- | ||||
|  | ||||
| -- A table of quips for death messages.  The first item in each sub table is the | ||||
| -- default message used when RANDOM_MESSAGES is disabled. | ||||
| @@ -54,7 +54,7 @@ messages.fire = { | ||||
|     " got a little too warm.", | ||||
|     " got too close to the camp fire.", | ||||
|     " just got roasted, hotdog style.", | ||||
| 	" gout burned up. More light that way." | ||||
|     " got burned up. More light that way." | ||||
| } | ||||
|  | ||||
| -- Other death messages | ||||
| @@ -76,7 +76,9 @@ end | ||||
|  | ||||
| minetest.register_on_dieplayer(function(player) | ||||
|     local player_name = player:get_player_name() | ||||
| 	local node = minetest.registered_nodes[minetest.get_node(player:getpos()).name] | ||||
|     local node = minetest.registered_nodes[ | ||||
|         minetest.get_node(player:getpos()).name | ||||
|     ] | ||||
|     if minetest.is_singleplayer() then | ||||
|         player_name = "You" | ||||
|     end | ||||
| @@ -96,6 +98,6 @@ minetest.register_on_dieplayer(function(player) | ||||
|  | ||||
| end) | ||||
|  | ||||
| ----------------------------------------------------------------------------------------------- | ||||
| -------------------------------------------------------------------------------- | ||||
| print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...") | ||||
| ----------------------------------------------------------------------------------------------- | ||||
| -------------------------------------------------------------------------------- | ||||
|   | ||||
		Reference in New Issue
	
	Block a user