Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| e3431d8de9 |
9 changed files with 31 additions and 44 deletions
|
|
@ -60,7 +60,7 @@ function artifact.play_sound(def)
|
||||||
--def.gain = nil
|
--def.gain = nil
|
||||||
if def.pos then
|
if def.pos then
|
||||||
for _, m in pairs(artifact.players) do
|
for _, m in pairs(artifact.players) do
|
||||||
local dist = vector.distance(m.pos, def.pos)
|
local dist = m.pos:distance(def.pos)
|
||||||
if dist <= (def.range or 32) and m.name ~= def.exclude_player and not (def.to_player and m.name ~= def.to_player) then
|
if dist <= (def.range or 32) and m.name ~= def.exclude_player and not (def.to_player and m.name ~= def.to_player) then
|
||||||
def.to_player = m.name
|
def.to_player = m.name
|
||||||
def.gain = (def.gain or 1) *(1 -math.sqrt(dist /(def.range or 32)))
|
def.gain = (def.gain or 1) *(1 -math.sqrt(dist /(def.range or 32)))
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,7 @@ function ns.apply_vix(m)
|
||||||
m.eye_height = 1.5
|
m.eye_height = 1.5
|
||||||
-- Switch hand appearance.
|
-- Switch hand appearance.
|
||||||
m.inv:set_stack("main", 1, ItemStack("input_"..m.character))
|
m.inv:set_stack("main", 1, ItemStack("input_"..m.character))
|
||||||
if m.healthbar then
|
|
||||||
m.object:hud_change(m.healthbar, "text", "artifact_heart_vix.png")
|
m.object:hud_change(m.healthbar, "text", "artifact_heart_vix.png")
|
||||||
end
|
|
||||||
if m.blackrod then
|
if m.blackrod then
|
||||||
m.blackrod:remove()
|
m.blackrod:remove()
|
||||||
m.blackrod = nil
|
m.blackrod = nil
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ Player = setmetatable({
|
||||||
local m = setmetatable({
|
local m = setmetatable({
|
||||||
object = p,
|
object = p,
|
||||||
pitch = 0,
|
pitch = 0,
|
||||||
yaw = 0,
|
yaw = 0
|
||||||
pos = p:get_pos()
|
|
||||||
}, {__index = Player})
|
}, {__index = Player})
|
||||||
|
|
||||||
m.name = p:get_player_name()
|
m.name = p:get_player_name()
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,6 @@ minetest.register_entity(":artifact:vix_scene", {
|
||||||
end,
|
end,
|
||||||
on_deactivate = function(e)
|
on_deactivate = function(e)
|
||||||
vix_scene = nil
|
vix_scene = nil
|
||||||
if e.particles then
|
|
||||||
minetest.delete_particlespawner(e.particles)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
on_step = function(e)
|
on_step = function(e)
|
||||||
if e._can_check then
|
if e._can_check then
|
||||||
|
|
@ -95,9 +92,24 @@ minetest.register_entity(":artifact:vix_scene", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function ns.enter_pre_vix_state()
|
||||||
local help
|
for _, m in pairs(artifact.players) do
|
||||||
local function pre_vix_on_whacked(type, target)
|
m:add_health_bar()
|
||||||
|
m.object:hud_set_flags {
|
||||||
|
crosshair = true,
|
||||||
|
wielditem = true,
|
||||||
|
}
|
||||||
|
m.object:set_pos(artifact.origin:offset(0, -73.5, -4))
|
||||||
|
m:set_spawnpoint(artifact.origin:offset(0, -73.5, -4))
|
||||||
|
end
|
||||||
|
minetest.add_entity(artifact.origin:offset(-16.5, -72.5, -17), "artifact:vix_scene")
|
||||||
|
local help = minetest.after(15, function()
|
||||||
|
for _, m in pairs(artifact.players) do
|
||||||
|
artifact.show_help_message(m, "Certain nodes can be broken by punching them with the blackrod.", "info")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
db:set_string("checkpoint:pre_vix", "begin")
|
||||||
|
artifact.on_whacked = function(type, target)
|
||||||
local checkpoint = db:get("checkpoint:pre_vix")
|
local checkpoint = db:get("checkpoint:pre_vix")
|
||||||
if checkpoint == "begin" then -- We're still in the start closet.
|
if checkpoint == "begin" then -- We're still in the start closet.
|
||||||
if type == "object" then
|
if type == "object" then
|
||||||
|
|
@ -113,7 +125,7 @@ local function pre_vix_on_whacked(type, target)
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
artifact.push_chat_message("Hehe.", "Key", "artifact_key_splash_low.png")
|
artifact.push_chat_message("Hehe.", "Key", "artifact_key_splash_low.png")
|
||||||
end)
|
end)
|
||||||
elseif num >= 5 then -- All generators are down.
|
elseif num == 5 then -- All generators are down.
|
||||||
vix_scene._can_check = nil
|
vix_scene._can_check = nil
|
||||||
-- Wait just a bit, so the player can look up.
|
-- Wait just a bit, so the player can look up.
|
||||||
minetest.after(0.5, function()
|
minetest.after(0.5, function()
|
||||||
|
|
@ -123,24 +135,6 @@ local function pre_vix_on_whacked(type, target)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function ns.enter_pre_vix_state()
|
|
||||||
for _, m in pairs(artifact.players) do
|
|
||||||
m:add_health_bar()
|
|
||||||
m.object:hud_set_flags {
|
|
||||||
crosshair = true,
|
|
||||||
wielditem = true,
|
|
||||||
}
|
|
||||||
m.object:set_pos(artifact.origin:offset(0, -73.5, -4))
|
|
||||||
m:set_spawnpoint(artifact.origin:offset(0, -73.5, -4))
|
|
||||||
end
|
|
||||||
minetest.add_entity(artifact.origin:offset(-16.5, -72.5, -17), "artifact:vix_scene")
|
|
||||||
help = minetest.after(15, function()
|
|
||||||
for _, m in pairs(artifact.players) do
|
|
||||||
artifact.show_help_message(m, "Certain nodes can be broken by punching them with the blackrod.", "info")
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
db:set_string("checkpoint:pre_vix", "begin")
|
|
||||||
artifact.on_whacked = pre_vix_on_whacked
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ns.enter_main_state()
|
function ns.enter_main_state()
|
||||||
|
|
@ -266,7 +260,7 @@ artifact.register_node("stasis_beacon", {
|
||||||
paramtype = "light"
|
paramtype = "light"
|
||||||
})
|
})
|
||||||
|
|
||||||
-- The 'cutscene' played after the player frees Vix.
|
-- The 'cutscene' playerd after the player frees Vix.
|
||||||
function ns.play_vix_scene()
|
function ns.play_vix_scene()
|
||||||
-- Kaboom.
|
-- Kaboom.
|
||||||
minetest.add_particle {
|
minetest.add_particle {
|
||||||
|
|
@ -990,10 +984,6 @@ minetest.register_on_joinplayer(function(p)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if state == ns.states.pre_vix then
|
|
||||||
artifact.on_whacked = pre_vix_on_whacked
|
|
||||||
end
|
|
||||||
|
|
||||||
if state == ns.states.pre_vix and db:get_int("checkpoint:pre_vix_fields_broken") >= 5 then
|
if state == ns.states.pre_vix and db:get_int("checkpoint:pre_vix_fields_broken") >= 5 then
|
||||||
-- If the player left during the scene for some reason, start it over when they join back.
|
-- If the player left during the scene for some reason, start it over when they join back.
|
||||||
ns.play_vix_scene()
|
ns.play_vix_scene()
|
||||||
|
|
|
||||||
BIN
originals/artifact_splash.jpeg
Normal file
BIN
originals/artifact_splash.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
BIN
originals/artifact_splash.mp4
Normal file
BIN
originals/artifact_splash.mp4
Normal file
Binary file not shown.
BIN
originals/artifact_splash_2.jpeg
Normal file
BIN
originals/artifact_splash_2.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 150 KiB |
BIN
originals/artifact_splash_2.mp4
Normal file
BIN
originals/artifact_splash_2.mp4
Normal file
Binary file not shown.
BIN
originals/artifact_splash_3.jpeg
Normal file
BIN
originals/artifact_splash_3.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 147 KiB |
Loading…
Add table
Add a link
Reference in a new issue