silkworm!

master
runs 2019-08-15 23:21:27 +02:00
parent 82e69de302
commit d52c005d00
5 changed files with 6 additions and 4 deletions

View File

@ -64,7 +64,8 @@ petz.on_rightclick = function(self, clicker)
petz.set_owner(self, player_name, false)
end
petz.capture(self, clicker, true)
minetest.chat_send_player("singleplayer", S("Your").." "..self.type.." "..S("has been captured")..".")
local pet_name = self.type:gsub("^%l", string.upper)
minetest.chat_send_player("singleplayer", S("Your").." "..S(pet_name).." "..S("has been captured")..".")
elseif self.breed and wielded_item_name == petz.settings[self.type.."_breed"] and not(self.is_baby) then
petz.breed(self, clicker, wielded_item, wielded_item_name)
elseif (wielded_item_name == "petz:dreamcatcher") and (self.tamed == true) and (self.is_pet == true) and (self.owner == player_name) then

View File

@ -23,7 +23,7 @@ petz.settings = {}
petz.settings.mesh = nil
petz.settings.visual_size = {}
petz.settings.rotate = 0
petz.settings.tamagochi_safe_nodes = {} --Table with safe nodes for tamagochi mode
assert(loadfile(modpath .. "/settings.lua"))(modpath, S) --Load the settings
petz.petz_list = string.split(petz.settings.petz_list, ',') --A list with all the petz names

View File

@ -70,7 +70,7 @@ elephant_female_spawn = true
moth_spawn = true
camel_spawn = true
bat_spawn = true
silkworm_spawn = false
silkworm_spawn = true
##Air Damage
air_damage = 1

View File

@ -10,6 +10,7 @@ petz.settings.tamagochi_hunger_damage = tonumber(settings:get("tamagochi_hunger_
petz.settings.tamagochi_check_if_player_online = settings:get_bool("tamagochi_check_if_player_online", true)
--Create a table with safe nodes
local tamagochi_safe_nodes = settings:get("tamagochi_safe_nodes", "")
petz.settings.tamagochi_safe_nodes = {} --Table with safe nodes for tamagochi mode
petz.settings.tamagochi_safe_nodes = string.split(tamagochi_safe_nodes, ',')
--Air Damage
petz.settings.air_damage = tonumber(settings:get("air_damage"))

View File

@ -46,7 +46,7 @@ minetest.register_entity("petz:"..pet_name,{
jump_height = 1.0,
view_range = 10,
lung_capacity = 10, -- seconds
max_hp = 8,
max_hp = 2,
attack={range=0.5, damage_groups={fleshy=3}},
animation = {