1
0
Fork 0

Merge branch 'master' into dyable-leather-armor

This commit is contained in:
AFCMS 2021-03-30 22:28:25 +02:00
commit e7166430d7
65 changed files with 175 additions and 145 deletions

View File

@ -1,6 +1,6 @@
local S = minetest.get_translator("mcl_boats")
local boat_visual_size = {x = 3, y = 3, z = 3}
local boat_visual_size = {x = 1, y = 1, z = 1}
local paddling_speed = 22
local boat_y_offset = 0.35
local boat_y_offset_ground = boat_y_offset + 0.6
@ -12,9 +12,7 @@ local function is_group(pos, group)
return minetest.get_item_group(nn, group) ~= 0
end
local function is_water(pos)
return is_group(pos, "water")
end
local is_water = flowlib.is_water
local function is_ice(pos)
return is_group(pos, "ice")

View File

@ -1,7 +1,7 @@
name = mcl_boats
author = PilzAdam
description = Adds drivable boats.
depends = mcl_player
depends = mcl_player, flowlib
optional_depends = mcl_core, doc_identifier

View File

@ -2,7 +2,7 @@ local S = minetest.get_translator("mcl_falling_nodes")
local dmes = minetest.get_modpath("mcl_death_messages") ~= nil
local has_mcl_armor = minetest.get_modpath("mcl_armor")
local his_creative_enabled = minetest.is_creative_enabled
local is_creative_enabled = minetest.is_creative_enabled
local get_falling_depth = function(self)
if not self._startpos then
@ -53,7 +53,7 @@ local deal_falling_damage = function(self, dtime)
local helmet = inv:get_stack("armor", 2)
if has_mcl_armor and not helmet:is_empty() then
hp = hp/4*3
if not his_creative_enabled(name) then
if not is_creative_enabled(name) then
helmet:add_wear(65535/helmet:get_definition().groups.mcl_armor_uses) --TODO: be sure damage is exactly like mc (informations are missing in the mc wiki)
inv:set_stack("armor", 2, helmet)
end

View File

