mirror of
				https://github.com/sys4-fr/server-nalc.git
				synced 2025-10-31 04:25:32 +01:00 
			
		
		
		
	Change mobs api and add new mobs from (water_mobs, pmobs, kpgmobs, mob_horse)
This commit is contained in:
		
							
								
								
									
										4
									
								
								mods/mobs_water/mobs_crocs/License.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mods/mobs_water/mobs_crocs/License.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| Licenses | ||||
|  | ||||
| Model/Textures: GPL v3 | ||||
| Author: Team NPX | ||||
							
								
								
									
										21
									
								
								mods/mobs_water/mobs_crocs/SETTINGS.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								mods/mobs_water/mobs_crocs/SETTINGS.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
|  | ||||
| -- SETTINGS | ||||
|  | ||||
| ENABLE_WALKERS		= true | ||||
| -- these guys are spawned on land near water, they do not | ||||
| -- float so they will not attack you if they happen to | ||||
| -- stumble into the water (L.O.S. limitation*) | ||||
|  | ||||
| ENABLE_FLOATERS		= true | ||||
| -- these guys are spawned in shallow water, they float so they | ||||
| -- will follow you onto land to take a bite out of you | ||||
|  | ||||
| ENABLE_SWIMMERS		= true | ||||
| -- these guys are spawned in shallow water, they do not float so | ||||
| -- they will only attack if you attack first (L.O.S. limitation*) | ||||
|  | ||||
|  | ||||
| -- * note: Mobs not attacking while underwater is a limitation of | ||||
| --		the MineTest LineOfSight function used in the "mobs_redo" | ||||
| --		mod to check if there is anything to attack. Seems that | ||||
| --		mobs can't see through water. | ||||
							
								
								
									
										2
									
								
								mods/mobs_water/mobs_crocs/depends.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								mods/mobs_water/mobs_crocs/depends.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| mobs | ||||
							
								
								
									
										135
									
								
								mods/mobs_water/mobs_crocs/init.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								mods/mobs_water/mobs_crocs/init.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
