Add new first level, fix treasure counter

master
Wuzzy 2022-03-06 22:52:36 +01:00
parent 69ba50e49f
commit 16fb221c1d
11 changed files with 6 additions and 4 deletions

View File

@ -71,6 +71,7 @@ Group rating 1 is for the inactive state, group rating 2 is for the active state
* `4`: open, with treasure
* `chest_closed=1`: Closed chest
* `chest_open=1`: Open chest
* `chest_open_treasure=1`: Open chest with treasure
* `water=3`: Water
* `liquid=3`: Node is a liquid in a semantic sense
* `pane=1`: Pane (flat window-like block)

View File

@ -249,7 +249,7 @@ end
-- Returns the number of treasures found in current level
function lzr_laser.count_found_treasures(pos1, pos2)
return #minetest.find_nodes_in_area(pos1, pos2, {"group:chest_open"})
return #minetest.find_nodes_in_area(pos1, pos2, {"group:chest_open_treasure"})
end
-- Returns true if player has no detectors in inventory

View File

@ -1,6 +1,7 @@
lzr_levels_level_1.mts,Demo Level 1,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_1.mts,Demo Level 1,lzr_core:wood,ocean
lzr_levels_level_2.mts,Demo Level 2,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_3.mts,Demo Level 3,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_4.mts,Demo Level 4,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_5.mts,Demo Level 5,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_6.mts,Demo Level 6,lzr_decor:ocean_stone|lzr_decor:ocean_stone|lzr_core:dirt|lzr_core:dirt,temple
lzr_levels_level_6.mts,Demo Level 6,lzr_core:wood|lzr_decor:woodframed_glass,ocean
lzr_levels_level_7.mts,Demo Level 7,lzr_decor:ocean_stone|lzr_decor:ocean_stone|lzr_core:dirt|lzr_core:dirt,temple

1 lzr_levels_level_1.mts Demo Level 1 lzr_core:wood|lzr_decor:woodframed_glass lzr_core:wood ocean
2 lzr_levels_level_2.mts Demo Level 2 lzr_core:wood|lzr_decor:woodframed_glass lzr_core:wood|lzr_decor:woodframed_glass ocean
3 lzr_levels_level_3.mts Demo Level 3 lzr_core:wood|lzr_decor:woodframed_glass lzr_core:wood|lzr_decor:woodframed_glass ocean
4 lzr_levels_level_4.mts Demo Level 4 lzr_core:wood|lzr_decor:woodframed_glass lzr_core:wood|lzr_decor:woodframed_glass ocean
5 lzr_levels_level_5.mts Demo Level 5 lzr_core:wood|lzr_decor:woodframed_glass lzr_core:wood|lzr_decor:woodframed_glass ocean
6 lzr_levels_level_6.mts Demo Level 6 lzr_decor:ocean_stone|lzr_decor:ocean_stone|lzr_core:dirt|lzr_core:dirt lzr_core:wood|lzr_decor:woodframed_glass temple ocean
7 lzr_levels_level_7.mts Demo Level 7 lzr_decor:ocean_stone|lzr_decor:ocean_stone|lzr_core:dirt|lzr_core:dirt temple

Binary file not shown.

View File

@ -184,7 +184,7 @@ local register_chest = function(id, def)
minetest.set_node(pos, {name="lzr_treasure:chest_"..id.."_open", param2=node.param2})
end,
paramtype2 = "facedir",
groups = { breakable = 1, chest = 4, chest_open = 1, rotatable = 3, },
groups = { breakable = 1, chest = 4, chest_open = 1, chest_open_treasure = 1, rotatable = 3, },
sounds = sounds_open_treasure,
on_rotate = screwdriver.rotate_simple,
})