@ -1,5 +1,7 @@
local S = minetest.get_translator("mcl_minecarts")
local has_mcl_wip = minetest.get_modpath("mcl_wip")
mcl_minecarts = {}
mcl_minecarts.modpath = minetest.get_modpath("mcl_minecarts")
mcl_minecarts.speed_max = 10
@ -663,8 +665,6 @@ register_minecart(
{"mcl_minecarts:minecart", "mcl_chests:chest"},
nil, nil, false)
mcl_wip.register_wip_item("mcl_minecarts:chest_minecart")
-- Minecart with Furnace
register_minecart(
"mcl_minecarts:furnace_minecart",
@ -719,8 +719,6 @@ register_minecart(
end, nil, false
)
mcl_wip.register_wip_item("mcl_minecarts:furnace_minecart")
-- Minecart with Command Block
register_minecart(
"mcl_minecarts:command_block_minecart",
@ -742,8 +740,6 @@ register_minecart(
nil, nil, false
)
mcl_wip.register_wip_item("mcl_minecarts:command_block_minecart")
-- Minecart with Hopper
register_minecart(
"mcl_minecarts:hopper_minecart",
@ -762,8 +758,6 @@ register_minecart(
nil, nil, false
)
mcl_wip.register_wip_item("mcl_minecarts:hopper_minecart")
-- Minecart with TNT
register_minecart(
"mcl_minecarts:tnt_minecart",
@ -824,29 +818,34 @@ minetest.register_craft({
-- TODO: Re-enable crafting of special minecarts when they have been implemented
if false then
minetest.register_craft({
minetest.register_craft({
output = "mcl_minecarts:furnace_minecart",
recipe = {
{"mcl_furnaces:furnace"},
{"mcl_minecarts:minecart"},
},
})
})
minetest.register_craft({
minetest.register_craft({
output = "mcl_minecarts:hopper_minecart",
recipe = {
{"mcl_hoppers:hopper"},
{"mcl_minecarts:minecart"},
},
})
})
minetest.register_craft({
minetest.register_craft({
output = "mcl_minecarts:chest_minecart",
recipe = {
{"mcl_chests:chest"},
{"mcl_minecarts:minecart"},
},
})
})
end
if has_mcl_wip then
mcl_wip.register_wip_item("mcl_minecarts:chest_minecart")
mcl_wip.register_wip_item("mcl_minecarts:furnace_minecart")
mcl_wip.register_wip_item("mcl_minecarts:command_block_minecart")
mcl_wip.register_wip_item("mcl_minecarts:hopper_minecart")
end

View File

@ -1,6 +1,6 @@
name = mcl_minecarts
author = Krock
description = Minecarts are vehicles to move players quickly on rails.
depends = mcl_explosions, mcl_core, mcl_sounds, mcl_player, mcl_achievements, mcl_chests, mcl_furnaces, mesecons_commandblock, mcl_hoppers, mcl_tnt, mesecons, mcl_wip
optional_depends = doc_identifier
depends = mcl_explosions, mcl_core, mcl_sounds, mcl_player, mcl_achievements, mcl_chests, mcl_furnaces, mesecons_commandblock, mcl_hoppers, mcl_tnt, mesecons
optional_depends = doc_identifier, mcl_wip

View File

@ -521,7 +521,7 @@ if c("totem") then
-- Totem of Undying
minetest.register_craftitem("mobs_mc:totem", {
description = S("Totem of Undying"),
_tt_help = minetest.colorize("#00FF00", S("Protects you from death while wielding it")),
_tt_help = minetest.colorize(mcl_colors.GREEN, S("Protects you from death while wielding it")),
_doc_items_longdesc = S("A totem of undying is a rare artifact which may safe you from certain death."),
_doc_items_usagehelp = S("The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however."),
inventory_image = "mcl_totems_totem.png",

View File

@ -1,6 +1,6 @@
name = mobs_mc
author = maikerumine
description = Adds Minecraft-like monsters and animals.
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_colors
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, mobs_mc_gameconfig, doc_items

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -516,7 +516,7 @@ local function show_trade_formspec(playername, trader, tradenum)
"size[9,8.75]"
.."background[-0.19,-0.25;9.41,9.49;mobs_mc_trading_formspec_bg.png]"
..disabled_img
.."label[4,0;"..F(minetest.colorize("#313131", S(profession))).."]"
.."label[4,0;"..F(minetest.colorize(mcl_colors.DARK_GRAY, S(profession))).."]"
.."list[current_player;main;0,4.5;9,3;9]"
.."list[current_player;main;0,7.74;9,1;]"
..b_prev..b_next

View File

@ -16,7 +16,7 @@ mobs:register_mob("mobs_mc:wither", {
hp_min = 300,
xp_min = 50,
xp_max = 50,
armor = {undead = 80, fleshy = 80},
armor = {undead = 80, fleshy = 100},
-- This deviates from MC Wiki's size, which makes no sense
collisionbox = {-0.9, 0.4, -0.9, 0.9, 2.45, 0.9},
visual = "mesh",
@ -66,6 +66,14 @@ mobs:register_mob("mobs_mc:wither", {
run_start = 0, run_end = 20,
},
harmed_by_heal = true,
do_custom = function(self)
if self.health < (self.hp_max / 2) then
self.base_texture = "mobs_mc_wither_half_health.png"
self.fly = false
self.object:set_properties({textures={self.base_texture}})
self.armor = {undead = 80, fleshy = 80}
end
end,
on_spawn = function(self)
minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64})
end,

View File

@ -1,13 +1,7 @@
local S = minetest.get_translator("doc")
local F = function(f) return minetest.formspec_escape(S(f)) end
-- Compability for 0.4.14 or earlier
local colorize
if minetest.colorize then
colorize = minetest.colorize
else
colorize = function(color, text) return text end
end
local colorize = minetest.colorize
doc = {}
@ -41,10 +35,10 @@ doc.FORMSPEC.ENTRY_HEIGHT = doc.FORMSPEC.ENTRY_END_Y - doc.FORMSPEC.ENTRY_START_
-- Internal helper variables
local DOC_INTRO = S("This is the help.")
local COLOR_NOT_VIEWED = "#00FFFF" -- cyan
local COLOR_VIEWED = "#FFFFFF" -- white
local COLOR_HIDDEN = "#999999" -- gray
local COLOR_ERROR = "#FF0000" -- red
local COLOR_NOT_VIEWED = mcl_colors.AQUA
local COLOR_VIEWED = mcl_colors.WHITE
local COLOR_HIDDEN = mcl_colors.GRAY
local COLOR_ERROR = mcl_colors.RED
local CATEGORYFIELDSIZE = {
WIDTH = math.ceil(doc.FORMSPEC.WIDTH / 4),
@ -776,7 +770,7 @@ function doc.generate_entry_list(cid, playername)
if name == nil or name == "" then
name = S("Nameless entry (@1)", eid)
if doc.entry_viewed(playername, cid, eid) then
viewedprefix = "#FF4444"
viewedprefix = mcl_colors.RED
else
viewedprefix = COLOR_ERROR
end

View File

@ -2,3 +2,4 @@ name = doc
author = Wuzzy
description = A simple in-game documentation system which enables mods to add help entries based on templates.
optional_depends = unified_inventory, sfinv_buttons, central_message, inventory_plus
depends = mcl_colors

View File

@ -410,7 +410,7 @@ local function get_tooltip(item, groups, cooktime, burntime)
local tooltip
if groups then
local gcol = "#FFAAFF"
local gcol = mcl_colors.LIGHT_PURPLE
if #groups == 1 then
local g = group_names[groups[1]]
local groupstr
@ -446,12 +446,12 @@ local function get_tooltip(item, groups, cooktime, burntime)
if not groups and cooktime then
tooltip = tooltip .. "\n" ..
S("Cooking time: @1", colorize("yellow", cooktime))
S("Cooking time: @1", colorize(mcl_colors.YELLOW, cooktime))
end
if not groups and burntime then
tooltip = tooltip .. "\n" ..
S("Burning time: @1", colorize("yellow", burntime))
S("Burning time: @1", colorize(mcl_colors.YELLOW, burntime))
end
return fmt(FMT.tooltip, item, ESC(tooltip))
@ -668,7 +668,7 @@ local function make_formspec(name)
fs[#fs + 1] = fmt("label[%f,%f;%s]",
sfinv_only and 6.3 or data.iX - 2.2,
0.22,
ESC(colorize("#383838", fmt("%s / %u", data.pagenum, data.pagemax))))
ESC(colorize(mcl_colors.DARK_GRAY, fmt("%s / %u", data.pagenum, data.pagemax))))
fs[#fs + 1] = fmt([[
image_button[%f,0.12;0.8,0.8;craftguide_prev_icon.png;prev;]

View File

@ -1,5 +1,5 @@
name = mcl_craftguide
author = kilbith
description = The most comprehensive Crafting Guide on Minetest.
depends = mcl_core, mcl_compass, mcl_clock, doc
depends = mcl_core, mcl_compass, mcl_clock, doc, mcl_colors
optional_depends = sfinv, sfinv_buttons

View File

@ -1,4 +1,4 @@
name = mcl_tt
author = Wuzzy
description = Add MCL2 tooltips
depends = tt, mcl_enchanting
depends = tt, mcl_enchanting, mcl_colors

View File

@ -77,7 +77,7 @@ end)
tt.register_snippet(function(itemstring)
local def = minetest.registered_items[itemstring]
if minetest.get_item_group(itemstring, "crush_after_fall") == 1 then
return S("Deals damage when falling"), "#FFFF00"
return S("Deals damage when falling"), mcl_colors.YELLOW
end
end)

View File

@ -1,8 +1,8 @@
tt = {}
tt.COLOR_DEFAULT = "#d0ffd0"
tt.COLOR_DANGER = "#ffff00"
tt.COLOR_GOOD = "#00ff00"
tt.NAME_COLOR = "#FFFF4C"
tt.COLOR_DEFAULT = mcl_colors.GREEN
tt.COLOR_DANGER = mcl_colors.YELLOW
tt.COLOR_GOOD = mcl_colors.GREEN
tt.NAME_COLOR = mcl_colors.YELLOW
-- API
tt.registered_snippets = {}

View File

@ -1,3 +1,4 @@
name = tt
author = Wuzzy
description = Support for custom tooltip extensions for items
depends = mcl_colors

View File

@ -214,7 +214,7 @@ function awards.unlock(name, award)
-- Get award
minetest.log("action", name.." has gotten award "..award)
minetest.chat_send_all(S("@1 has made the achievement @2", name, minetest.colorize("#51EF4E", "[" .. (awdef.title or award) .. "]")))
minetest.chat_send_all(S("@1 has made the achievement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
data.unlocked[award] = award
awards.save()
@ -447,7 +447,7 @@ function awards.getFormspec(name, to, sid)
first = false
if def.secret and not award.got then
formspec = formspec .. "#707070"..minetest.formspec_escape(S("(Secret Award)"))
formspec = formspec .. mcl_colors.DARK_GRAY..minetest.formspec_escape(S("(Secret Award)"))
else
local title = award.name
if def and def.title then
@ -456,7 +456,7 @@ function awards.getFormspec(name, to, sid)
if award.got then
formspec = formspec .. minetest.formspec_escape(title)
else
formspec = formspec .. "#ACACAC".. minetest.formspec_escape(title)
formspec = formspec .. mcl_colors.GRAY.. minetest.formspec_escape(title)
end
end
end

View File

@ -6,3 +6,4 @@ license = LGPL 2.1 or later
forum = https://forum.minetest.net/viewtopic.php?t=4870
version = 2.3.0
optional_depends = sfinv, unified_inventory
depends = mcl_colors

View File

@ -442,7 +442,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
end
local caption = ""
if name ~= "inv" and filtername[name] then
caption = "label[0,1.2;"..F(minetest.colorize("#313131", filtername[name])).."]"
caption = "label[0,1.2;"..F(minetest.colorize(mcl_colors.DARK_GRAY, filtername[name])).."]"
end
formspec = "size[10,9.3]"..

View File

@ -109,10 +109,10 @@ local function set_inventory(player, armor_change_only)
mcl_formspec.get_itemslot_bg(0,3,1,1)..
armor_slot_imgs..
-- craft and inventory
"label[0,4;"..F(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4;"..F(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"label[4,0.5;"..F(minetest.colorize("#313131", S("Crafting"))).."]"..
"label[4,0.5;"..F(minetest.colorize(mcl_colors.DARK_GRAY, S("Crafting"))).."]"..
"list[current_player;craft;4,1;2,2]"..
"list[current_player;craftpreview;7,1.5;1,1;]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..

View File

@ -1,6 +1,6 @@
name = mcl_inventory
author = BlockMen
description = Adds the player inventory and creative inventory.
depends = mcl_init, mcl_formspec
depends = mcl_init, mcl_formspec, mcl_colors
optional_depends = mcl_player, _mcl_autogroup, mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting

View File

@ -13,12 +13,12 @@ local S = minetest.get_translator("mcl_dispensers")
local setup_dispenser = function(pos)
-- Set formspec and inventory
local form = "size[9,8.75]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dispenser"))).."]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Dispenser"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
mcl_formspec.get_itemslot_bg(3,0.5,3,3)..
"listring[current_name;main]"..

View File

@ -1,3 +1,3 @@
name = mcl_dispensers
depends = mcl_init, mcl_formspec, mesecons, mcl_sounds, mcl_tnt, mcl_worlds, mcl_core, mcl_nether, mcl_armor_stand, mcl_armor
depends = mcl_init, mcl_formspec, mesecons, mcl_sounds, mcl_tnt, mcl_worlds, mcl_core, mcl_nether, mcl_armor_stand, mcl_armor, mcl_colors
optional_depends = doc, screwdriver

View File

@ -14,12 +14,12 @@ local S = minetest.get_translator("mcl_droppers")
local setup_dropper = function(pos)
-- Set formspec and inventory
local form = "size[9,8.75]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Dropper"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
mcl_formspec.get_itemslot_bg(3,0.5,3,3)..
"listring[current_name;main]"..

View File

@ -15,10 +15,10 @@ local setup_dropper = function(pos)
-- Set formspec and inventory
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Dropper"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
"listring[current_name;main]"..
"listring[current_player;main]"

View File

@ -1,3 +1,3 @@
name = mcl_droppers
depends = mcl_init, mcl_formspec, mesecons, mcl_util
depends = mcl_init, mcl_formspec, mesecons, mcl_util, mcl_colors
optional_depends = doc, screwdriver

View File

@ -16,7 +16,7 @@ local function get_anvil_formspec(set_name)
end
return "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;mcl_anvils_inventory.png]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
@ -27,7 +27,7 @@ local function get_anvil_formspec(set_name)
mcl_formspec.get_itemslot_bg(4,2.5,1,1)..
"list[context;output;8,2.5;1,1;]"..
mcl_formspec.get_itemslot_bg(8,2.5,1,1)..
"label[3,0.1;"..minetest.formspec_escape(minetest.colorize("#313131", S("Repair and Name"))).."]"..
"label[3,0.1;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Repair and Name"))).."]"..
"field[3.25,1;4,1;name;;"..minetest.formspec_escape(set_name).."]"..
"field_close_on_enter[name;false]"..
"button[7,0.7;2,1;name_button;"..minetest.formspec_escape(S("Set Name")).."]"..

View File

@ -1,5 +1,5 @@
name = mcl_anvils
author = Wuzzy
description = Anvils mods for MCL2
depends = mcl_init, mcl_formspec, mcl_sounds, tt, mcl_enchanting
depends = mcl_init, mcl_formspec, mcl_sounds, tt, mcl_enchanting, mcl_colors
optional_depends = mcl_core, screwdriver

View File

@ -381,6 +381,7 @@ mcl_player.player_register_model("mcl_armor_character.b3d", {
run_walk = {x=440, y=459},
run_walk_mine = {x=461, y=480},
sit_mount = {x=484, y=484},
die = {x=498, y=498},
},
})

View File

@ -1,4 +1,5 @@
name = mcl_banners
author = 22i
description = Adds decorative banners in different colors which can be emblazoned with patterns, offering a countless number of combinations.
depends = mcl_colors
optional_depends = mcl_sounds, mcl_core, mcl_wool, mcl_cauldrons, doc, screwdriver

View File

@ -281,7 +281,7 @@ mcl_banners.make_advanced_banner_description = function(description, layers)
-- Final string concatenations: Just a list of strings
local append = table.concat(layerstrings, "\n")
description = description .. "\n" .. minetest.colorize("#8F8F8F", append)
description = description .. "\n" .. minetest.colorize(mcl_colors.GRAY, append)
return description
end
end

View File

@ -1,4 +1,4 @@
local S =minetest.get_translator("mcl_books")
local S = minetest.get_translator("mcl_books")
local max_text_length = 4500 -- TODO: Increase to 12800 when scroll bar was added to written book
local max_title_length = 64
@ -67,7 +67,7 @@ local make_description = function(title, author, generation)
else
desc = S("Tattered Book")
end
desc = desc .. "\n" .. minetest.colorize("#AAAAAA", S("by @1", author))
desc = desc .. "\n" .. minetest.colorize(mcl_colors.GRAY, S("by @1", author))
return desc
end
@ -147,8 +147,8 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields )
local formspec = "size[8,9]"..
header..
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
"field[0.75,1;7.25,1;title;"..minetest.formspec_escape(minetest.colorize("#000000", S("Enter book title:")))..";]"..
"label[0.75,1.5;"..minetest.formspec_escape(minetest.colorize("#404040", S("by @1", name))).."]"..
"field[0.75,1;7.25,1;title;"..minetest.formspec_escape(minetest.colorize(mcl_colors.BLACK, S("Enter book title:")))..";]"..
"label[0.75,1.5;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("by @1", name))).."]"..
"button_exit[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign and Close")).."]"..
"tooltip[sign;"..minetest.formspec_escape(S("Note: The book will no longer be editable after signing")).."]"..
"button[4.25,7.95;3,1;cancel;"..minetest.formspec_escape(S("Cancel")).."]"

View File

@ -1,4 +1,4 @@
name = mcl_books
author = celeron55
description = Books mod for MCL2
optional_depends = mcl_init, mcl_core, mcl_sounds, mcl_mobitems, mcl_dye
optional_depends = mcl_init, mcl_core, mcl_sounds, mcl_mobitems, mcl_dye, mcl_colors

View File

@ -4,8 +4,8 @@ local function active_brewing_formspec(fuel_percent, brew_percent)
return "size[9,8.75]"..
"background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]"..
"label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Brewing Stand"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[4,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Brewing Stand"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.75;9,1;]"..
@ -35,8 +35,8 @@ end
local brewing_formspec = "size[9,8.75]"..
"background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]"..
"label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Brewing Stand"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[4,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Brewing Stand"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.75;9,1;]"..

View File

@ -1,4 +1,4 @@
name = mcl_brewing
author = bzoss
depends = mcl_init, mcl_formspec, mcl_sounds, mcl_potions, mcl_mobitems
depends = mcl_init, mcl_formspec, mcl_sounds, mcl_potions, mcl_mobitems, mcl_colors
optional_depends = mcl_core, doc, screwdriver

View File

@ -475,10 +475,10 @@ minetest.register_node(small_name, {
minetest.show_formspec(clicker:get_player_name(),
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,8.75]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", name)).."]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, name)).."]"..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
@ -624,12 +624,12 @@ minetest.register_node(left_name, {
minetest.show_formspec(clicker:get_player_name(),
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,11.5]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", name)).."]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, name)).."]"..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
"list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,3.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,3.5,9,3)..
"label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,7;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,7.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,7.5,9,3)..
"list[current_player;main;0,10.75;9,1;]"..
@ -773,12 +773,12 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,11.5]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", name)).."]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, name)).."]"..
"list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,0.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,3.5,9,3)..
"label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,7;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,7.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,7.5,9,3)..
"list[current_player;main;0,10.75;9,1;]"..
@ -986,10 +986,10 @@ minetest.register_node("mcl_chests:ender_chest", {
})
local formspec_ender_chest = "size[9,8.75]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Ender Chest"))).."]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Ender Chest"))).."]"..
"list[current_player;enderchest;0,0.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
@ -1104,10 +1104,10 @@ local function formspec_shulker_box(name)
name = S("Shulker Box")
end
return "size[9,8.75]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", name)).."]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, name)).."]"..
"list[current_name;main;0,0.5;9,3;]"..
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..

