posibility to configure blood or cry when attack or being under attack
This commit is contained in:
parent
5ba7c54408
commit
c55a8f8dcd
@ -33,6 +33,11 @@ of the inventory. also once in the game type `/m` and press
|
||||
enter and you will get a crafting guide, equipping armor form
|
||||
and changing skin form.
|
||||
|
||||
### Configuration
|
||||
|
||||
By default each interaction of attack causes blood, but you
|
||||
can configure to make the enemy just cry with `enable_blood` to `false`
|
||||
|
||||
### Know issues
|
||||
|
||||
If yu got crash, somethigns you game get slow for movement, in singleplayer,
|
||||
@ -41,7 +46,6 @@ a block just stop it.
|
||||
To solve, go into your world directory and delete the affects.txt
|
||||
and physics file. This happens sometimes when there is a crash.
|
||||
|
||||
|
||||
Adventuretest License
|
||||
------------------------------------------
|
||||
Copyright (C) 2013-2014 Brandon Bohannon <brandon@bremaweb.com>
|
||||
|
@ -33,6 +33,11 @@ of the inventory. also once in the game type `/m` and press
|
||||
enter and you will get a crafting guide, equipping armor form
|
||||
and changing skin form.
|
||||
|
||||
### Configuration
|
||||
|
||||
By default each interaction of attack causes blood, but you
|
||||
can configure to make the enemy just cry with `enable_blood` to `false`
|
||||
|
||||
### Know issues
|
||||
|
||||
If yu got crash, somethigns you game get slow for movement, in singleplayer,
|
||||
@ -41,7 +46,6 @@ a block just stop it.
|
||||
To solve, go into your world directory and delete the affects.txt
|
||||
and physics file. This happens sometimes when there is a crash.
|
||||
|
||||
|
||||
Adventuretest License
|
||||
------------------------------------------
|
||||
Copyright (C) 2013-2014 Brandon Bohannon <brandon@bremaweb.com>
|
||||
|
@ -5,6 +5,8 @@ enable_node_highlighting = true
|
||||
|
||||
debug_log_level = action
|
||||
|
||||
enable_blood = true
|
||||
|
||||
torches_enable_ceiling = false
|
||||
torches_style = minetest
|
||||
|
||||
|
@ -3,6 +3,11 @@ adventuretest = {}
|
||||
|
||||
adventuretest.seed = os.time()
|
||||
|
||||
local enable_blood
|
||||
if minetest.setting_get("enable_blood") ~= nil then
|
||||
enable_blood = minetest.setting_getbool("enable_blood") or true
|
||||
end
|
||||
|
||||
game_origin = nil
|
||||
if minetest.setting_get("game_origin") ~= nil then
|
||||
game_origin = minetest.string_to_pos(minetest.setting_get("game_origin"))
|
||||
@ -10,6 +15,9 @@ else
|
||||
game_origin = {x=0,y=3,z=0}
|
||||
end
|
||||
|
||||
adventuretest.blood = enable_blood
|
||||
|
||||
|
||||
dofile(minetest.get_modpath("adventuretest").."/functions.lua");
|
||||
dofile(minetest.get_modpath("adventuretest").."/register_functions.lua");
|
||||
dofile(minetest.get_modpath("adventuretest").."/privs.lua")
|
||||
|
@ -216,10 +216,13 @@ end
|
||||
adventuretest.register_pl_hook(default.player_globalstep,0)
|
||||
|
||||
if minetest.register_on_punchplayer ~= nil then
|
||||
local enable_blood = adventuretest.blood
|
||||
local texture_blood_cry = "mobs_blood_blue.png"
|
||||
if enable_blood then texture_blood_cry = "mobs_blood.png" end
|
||||
minetest.register_on_punchplayer( function(player, hitter, time_from_last_punch, tool_capabilities, dir)
|
||||
local name = player:get_player_name()
|
||||
process_weapon(hitter,time_from_last_punch,tool_capabilities)
|
||||
blood_particles(player:getpos(),0.5,27,"mobs_blood.png")
|
||||
blood_particles(player:getpos(),0.5,27,texture_blood_cry)
|
||||
if player_anim[name] == "lay" or player_anim[name] == "sit" then
|
||||
player:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})
|
||||
local sleep_hud = pd.get(name,"sleep_hud")
|
||||
|
@ -1,5 +1,9 @@
|
||||
mobs = {}
|
||||
|
||||
local enable_blood = adventuretest.blood
|
||||
local texture_blood_cry = "mobs_blood_blue.png"
|
||||
if enable_blood then texture_blood_dry = "mobs_blood.png" end
|
||||
|
||||
dofile(minetest.get_modpath("mobs").."/step.lua")
|
||||
|
||||
mobs.mob_list = { npc={}, barbarian={}, monster={}, animal={}, npc_special={}}
|
||||
@ -58,7 +62,7 @@ function mobs:register_mob(name, def)
|
||||
knock_back = def.knock_back or 3,
|
||||
blood_offset = def.blood_offset or 0,
|
||||
blood_amount = def.blood_amount or 15,
|
||||
blood_texture = def.blood_texture or "mobs_blood.png",
|
||||
blood_texture = texture_blood_cry,
|
||||
rewards = def.rewards or nil,
|
||||
stationary = def.stationary or false,
|
||||
activity_level = def.activity_level or 10,
|
||||
|
BIN
mods/mobs/textures/mobs_blood_blue.png
Normal file
BIN
mods/mobs/textures/mobs_blood_blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Loading…
x
Reference in New Issue
Block a user