Add transparent texture
This commit is contained in:
parent
ecc6c16d42
commit
692fd3d659
BIN
mods/adventuretest/textures/transparent.png
Normal file
BIN
mods/adventuretest/textures/transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 B |
@ -28,8 +28,7 @@ mobs:register_mob("mobs:blacksmith",{
|
||||
if self.state ~= "path" and self.state ~= "working" then
|
||||
blacksmith_formspec(self,clicker)
|
||||
else
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=self.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(self,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=self.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
end
|
||||
end,
|
||||
walk_chance = 1,
|
||||
@ -62,6 +61,7 @@ mobs:register_mob("mobs:blacksmith",{
|
||||
lifetimer = false,
|
||||
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
||||
avoid_range = 4,
|
||||
icon = "mobs:icon_sell",
|
||||
})
|
||||
|
||||
-- list of active blacksmiths... I'm not sure how this is going to work when an entity is unloaded
|
||||
@ -71,8 +71,7 @@ function blacksmith_formspec(self,player)
|
||||
local name = player:get_player_name()
|
||||
if active_blacksmiths[name] == nil then
|
||||
mobs:face_pos(self,player:getpos())
|
||||
minetest.sound_play("mobs_blacksmith_what",{pos=self.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(self,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_what",{pos=self.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
active_blacksmiths[name] = {entity=self,inventory=nil,player=player,furnace=nil,active=false}
|
||||
local formspec = "size[8,6.25]"..
|
||||
"list[current_player;main;0,2.5;8,4;]"..
|
||||
@ -82,8 +81,7 @@ function blacksmith_formspec(self,player)
|
||||
"button_exit[5,1;2,1;cancel;Cancel]"
|
||||
minetest.show_formspec(name,"blacksmith",formspec)
|
||||
else
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=self.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(self,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=self.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
end
|
||||
end
|
||||
|
||||
@ -114,7 +112,6 @@ minetest.register_on_player_receive_fields(function(player,formname,fields)
|
||||
local stack = inv:get_stack("src",1)
|
||||
if stack:get_count() == 0 then
|
||||
chat.local_chat(player:getpos(),"Blacksmith: Please give me something to smelt",3)
|
||||
mobs.put_icon(blacksmith,"mobs:icon_notice",5)
|
||||
active_blacksmiths[name] = nil
|
||||
return
|
||||
else
|
||||
@ -138,8 +135,7 @@ minetest.register_on_player_receive_fields(function(player,formname,fields)
|
||||
local crNeeded = (stack:get_count() * 2)
|
||||
if money.get(name) < crNeeded then
|
||||
chat.local_chat(player:getpos(),"Blacksmith: Sorry, you don't have enough money. I charge 2cr per lump.")
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(blacksmith,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
active_blacksmiths[name] = nil
|
||||
return
|
||||
end
|
||||
@ -154,15 +150,13 @@ minetest.register_on_player_receive_fields(function(player,formname,fields)
|
||||
end)
|
||||
else
|
||||
chat.local_chat(player:getpos(),"Blacksmith: Sorry, I can't get to the furance.",3)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(blacksmith,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
active_blacksmiths[name] = nil
|
||||
return
|
||||
end
|
||||
else
|
||||
chat.local_chat(player:getpos(),"Blacksmith: Sorry, I don't see a furance in this area.",3)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.6})
|
||||
mobs.put_icon(blacksmith,"mobs:icon_notice",5)
|
||||
minetest.sound_play("mobs_blacksmith_sorry",{pos=blacksmith.object:getpos(),max_hear_distance=12,gain=0.5})
|
||||
active_blacksmiths[name] = nil
|
||||
-- TODO Get invnetory and throw item toward player
|
||||
end
|
||||
@ -207,7 +201,6 @@ function blacksmith_globalstep(dtime)
|
||||
bs.entity.state = "standing"
|
||||
bs.entity.set_animation(bs.entity,"stand")
|
||||
chat.local_chat(bs.entity.object:getpos(),"Blacksmith: "..name.." your ingots are ready!",25)
|
||||
mobs.put_icon(bs.entity,"mobs:icon_notice",5)
|
||||
active_blacksmiths[name] = nil -- I think it's all byref so bs = nil should also work
|
||||
meta:set_int("in_use",0)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user