View File

@ -1,3 +1,3 @@
name = mcl_chests
depends = mcl_init, mcl_formspec, mcl_core, mcl_sounds, mcl_end, mesecons
depends = mcl_init, mcl_formspec, mcl_core, mcl_sounds, mcl_end, mesecons, mcl_colors
optional_depends = doc, screwdriver

View File

@ -1,4 +1,4 @@
name = mcl_core
description = Core items of MineClone 2: Basic biome blocks (dirt, sand, stones, etc.), derived items, glass, sugar cane, cactus, barrier, mining tools, hand, craftitems, and misc. items which don't really fit anywhere else.
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_colors
optional_depends = doc

View File

@ -4,7 +4,7 @@ local S = minetest.get_translator("mcl_core")
minetest.register_node("mcl_core:cactus", {
description = S("Cactus"),
_tt_help = S("Grows on sand").."\n"..minetest.colorize("#FFFF00", S("Contact damage: @1 per half second", 1)),
_tt_help = S("Grows on sand").."\n"..minetest.colorize(mcl_colors.YELLOW, S("Contact damage: @1 per half second", 1)),
_doc_items_longdesc = S("This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well."),
_doc_items_usagehelp = S("A cactus can only be placed on top of another cactus or any sand."),
drawtype = "nodebox",

View File

@ -236,7 +236,7 @@ minetest.register_node("mcl_core:realm_barrier", {
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
node_placement_prediction = "",
on_place = function(pos, placer, itemstack, pointed_thing)
minetest.chat_send_player(placer:get_player_name(), minetest.colorize("#FF0000", "You can't just place a realm barrier by hand!"))
minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!"))
return
end,
})
@ -266,7 +266,7 @@ minetest.register_node("mcl_core:void", {
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
node_placement_prediction = "",
on_place = function(pos, placer, itemstack, pointed_thing)
minetest.chat_send_player(placer:get_player_name(), minetest.colorize("#FF0000", "You can't just place the void by hand!"))
minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!"))
return
end,
drop = "",

View File

@ -2,7 +2,7 @@ local S = minetest.get_translator("mcl_crafting_table")
local formspec_escape = minetest.formspec_escape
local show_formspec = minetest.show_formspec
local C = minetest.colorize
local text_color = mcl_colors.BLACK or "#313131"
local text_color = mcl_colors.DARK_GRAY
local itemslot_bg = mcl_formspec.get_itemslot_bg
mcl_crafting_table = {}
@ -13,7 +13,7 @@ function mcl_crafting_table.show_crafting_form(player)
show_formspec(player:get_player_name(), "main",
"size[9,8.75]"..
"image[4.7,1.5;1.5,1;gui_crafting_arrow.png]"..
"label[0,4;"..formspec_escape(C(text_color, S("Inventory"))).."]".. --"#313131"
"label[0,4;"..formspec_escape(C(text_color, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..

View File

@ -1,4 +1,3 @@
name = mcl_crafting_table
description = Adds a crafting table.
depends = mcl_init, mcl_formspec, mcl_sounds
optional_depends = mcl_colors
depends = mcl_init, mcl_formspec, mcl_sounds, mcl_colors

View File

@ -52,7 +52,7 @@ function mcl_enchanting.get_enchantment_description(enchantment, level)
end
function mcl_enchanting.get_colorized_enchantment_description(enchantment, level)
return minetest.colorize(mcl_enchanting.enchantments[enchantment].curse and "#FC5454" or "#A8A8A8", mcl_enchanting.get_enchantment_description(enchantment, level))
return minetest.colorize(mcl_enchanting.enchantments[enchantment].curse and mcl_colors.RED or mcl_colors.GRAY, mcl_enchanting.get_enchantment_description(enchantment, level))
end
function mcl_enchanting.get_enchanted_itemstring(itemname)
@ -468,13 +468,13 @@ function mcl_enchanting.show_enchanting_formspec(player)
local formspec = ""
.. "size[9.07,8.6;]"
.. "formspec_version[3]"
.. "label[0,0;" .. C("#313131") .. F(table_name) .. "]"
.. "label[0,0;" .. C(mcl_colors.DARK_GRAY) .. F(table_name) .. "]"
.. mcl_formspec.get_itemslot_bg(0.2, 2.4, 1, 1)
.. "list[current_player;enchanting_item;0.2,2.4;1,1]"
.. mcl_formspec.get_itemslot_bg(1.1, 2.4, 1, 1)
.. "image[1.1,2.4;1,1;mcl_enchanting_lapis_background.png]"
.. "list[current_player;enchanting_lapis;1.1,2.4;1,1]"
.. "label[0,4;" .. C("#313131") .. F(S("Inventory")).."]"
.. "label[0,4;" .. C(mcl_colors.DARK_GRAY) .. F(S("Inventory")).."]"
.. mcl_formspec.get_itemslot_bg(0, 4.5, 9, 3)
.. mcl_formspec.get_itemslot_bg(0, 7.74, 9, 1)
.. "list[current_player;main;0,4.5;9,3;9]"
@ -501,11 +501,11 @@ function mcl_enchanting.show_enchanting_formspec(player)
local hover_ending = (can_enchant and "_hovered" or "_off")
formspec = formspec
.. "container[3.2," .. y .. "]"
.. (slot and "tooltip[button_" .. i .. ";" .. C("#818181") .. F(slot.description) .. " " .. C("#FFFFFF") .. " . . . ?\n\n" .. (enough_levels and C(enough_lapis and "#818181" or "#FC5454") .. F(S("@1 Lapis Lazuli", i)) .. "\n" .. C("#818181") .. F(S("@1 Enchantment Levels", i)) or C("#FC5454") .. F(S("Level requirement: @1", slot.level_requirement))) .. "]" or "")
.. (slot and "tooltip[button_" .. i .. ";" .. C(mcl_colors.GRAY) .. F(slot.description) .. " " .. C(mcl_colors.WHITE) .. " . . . ?\n\n" .. (enough_levels and C(enough_lapis and mcl_colors.GRAY or mcl_colors.RED) .. F(S("@1 Lapis Lazuli", i)) .. "\n" .. C(mcl_colors.GRAY) .. F(S("@1 Enchantment Levels", i)) or C(mcl_colors.RED) .. F(S("Level requirement: @1", slot.level_requirement))) .. "]" or "")
.. "style[button_" .. i .. ";bgimg=mcl_enchanting_button" .. ending .. ".png;bgimg_hovered=mcl_enchanting_button" .. hover_ending .. ".png;bgimg_pressed=mcl_enchanting_button" .. hover_ending .. ".png]"
.. "button[0,0;7.5,1.3;button_" .. i .. ";]"
.. (slot and "image[0,0;1.3,1.3;mcl_enchanting_number_" .. i .. ending .. ".png]" or "")
.. (slot and "label[7.2,1.1;" .. C(can_enchant and "#80FF20" or "#407F10") .. slot.level_requirement .. "]" or "")
.. (slot and "label[7.2,1.1;" .. C(can_enchant and mcl_colors.GREEN or mcl_colors.DARK_GREEN) .. slot.level_requirement .. "]" or "")
.. (slot and slot.glyphs or "")
.. "container_end[]"
y = y + 1.35

View File

@ -1,5 +1,5 @@
name = mcl_enchanting
description = Enchanting for MineClone2
depends = tt, walkover, mcl_sounds
depends = tt, walkover, mcl_sounds, mcl_colors
optional_depends = screwdriver
author = Fleckenstein

View File

@ -1,3 +1,3 @@
name = mcl_farming
depends = mcl_core, mcl_sounds, mcl_wool, mcl_torches, mcl_weather, mobs_mc
depends = mcl_core, mcl_sounds, mcl_wool, mcl_torches, mcl_weather, mobs_mc, mcl_colors
optional_depends = mcl_armor, doc

View File

@ -118,7 +118,7 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", {
minetest.register_craftitem("mcl_farming:potato_item_poison", {
description = S("Poisonous Potato"),
_tt_help = minetest.colorize("#FFFF00", S("60% chance of poisoning")),
_tt_help = minetest.colorize(mcl_colors.YELLOW, S("60% chance of poisoning")),
_doc_items_longdesc = S("This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly."),
stack_max = 64,
inventory_image = "farming_potato_poison.png",

View File

@ -9,12 +9,12 @@ local LIGHT_ACTIVE_FURNACE = 13
local function active_formspec(fuel_percent, item_percent)
return "size[9,8.75]"..
"label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
"label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]"..
"label[2.75,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Furnace"))).."]"..
"list[current_name;src;2.75,0.5;1,1;]"..
mcl_formspec.get_itemslot_bg(2.75,0.5,1,1)..
"list[current_name;fuel;2.75,2.5;1,1;]"..
@ -38,12 +38,12 @@ local function active_formspec(fuel_percent, item_percent)
end
local inactive_formspec = "size[9,8.75]"..
"label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,4;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
"list[current_player;main;0,7.74;9,1;]"..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
"label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]"..
"label[2.75,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Furnace"))).."]"..
"list[current_name;src;2.75,0.5;1,1;]"..
mcl_formspec.get_itemslot_bg(2.75,0.5,1,1)..
"list[current_name;fuel;2.75,2.5;1,1;]"..

View File

@ -1,3 +1,3 @@
name = mcl_furnaces
depends = mcl_init, mcl_formspec, mcl_core, mcl_sounds, mcl_craftguide, mcl_achievements, mcl_particles
depends = mcl_init, mcl_formspec, mcl_core, mcl_sounds, mcl_craftguide, mcl_achievements, mcl_particles, mcl_colors
optional_depends = doc, screwdriver

View File

@ -4,10 +4,10 @@ local S = minetest.get_translator("mcl_hoppers")
local mcl_hoppers_formspec =
"size[9,7]"..
"label[2,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))).."]"..
"label[2,0;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Hopper"))).."]"..
"list[current_name;main;2,0.5;5,1;]"..
mcl_formspec.get_itemslot_bg(2,0.5,5,1)..
"label[0,2;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"label[0,2;"..minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))).."]"..
"list[current_player;main;0,2.5;9,3;9]"..
mcl_formspec.get_itemslot_bg(0,2.5,9,3)..
"list[current_player;main;0,5.74;9,1;]"..

