Add Goldie the Parrot, replaces info block
@ -257,7 +257,7 @@ Each record contains multiple values, in this order:
|
|||||||
* `<border list>`: List of border blocks, see below
|
* `<border list>`: List of border blocks, see below
|
||||||
* `<ambience>`: Ambient sounds. Either `ocean`, `temple` or `none`.
|
* `<ambience>`: Ambient sounds. Either `ocean`, `temple` or `none`.
|
||||||
* `<sky>`: Sky ID. See the mod `lzr_sky` for available skies. (optional)
|
* `<sky>`: Sky ID. See the mod `lzr_sky` for available skies. (optional)
|
||||||
* `<npc_texts>`: This is the text that will show when the player interacts with the information block. (optional)
|
* `<npc_texts>`: This is the text that will show when the player interacts with Goldie the Parrot. (optional)
|
||||||
* `<weather>`: Weather ID. See the mod `lzr_weather` for available weathers. (optional)
|
* `<weather>`: Weather ID. See the mod `lzr_weather` for available weathers. (optional)
|
||||||
* `<backdrop>`: Backdrop ID. This is the environment that surrounds the playable level area. One of `ocean`, `islands`, `underground`, `sky`. (optional)
|
* `<backdrop>`: Backdrop ID. This is the environment that surrounds the playable level area. One of `ocean`, `islands`, `underground`, `sky`. (optional)
|
||||||
* `<backdrop_position>`: Backdrop position, written in format (x,y,z). Only relevant for the `islands` backdrop. (optional)
|
* `<backdrop_position>`: Backdrop position, written in format (x,y,z). Only relevant for the `islands` backdrop. (optional)
|
||||||
|
@ -22,7 +22,7 @@ Mirrors and other things will help you.
|
|||||||
You start in the captain's cabin, the base of your treasure-hunting
|
You start in the captain's cabin, the base of your treasure-hunting
|
||||||
operations. Use the book in front of you to select the first level.
|
operations. Use the book in front of you to select the first level.
|
||||||
|
|
||||||
The spinning information blocks will guide you through the levels.
|
Goldie the Parrot will guide you through the levels.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
You need Luanti version 5.9.0 (or later) to play this.
|
You need Luanti version 5.9.0 (or later) to play this.
|
||||||
|
@ -83,7 +83,7 @@ local error_warning_texts = {
|
|||||||
barriers = S("Barrier or rain membrane in level area"),
|
barriers = S("Barrier or rain membrane in level area"),
|
||||||
gold_block = S("Bare gold block in level area"),
|
gold_block = S("Bare gold block in level area"),
|
||||||
plant_on_ground = S("Rooted plant in level area"),
|
plant_on_ground = S("Rooted plant in level area"),
|
||||||
too_many_parrot_spawners = S("More than one information block"),
|
too_many_parrot_spawners = S("More than one parrot spawner"),
|
||||||
trigger_out_of_bounds = S("Trigger is out of bounds"),
|
trigger_out_of_bounds = S("Trigger is out of bounds"),
|
||||||
trigger_moved = S("Trigger ID does not match location"),
|
trigger_moved = S("Trigger ID does not match location"),
|
||||||
laser_incompatible = S("Laser-incompatible node found"),
|
laser_incompatible = S("Laser-incompatible node found"),
|
||||||
@ -666,9 +666,6 @@ local show_settings_dialog = function(player, settings_state)
|
|||||||
|
|
||||||
local level_size = lzr_world.get_level_size()
|
local level_size = lzr_world.get_level_size()
|
||||||
|
|
||||||
-- TODO: Use this string when we have a parrot model
|
|
||||||
local goldie_speech = NS("Goldie speech")
|
|
||||||
|
|
||||||
local boundary_button = function(boundaryname, nodename, y)
|
local boundary_button = function(boundaryname, nodename, y)
|
||||||
if minetest.registered_nodes[nodename] then
|
if minetest.registered_nodes[nodename] then
|
||||||
return "item_image_button[7.75,"..y..";0.6,0.6;"..F(nodename)..";level_"..boundaryname.."_select;]"
|
return "item_image_button[7.75,"..y..";0.6,0.6;"..F(nodename)..";level_"..boundaryname.."_select;]"
|
||||||
@ -697,7 +694,7 @@ local show_settings_dialog = function(player, settings_state)
|
|||||||
boundary_button("floor", settings_state.floor, 4.3)..
|
boundary_button("floor", settings_state.floor, 4.3)..
|
||||||
boundary_button("ceiling", settings_state.ceiling, 5.3)..
|
boundary_button("ceiling", settings_state.ceiling, 5.3)..
|
||||||
|
|
||||||
"field[0.5,6.3;8,0.6;level_npc_goldie;"..FS("Information block text")..";"..F(settings_state.npc_texts.goldie).."]"..
|
"field[0.5,6.3;8,0.6;level_npc_goldie;"..FS("Goldie speech")..";"..F(settings_state.npc_texts.goldie).."]"..
|
||||||
|
|
||||||
"label[0.5,7.1;"..FS("Music").."]"..
|
"label[0.5,7.1;"..FS("Music").."]"..
|
||||||
"dropdown[0.5,7.3;8,0.6;level_ambient;"..ambient_list..";"..current_ambient..";true]"..
|
"dropdown[0.5,7.3;8,0.6;level_ambient;"..ambient_list..";"..current_ambient..";true]"..
|
||||||
@ -728,7 +725,7 @@ local show_settings_dialog = function(player, settings_state)
|
|||||||
"tooltip[level_wall;"..FS("Itemstring of node to be placed on the left, front, back and right level borders").."]"..
|
"tooltip[level_wall;"..FS("Itemstring of node to be placed on the left, front, back and right level borders").."]"..
|
||||||
"tooltip[level_floor;"..FS("Itemstring of node to be placed at the bottom of the level").."]"..
|
"tooltip[level_floor;"..FS("Itemstring of node to be placed at the bottom of the level").."]"..
|
||||||
"tooltip[level_ceiling;"..FS("Itemstring of node to be placed at the top of the level").."]"..
|
"tooltip[level_ceiling;"..FS("Itemstring of node to be placed at the top of the level").."]"..
|
||||||
"tooltip[level_npc_goldie;"..FS("Text to be shown when player interacts with the information block").."]"..
|
"tooltip[level_npc_goldie;"..FS("Text to be shown when player interacts with Goldie the Parrot").."]"..
|
||||||
"tooltip[level_ambient;"..FS("Which audio ambience to play").."]"..
|
"tooltip[level_ambient;"..FS("Which audio ambience to play").."]"..
|
||||||
"tooltip[level_sky;"..FS("How the sky looks like. Affects color, sun, moon, stars, clouds and the time of day").."]"..
|
"tooltip[level_sky;"..FS("How the sky looks like. Affects color, sun, moon, stars, clouds and the time of day").."]"..
|
||||||
"tooltip[level_weather;"..FS("Visual weather effects (no audio)").."]"..
|
"tooltip[level_weather;"..FS("Visual weather effects (no audio)").."]"..
|
||||||
|
@ -126,7 +126,7 @@ local load_custom_level = function(level, player)
|
|||||||
elseif error_detail == "too_many_teleporters" then
|
elseif error_detail == "too_many_teleporters" then
|
||||||
reason = S("There’s more than one teleporter.")
|
reason = S("There’s more than one teleporter.")
|
||||||
elseif error_detail == "too_many_parrot_spawners" then
|
elseif error_detail == "too_many_parrot_spawners" then
|
||||||
reason = S("There’s more than one information block.")
|
reason = S("There’s more than one Goldie the Parrot.")
|
||||||
elseif error_detail == "barriers" then
|
elseif error_detail == "barriers" then
|
||||||
reason = S("There’s a barrier or barrier-like node in the level.")
|
reason = S("There’s a barrier or barrier-like node in the level.")
|
||||||
elseif error_detail == "gold_block" then
|
elseif error_detail == "gold_block" then
|
||||||
|
@ -4,25 +4,27 @@ local NS = function(s) return s end
|
|||||||
|
|
||||||
local F = minetest.formspec_escape
|
local F = minetest.formspec_escape
|
||||||
|
|
||||||
|
minetest.register_node("lzr_parrot_npc:greenscreen", {
|
||||||
|
name = S("Greenscreen"),
|
||||||
|
tiles = { "[fill:16x16:#00FF00" },
|
||||||
|
groups = { dig_immediate = 3 },
|
||||||
|
})
|
||||||
|
|
||||||
lzr_parrot_npc = {}
|
lzr_parrot_npc = {}
|
||||||
|
|
||||||
-- TODO: These strings are to be used when the parrot model arrives
|
|
||||||
local SPEAKER_NAME = NS("Goldie the Parrot")
|
local SPEAKER_NAME = NS("Goldie the Parrot")
|
||||||
local SPEAKER_NAME_SHORT = NS("Goldie")
|
local SPEAKER_NAME_SHORT = NS("Goldie")
|
||||||
--~ @1 is a parrot name
|
--~ @1 is a parrot name
|
||||||
local SAYS = NS("@1 says:")
|
local SAYS = NS("@1 says:")
|
||||||
|
|
||||||
-- TODO: This name shall be removed when the parrot model arrives
|
|
||||||
local SPEAKER_NAME_INFOBLOCK = S("Information")
|
|
||||||
|
|
||||||
local function make_call(to_player)
|
local function make_call(to_player)
|
||||||
-- TODO: Play sound when we have a parrot again
|
minetest.sound_play({name="lzr_parrot_npc_curr"}, {to_player=to_player:get_player_name()})
|
||||||
end
|
end
|
||||||
|
|
||||||
lzr_parrot_npc.speak = function(player, message)
|
lzr_parrot_npc.speak = function(player, message)
|
||||||
local form = "formspec_version[7]size[10,5.5]"..
|
local form = "formspec_version[7]size[10,5.5]"..
|
||||||
"box[0,0;10,0.8;#0000004f]"..
|
"box[0,0;10,0.8;#0000004f]"..
|
||||||
"label[0.4,0.4;"..F(SPEAKER_NAME_INFOBLOCK).."]"..
|
"label[0.4,0.4;"..F(SPEAKER_NAME).."]"..
|
||||||
"box[0.5,1;2.0,3;#0000002f]"..
|
"box[0.5,1;2.0,3;#0000002f]"..
|
||||||
"image[0.75,1;1.5,3;lzr_parrot_npc_goldie_portrait.png]"..
|
"image[0.75,1;1.5,3;lzr_parrot_npc_goldie_portrait.png]"..
|
||||||
"box[3,1;6.5,3;#ffffff1f]"..
|
"box[3,1;6.5,3;#ffffff1f]"..
|
||||||
@ -35,7 +37,13 @@ end
|
|||||||
|
|
||||||
-- Make parrot face player
|
-- Make parrot face player
|
||||||
local face_player = function(parrot, player)
|
local face_player = function(parrot, player)
|
||||||
-- TODO: Face placer when we have an actual parrot
|
local papos = parrot.object:get_pos()
|
||||||
|
local plpos = player:get_pos()
|
||||||
|
papos.y = 0
|
||||||
|
plpos.y = 0
|
||||||
|
local dir = vector.direction(papos, plpos)
|
||||||
|
local yaw = minetest.dir_to_yaw(dir)
|
||||||
|
parrot.object:set_yaw(yaw)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Either show the current level hint for Goldie,
|
-- Either show the current level hint for Goldie,
|
||||||
@ -52,29 +60,21 @@ local react = function(parrot, player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: The parrot NPC is currently replaced
|
|
||||||
-- by a rotating information block
|
|
||||||
minetest.register_entity("lzr_parrot_npc:parrot", {
|
minetest.register_entity("lzr_parrot_npc:parrot", {
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
visual = "cube",
|
visual = "mesh",
|
||||||
-- TODO: Create a parrot model
|
mesh = "lzr_parrot_npc_parrot.gltf",
|
||||||
visual_size = { x=0.5, y=0.5, z=0.5 },
|
visual_size = { x=1, y=1, z=1 },
|
||||||
textures = {
|
textures = {
|
||||||
"lzr_parrot_npc_goldie.png",
|
"lzr_parrot_npc_goldie.png",
|
||||||
"lzr_parrot_npc_goldie.png",
|
|
||||||
"lzr_parrot_npc_goldie.png",
|
|
||||||
"lzr_parrot_npc_goldie.png",
|
|
||||||
"lzr_parrot_npc_goldie.png",
|
|
||||||
"lzr_parrot_npc_goldie.png",
|
|
||||||
},
|
},
|
||||||
|
backface_culling = false,
|
||||||
static_save = false,
|
static_save = false,
|
||||||
physical = false,
|
physical = false,
|
||||||
collide_with_objects = false,
|
collide_with_objects = false,
|
||||||
selectionbox = {
|
selectionbox = {
|
||||||
-0.25, -0.25, -0.25, 0.25, 0.25, 0.25, rotate = true,
|
-0.15, 0, -0.15, 0.15, 0.65, 0.3, rotate = true,
|
||||||
},
|
},
|
||||||
-- TODO: Remove for actual parrot
|
|
||||||
automatic_rotate = 1,
|
|
||||||
},
|
},
|
||||||
-- TODO: Add random parrot animation and looking
|
-- TODO: Add random parrot animation and looking
|
||||||
-- (on_step, on_activate)
|
-- (on_step, on_activate)
|
||||||
@ -106,25 +106,25 @@ minetest.register_node("lzr_parrot_npc:stand", {
|
|||||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- TODO: Use this description when we have a real parrot
|
|
||||||
local real_description = NS("Parrot Spawner")
|
|
||||||
|
|
||||||
minetest.register_node("lzr_parrot_npc:parrot_spawner", {
|
minetest.register_node("lzr_parrot_npc:parrot_spawner", {
|
||||||
-- TODO: Switch description when we have a real parrot
|
description = S("Parrot Spawner"),
|
||||||
description = S("Information Block Spawner"),
|
_tt_help = S("Goldie the Parrot will spawn here").."\n"..
|
||||||
_tt_help = S("An info block will spawn here").."\n"..
|
|
||||||
S("(only one per level allowed)"),
|
S("(only one per level allowed)"),
|
||||||
tiles = {
|
tiles = {
|
||||||
"lzr_parrot_npc_goldie_spawner_top.png",
|
{ name = "lzr_parrot_npc_goldie_spawner_top.png", backface_culling = true },
|
||||||
"lzr_parrot_npc_goldie_spawner_top.png^[transformR180",
|
{ name = "lzr_parrot_npc_goldie_spawner_bottom.png", backface_culling = true },
|
||||||
"lzr_parrot_npc_goldie_spawner_side.png",
|
{ name = "lzr_parrot_npc_goldie_spawner_left.png", backface_culling = true },
|
||||||
"lzr_parrot_npc_goldie_spawner_side.png",
|
{ name = "lzr_parrot_npc_goldie_spawner_right.png", backface_culling = true },
|
||||||
"lzr_parrot_npc_goldie_spawner_side.png",
|
{ name = "lzr_parrot_npc_goldie_spawner_back.png", backface_culling = true },
|
||||||
"lzr_parrot_npc_goldie_spawner.png",
|
{ name = "lzr_parrot_npc_goldie_spawner_front.png", backface_culling = true },
|
||||||
},
|
},
|
||||||
paramtype2 = "degrotate",
|
paramtype2 = "degrotate",
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "lzr_parrot_npc_cube.obj",
|
mesh = "lzr_parrot_npc_cube.obj",
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.4, -0.4, -0.4, 0.4, 0.4, 0.4 },
|
||||||
|
},
|
||||||
visual_scale = 0.8,
|
visual_scale = 0.8,
|
||||||
wield_scale = { x=0.8, y=0.8, z=0.8 },
|
wield_scale = { x=0.8, y=0.8, z=0.8 },
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
1
mods/lzr_parrot_npc/models/lzr_parrot_npc_parrot.bbmodel
Normal file
1
mods/lzr_parrot_npc/models/lzr_parrot_npc_parrot.gltf
Normal file
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 152 B |
After Width: | Height: | Size: 135 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 162 B |
After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 148 B |