|  | ||||
| if mobs.mod and mobs.mod == "redo" then | ||||
|  | ||||
| -- local variables | ||||
| 	local l_skins = { | ||||
| 		{"croco.png"}, | ||||
| 		{"croco2.png"} | ||||
| 	} | ||||
| 	local l_anims = { | ||||
| 		speed_normal = 24,	speed_run = 24, | ||||
| 		stand_start = 0,	stand_end = 80, | ||||
| 		walk_start = 81,	walk_end = 170, | ||||
| 		run_start = 81,		run_end = 170, | ||||
| 		punch_start = 205,	punch_end = 220 | ||||
| 	} | ||||
| 	local l_model			= "crocodile.x" | ||||
| 	local l_sounds			= {random = "croco"} | ||||
| 	local l_egg_texture		= "default_grass.png" | ||||
| 	local l_spawn_chance	= 60000 | ||||
|  | ||||
| -- load settings | ||||
| 	dofile(minetest.get_modpath("mobs_crocs").."/SETTINGS.txt") | ||||
| 	if not ENABLE_WALKERS then | ||||
| 		l_spawn_chance = l_spawn_chance - 20000 | ||||
| 	end | ||||
| 	if not ENABLE_FLOATERS then | ||||
| 		l_spawn_chance = l_spawn_chance - 20000 | ||||
| 	end | ||||
| 	if not ENABLE_SWIMMERS then | ||||
| 		l_spawn_chance = l_spawn_chance - 20000 | ||||
| 	end | ||||
|  | ||||
| -- no float | ||||
| 	if ENABLE_WALKERS then | ||||
| 		mobs:register_mob("mobs_crocs:crocodile", { | ||||
| 			type = "monster", | ||||
| 			attack_type = "dogfight", | ||||
| 			damage = 8, | ||||
| 			reach = 3, | ||||
| 			hp_min = 20, | ||||
| 			hp_max = 25, | ||||
| 			armor = 200, | ||||
| 			collisionbox = {-0.85, -0.30, -0.85, 0.85, 1.5, 0.85}, | ||||
| 			drawtype = "front", | ||||
| 			visual = "mesh", | ||||
| 			mesh = l_model, | ||||
| 			textures = l_skins, | ||||
| 			visual_size = {x=4, y=4}, | ||||
| 			sounds = l_sounds, | ||||
| 			fly = false, | ||||
| 			floats = 0, | ||||
| 			stepheight = 1, | ||||
| 			view_range = 10, | ||||
| 			water_damage = 0, | ||||
| 			lava_damage = 10, | ||||
| 			light_damage = 0, | ||||
| 			animation = l_anims | ||||
| 		}) | ||||
| 		--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height | ||||
| 		mobs:spawn_specific("mobs_crocs:crocodile", | ||||
| 			{"default:dirt_with_grass","default:dirt","default:jungle_grass","default:sand"}, | ||||
| 			{"default:water_flowing","default:water_source","default:papyrus","dryplants:juncus","dryplants:reedmace"}, | ||||
| 			-1, 18, 30, l_spawn_chance, 1, 0, 31000) | ||||
| 		mobs:register_egg("mobs_crocs:crocodile", "Crocodile", l_egg_texture, 1) | ||||
| 	end | ||||
|  | ||||
| -- float | ||||
| 	if ENABLE_FLOATERS then | ||||
| 		mobs:register_mob("mobs_crocs:crocodile_float", { | ||||
| 			type = "monster", | ||||
| 			attack_type = "dogfight", | ||||
| 			damage = 8, | ||||
| 			reach = 2, | ||||
| 			hp_min = 20, | ||||
| 			hp_max = 25, | ||||
| 			armor = 200, | ||||
| 			collisionbox = {-0.638, -0.23, -0.638, 0.638, 1.13, 0.638}, | ||||
| 			drawtype = "front", | ||||
| 			visual = "mesh", | ||||
| 			mesh = l_model, | ||||
| 			textures = l_skins, | ||||
| 			visual_size = {x=3, y=3}, | ||||
| 			sounds = l_sounds, | ||||
| 			fly = false, | ||||
| 			stepheight = 1, | ||||
| 			view_range = 10, | ||||
| 			water_damage = 0, | ||||
| 			lava_damage = 10, | ||||
| 			light_damage = 0, | ||||
| 			animation = l_anims | ||||
| 		}) | ||||
| 		--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height | ||||
| 		mobs:spawn_specific("mobs_crocs:crocodile_float", | ||||
| 			{"default:water_flowing","default:water_source"}, | ||||
| 			{"default:dirt_with_grass","default:jungle_grass","default:sand","default:dirt","default:papyrus","group:seaplants","dryplants:juncus","dryplants:reedmace"}, | ||||
| 			-1, 18, 30, l_spawn_chance, 1, -3, 31000) | ||||
| 		mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)", l_egg_texture, 1) | ||||
| 	end | ||||
|  | ||||
| -- swim | ||||
| 	if ENABLE_SWIMMERS then | ||||
| 		mobs:register_mob("mobs_crocs:crocodile_swim", { | ||||
| 			type = "monster", | ||||
| 			attack_type = "dogfight", | ||||
| 			damage = 8, | ||||
| 			reach = 1, | ||||
| 			hp_min = 20, | ||||
| 			hp_max = 25, | ||||
| 			armor = 200, | ||||
| 			collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.75, 0.425}, | ||||
| 			drawtype = "front", | ||||
| 			visual = "mesh", | ||||
| 			mesh = l_model, | ||||
| 			textures = l_skins, | ||||
| 			visual_size = {x=2, y=2}, | ||||
| 			sounds = l_sounds, | ||||
| 			fly = true, | ||||
| 			fly_in = "default:water_source", | ||||
| 			fall_speed = -1, | ||||
| 			floats = 0, | ||||
| 			view_range = 10, | ||||
| 			water_damage = 0, | ||||
| 			lava_damage = 10, | ||||
| 			light_damage = 0, | ||||
| 			animation = l_anims | ||||
| 		}) | ||||
| 		--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height | ||||
| 		mobs:spawn_specific("mobs_crocs:crocodile_swim", | ||||
| 			{"default:water_flowing","default:water_source"}, | ||||
| 			{"default:sand","default:dirt","group:seaplants"}, | ||||
| 			-1, 18, 30, l_spawn_chance, 1, -8, 31000) | ||||
| 		mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)", l_egg_texture, 1) | ||||
| 	end | ||||
|  | ||||
| end | ||||
							
								
								
									
										20286
									
								
								mods/mobs_water/mobs_crocs/models/crocodile.x
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20286
									
								
								mods/mobs_water/mobs_crocs/models/crocodile.x
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/sounds/croco.ogg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/sounds/croco.ogg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/textures/croco.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/textures/croco.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 9.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/textures/croco2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mods/mobs_water/mobs_crocs/textures/croco2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.2 KiB | 
		Reference in New Issue
	
	Block a user