View File

@ -1,4 +1,4 @@
name = mcl_hoppers
description = It's just a clone of Minecraft hoppers, functions nearly identical to them minus mesecons making them stop and the way they're placed.
depends = mcl_core, mcl_formspec, mcl_sounds, mcl_util
depends = mcl_core, mcl_formspec, mcl_sounds, mcl_util, mcl_colors
optional_depends = doc, screwdriver

View File

@ -20,8 +20,8 @@ function mcl_jukebox.register_record(title, author, identifier, image, sound)
local usagehelp = S("Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.")
minetest.register_craftitem(":mcl_jukebox:record_"..identifier, {
description =
core.colorize("#55FFFF", S("Music Disc")) .. "\n" ..
core.colorize("#989898", S("@1—@2", author, title)),
core.colorize(mcl_colors.AQUA, S("Music Disc")) .. "\n" ..
core.colorize(mcl_colors.GRAY, S("@1—@2", author, title)),
_doc_items_create_entry = true,
_doc_items_entry_name = entryname,
_doc_items_longdesc = longdesc,

View File

@ -1,3 +1,3 @@
name = mcl_jukebox
description = Jukebox and music discs are used to play background music on a per-player basis.
depends = mcl_core, mcl_sounds
depends = mcl_core, mcl_sounds, mcl_colors

View File

@ -2,7 +2,7 @@ local S = minetest.get_translator("mcl_mobitems")
minetest.register_craftitem("mcl_mobitems:rotten_flesh", {
description = S("Rotten Flesh"),
_tt_help = minetest.colorize("#FFFF00", S("80% chance of food poisoning")),
_tt_help = minetest.colorize(mcl_colors.YELLOW, S("80% chance of food poisoning")),
_doc_items_longdesc = S("Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while."),
inventory_image = "mcl_mobitems_rotten_flesh.png",
wield_image = "mcl_mobitems_rotten_flesh.png",
@ -63,7 +63,7 @@ minetest.register_craftitem("mcl_mobitems:cooked_beef", {
minetest.register_craftitem("mcl_mobitems:chicken", {
description = S("Raw Chicken"),
_tt_help = minetest.colorize("#FFFF00", S("30% chance of food poisoning")),
_tt_help = minetest.colorize(mcl_colors.YELLOW, S("30% chance of food poisoning")),
_doc_items_longdesc = S("Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value."),
inventory_image = "mcl_mobitems_chicken_raw.png",
wield_image = "mcl_mobitems_chicken_raw.png",
@ -147,7 +147,7 @@ end
minetest.register_craftitem("mcl_mobitems:milk_bucket", {
description = S("Milk"),
_tt_help = minetest.colorize("#00FF00", S("Removes all status effects")),
_tt_help = minetest.colorize(mcl_colors.GREEN, S("Removes all status effects")),
_doc_items_longdesc = S("Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points."),
_doc_items_usagehelp = S("Use the placement key to drink the milk."),
inventory_image = "mcl_mobitems_bucket_milk.png",
@ -160,7 +160,7 @@ minetest.register_craftitem("mcl_mobitems:milk_bucket", {
minetest.register_craftitem("mcl_mobitems:spider_eye", {
description = S("Spider Eye"),
_tt_help = minetest.colorize("#FFFF00", S("Poisonous")),
_tt_help = minetest.colorize(mcl_colors.YELLOW, S("Poisonous")),
_doc_items_longdesc = S("Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly."),
inventory_image = "mcl_mobitems_spider_eye.png",
wield_image = "mcl_mobitems_spider_eye.png",

View File

@ -1,2 +1,2 @@
name = mcl_mobitems
depends = mcl_core, mcl_hunger
depends = mcl_core, mcl_hunger, mcl_colors

View File

@ -95,7 +95,7 @@ minetest.register_node("mcl_nether:netherrack", {
minetest.register_node("mcl_nether:magma", {
description = S("Magma Block"),
_tt_help = minetest.colorize("#FFFF00", S("Burns your feet")),
_tt_help = minetest.colorize(mcl_colors.YELLOW, S("Burns your feet")),
_doc_items_longdesc = S("Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire."),
stack_max = 64,
tiles = {{name="mcl_nether_magma.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.5}}},

View File

@ -1,3 +1,3 @@
name = mcl_nether
depends = mcl_core, mcl_sounds, mcl_util, walkover, doc_items
depends = mcl_core, mcl_sounds, mcl_util, walkover, doc_items, mcl_colors
optional_depends = mcl_death_messages, doc, screwdriver

View File

@ -178,7 +178,7 @@ minetest.register_globalstep(function(dtime)
-- Apply animations based on what the player is doing
if player:get_hp() == 0 then
player_set_animation(player, "lay")
player_set_animation(player, "die")
elseif walking and velocity.x > 0.35 or walking and velocity.x < -0.35 or walking and velocity.z > 0.35 or walking and velocity.z < -0.35 then
if player_sneak[name] ~= controls.sneak then
player_anim[name] = nil
@ -253,3 +253,28 @@ minetest.register_on_player_hpchange(function(player, hp_change, reason)
end
return hp_change
end, true)
minetest.register_on_respawnplayer(function(player)
local pos = player:get_pos()
minetest.add_particlespawner({
amount = 50,
time = 0.001,
minpos = vector.add(pos, 0),
maxpos = vector.add(pos, 0),
minvel = vector.new(-5,-5,-5),
maxvel = vector.new(5,5,5),
minexptime = 1.1,
maxexptime = 1.5,
minsize = 1,
maxsize = 2,
collisiondetection = false,
vertical = false,
texture = "mcl_particles_mob_death.png^[colorize:#000000:255",
})
minetest.sound_play("mcl_mobs_mob_poof", {
pos = pos,
gain = 1.0,
max_hear_distance = 8,
}, true)
end)

View File

@ -227,6 +227,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if mcl_skins.skin_count <= 6 then
-- Change skin immediately if there are not many skins
mcl_skins.cycle_skin(player)
if player:get_attach() ~= nil then
mcl_player.player_set_animation(player, "sit")
end
else
-- Show skin selection formspec otherwise
mcl_skins.show_formspec(player:get_player_name())
@ -237,7 +240,7 @@ end)
mcl_skins.show_formspec = function(playername)
local formspec = "size[7,8.5]"
formspec = formspec .. "label[2,2;" .. minetest.formspec_escape(minetest.colorize("#383838", S("Select player skin:"))) .. "]"
formspec = formspec .. "label[2,2;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Select player skin:"))) .. "]"
.. "textlist[0,2.5;6.8,6;skins_set;"
local meta
@ -265,7 +268,7 @@ mcl_skins.show_formspec = function(playername)
if meta then
if meta.name and meta.name ~= "" then
formspec = formspec .. "label[2,0.5;" .. minetest.formspec_escape(minetest.colorize("#383838", S("Name: @1", meta.name))) .. "]"
formspec = formspec .. "label[2,0.5;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Name: @1", meta.name))) .. "]"
end
end
@ -294,4 +297,3 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end)
minetest.log("action", "[mcl_skins] Mod initialized with "..mcl_skins.skin_count.." custom skin(s)")