Make "README.md" better
This commit is contained in:
		
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							@@ -1,15 +1,15 @@
 | 
				
			|||||||
# player_physics
 | 
					# Player Physics
 | 
				
			||||||
A minetest mod to centralize the management of player's stats(sprint, jump, gravity)
 | 
					A minetest mod to centralize the management of player's stats(sprint, jump, gravity)
 | 
				
			||||||
Because many mods (sprint, 3d_armor and others) rewrite the stats in their corner and it cancel
 | 
					Because many mods (sprint, 3d_armor and others) rewrite the stats in their corner and it cancel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
***API***
 | 
					## API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 - player_physics.set_stats(player, "uniq_name", table)
 | 
					 - player_physics.set_stats(player, "uniq_name", table)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 - player_physics.remove_stats(player, "uniq_name")
 | 
					 - player_physics.remove_stats(player, "uniq_name")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Exemple**
 | 
					## API examples
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 - player_physics.set_stats(player, "potion_speedlvl1", {speed=0.35})
 | 
					 - player_physics.set_stats(player, "potion_speedlvl1", {speed=0.35})
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -17,12 +17,12 @@ Because many mods (sprint, 3d_armor and others) rewrite the stats in their corne
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 - player_physics.remove_stats(player, "potion_speedlvl1")
 | 
					 - player_physics.remove_stats(player, "potion_speedlvl1")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Temporary effect**
 | 
					## Temporary effect
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 - player_physics.add_effect(player, "uniq_name", time, stats)
 | 
					 - player_physics.add_effect(player, "uniq_name", time, stats)
 | 
				
			||||||
 - player_physics.remove_effect(player, "uniq_name")
 | 
					 - player_physics.remove_effect(player, "uniq_name")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Exemple**
 | 
					## Code example
 | 
				
			||||||
You make a potion that adds speed for 10 seconds.
 | 
					You make a potion that adds speed for 10 seconds.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    on_use = function(itemstack, user, pointed_thing)
 | 
					    on_use = function(itemstack, user, pointed_thing)
 | 
				
			||||||
@@ -30,6 +30,3 @@ You make a potion that adds speed for 10 seconds.
 | 
				
			|||||||
       itemstack:take_item()
 | 
					       itemstack:take_item()
 | 
				
			||||||
       return itemstack
 | 
					       return itemstack
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user