├── .gitmodules ├── mods ├── vk_nodes │ ├── dungeon_nodes.lua │ ├── mod.conf │ ├── src │ │ ├── doors.nbe │ │ ├── lamp.blend │ │ ├── stairs.nbe │ │ ├── torch.blend │ │ ├── stations.nbe │ │ ├── torch_uv.png │ │ ├── torch_wall.blend │ │ └── posts.nbe │ ├── textures │ │ ├── nodes_cobweb.png │ │ ├── nodes_dirt.png │ │ ├── nodes_fire.png │ │ ├── nodes_grass.png │ │ ├── nodes_iron.png │ │ ├── nodes_leaves.png │ │ ├── nodes_sand.png │ │ ├── nodes_stone.png │ │ ├── nodes_torch.png │ │ ├── nodes_tree.png │ │ ├── nodes_water.png │ │ ├── nodes_wood.png │ │ ├── nodes_mappick.png │ │ ├── nodes_chest_back.png │ │ ├── nodes_chest_front.png │ │ ├── nodes_chest_side.png │ │ ├── nodes_chest_top.png │ │ ├── nodes_door_wooden.png │ │ ├── nodes_grass_side.png │ │ ├── nodes_stone_brick.png │ │ ├── nodes_chest_bottom.png │ │ └── license.txt │ ├── api.md │ ├── fire.lua │ ├── stairs.lua │ ├── structure_nodes.lua │ ├── posts.lua │ ├── license.txt │ ├── doors.lua │ ├── init.lua │ ├── lighting.lua │ ├── stations.lua │ ├── treasure_chests.lua │ ├── map.lua │ └── models │ │ └── torch.obj ├── rhotator │ ├── depends.txt │ ├── mod.conf │ ├── .gitattributes │ ├── textures │ │ ├── rhotator.png │ │ ├── rhotocube.png │ │ ├── rhotator-alt.png │ │ ├── rhotator-multi.png │ │ └── rhotator-memory.png │ ├── screenshots │ │ ├── preview.png │ │ ├── rhotator-recipe.png │ │ ├── rhotator-alt-recipe.png │ │ ├── interaction-triangle.png │ │ ├── rhotator-cube-recipe.png │ │ ├── rhotator-multi-recipe.png │ │ └── rhotator-memory-recipe.png │ ├── default │ │ ├── README.txt │ │ └── recipes.lua │ ├── LICENSE │ ├── models │ │ └── rhotocube.obj │ ├── custom.recipes.lua │ ├── notify.lua │ └── README.md ├── vkore │ ├── mod.conf │ ├── helpers.lua │ ├── license.txt │ └── init.lua ├── luamatrix │ ├── mod.conf │ ├── .gitattributes │ ├── README.txt │ ├── init.lua │ └── LICENSE.txt ├── vk_combat │ ├── modpack.conf │ ├── vk_swords │ │ ├── mod.conf │ │ ├── textures │ │ │ ├── slash.1.png │ │ │ ├── slash.2.png │ │ │ └── swords_sword.png │ │ ├── init.lua │ │ └── api.lua │ └── license.txt ├── vk_enemies │ ├── modpack.conf │ ├── pathfinder │ │ ├── mod.conf │ │ ├── init.lua │ │ ├── LICENSE │ │ ├── astar_mt.lua │ │ └── astar_core.lua │ ├── spawners │ │ ├── mod.conf │ │ ├── textures │ │ │ └── spawners_dungeon_spawner.png │ │ ├── license.txt │ │ └── init.lua │ ├── mobkit_custom │ │ ├── mod.conf │ │ └── init.lua │ └── spider │ │ ├── mod.conf │ │ ├── models │ │ ├── spider_spider.b3d │ │ └── spider_spider.blend │ │ ├── textures │ │ └── spider_spider.png │ │ ├── license.txt │ │ └── init.lua ├── vk_players │ ├── modpack.conf │ ├── vk_player_sky │ │ ├── mod.conf │ │ └── init.lua │ ├── vk_party │ │ ├── mod.conf │ │ ├── src │ │ │ └── nodes.nbe │ │ ├── textures │ │ │ └── party_glow.png │ │ └── init.lua │ ├── vk_player │ │ ├── hud_info.lua │ │ ├── mod.conf │ │ ├── textures │ │ │ ├── xp.png │ │ │ ├── heart.png │ │ │ ├── bubble.png │ │ │ ├── player.png │ │ │ ├── gui_formbg.png │ │ │ ├── gui_hb_bg.png │ │ │ ├── wieldhand.png │ │ │ ├── player_gold.png │ │ │ ├── crack_anylength.png │ │ │ └── license.txt │ │ ├── models │ │ │ ├── player.b3d │ │ │ └── player.blend │ │ ├── regen.lua │ │ ├── inventory.lua │ │ ├── init.lua │ │ ├── hp.lua │ │ ├── experience.lua │ │ ├── client │ │ │ └── init.lua │ │ ├── gold.lua │ │ └── model.lua │ ├── vk_player_stats │ │ ├── mod.conf │ │ ├── stat_tab.lua │ │ └── init.lua │ └── license.txt ├── mobkit │ ├── mod.conf │ ├── screenshot.png │ └── LICENSE ├── vk_quests │ ├── mod.conf │ ├── quests.lua │ ├── sfinv_page.lua │ └── init.lua ├── vk_mapgen │ ├── mod.conf │ ├── schems │ │ ├── bush.mts │ │ ├── tree.mts │ │ └── structures │ │ │ ├── town1.mts │ │ │ └── dungeon1.mts │ ├── init.lua │ ├── decorations.lua │ ├── license.txt │ ├── biomes.lua │ └── structures.lua ├── vk_npcs │ ├── mod.conf │ ├── textures │ │ ├── vk_npcs_guard.png │ │ ├── vk_npcs_blacksmith.png │ │ ├── vk_npcs_stable_man.png │ │ └── vk_npcs_tavern_keeper.png │ ├── models │ │ └── player.mtl │ └── init.lua ├── sfinv │ ├── mod.conf │ ├── description.txt │ ├── screenshot.png │ ├── textures │ │ └── sfinv_crafting_arrow.png │ ├── init.lua │ ├── README.txt │ ├── license.txt │ ├── README.md │ └── api.lua ├── hudbars │ ├── locale │ │ ├── hudbars.de.tr │ │ ├── hudbars.ru.tr │ │ ├── hudbars.tr.tr │ │ ├── hudbars.es.tr │ │ ├── hudbars.ms.tr │ │ ├── template.txt │ │ ├── hudbars.it.tr │ │ ├── hudbars.nl.tr │ │ └── hudbars.pt.tr │ ├── screenshot.png │ ├── textures │ │ ├── hudbars_bar_breath.png │ │ ├── hudbars_bar_health.png │ │ ├── hudbars_icon_breath.png │ │ ├── hudbars_icon_health.png │ │ ├── hudbars_bar_background.png │ │ ├── hudbars_bgicon_breath.png │ │ └── hudbars_bgicon_health.png │ ├── mod.conf │ ├── README.md │ ├── default_settings.lua │ ├── settingtypes.txt │ └── API.md └── creative │ ├── textures │ ├── creative_clear_icon.png │ ├── creative_next_icon.png │ ├── creative_prev_icon.png │ ├── creative_trash_icon.png │ └── creative_search_icon.png │ ├── mod.conf │ ├── README.txt │ ├── init.lua │ ├── license.txt │ └── inventory.lua ├── dungeons.zip ├── menu ├── icon.png ├── header.png ├── overlay.png └── overlay.1.png ├── screenshot.png ├── settingtypes.txt ├── screenshotCDB.png ├── game.conf ├── .github └── workflows │ └── luacheck.yml ├── .luacheckrc ├── readme.md ├── api.md └── LICENSE /.gitmodules: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mods/vk_nodes/dungeon_nodes.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mods/rhotator/depends.txt: -------------------------------------------------------------------------------- 1 | matrix 2 | -------------------------------------------------------------------------------- /mods/vkore/mod.conf: -------------------------------------------------------------------------------- 1 | name = vkore 2 | -------------------------------------------------------------------------------- /mods/luamatrix/mod.conf: -------------------------------------------------------------------------------- 1 | name = matrix 2 | -------------------------------------------------------------------------------- /mods/vk_nodes/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_nodes 2 | -------------------------------------------------------------------------------- /mods/vk_combat/modpack.conf: -------------------------------------------------------------------------------- 1 | name = vk_combat 2 | -------------------------------------------------------------------------------- /mods/vk_enemies/modpack.conf: -------------------------------------------------------------------------------- 1 | name = vk_enemies 2 | -------------------------------------------------------------------------------- /mods/vk_players/modpack.conf: -------------------------------------------------------------------------------- 1 | name = vk_players 2 | -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_swords 2 | -------------------------------------------------------------------------------- /mods/vk_enemies/pathfinder/mod.conf: -------------------------------------------------------------------------------- 1 | name = pathfinder 2 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player_sky/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_player_sky 2 | -------------------------------------------------------------------------------- /mods/mobkit/mod.conf: -------------------------------------------------------------------------------- 1 | name = mobkit 2 | description = Entity API 3 | -------------------------------------------------------------------------------- /mods/rhotator/mod.conf: -------------------------------------------------------------------------------- 1 | name = rhotator 2 | 3 | depends = matrix 4 | -------------------------------------------------------------------------------- /mods/vk_enemies/spawners/mod.conf: -------------------------------------------------------------------------------- 1 | name = spawners 2 | depends = vkore 3 | -------------------------------------------------------------------------------- /mods/vk_players/vk_party/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_party 2 | depends = vkore 3 | -------------------------------------------------------------------------------- /mods/vk_quests/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_quests 2 | depends = sfinv, vkore 3 | -------------------------------------------------------------------------------- /mods/vk_mapgen/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_mapgen 2 | depends = vk_nodes, vkore 3 | -------------------------------------------------------------------------------- /mods/vk_npcs/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_npcs 2 | depends = vk_mapgen, vk_quests 3 | -------------------------------------------------------------------------------- /mods/sfinv/mod.conf: -------------------------------------------------------------------------------- 1 | name = sfinv 2 | description = Minetest Game mod: sfinv 3 | -------------------------------------------------------------------------------- /dungeons.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/dungeons.zip -------------------------------------------------------------------------------- /menu/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/menu/icon.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/screenshot.png -------------------------------------------------------------------------------- /settingtypes.txt: -------------------------------------------------------------------------------- 1 | # Options: play, dev 2 | vkore_game_mode (Game Mode) string play 3 | -------------------------------------------------------------------------------- /menu/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/menu/header.png -------------------------------------------------------------------------------- /menu/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/menu/overlay.png -------------------------------------------------------------------------------- /menu/overlay.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/menu/overlay.1.png -------------------------------------------------------------------------------- /mods/vk_enemies/mobkit_custom/mod.conf: -------------------------------------------------------------------------------- 1 | name = mobkit_custom 2 | depends = mobkit, vk_player 3 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/hud_info.lua: -------------------------------------------------------------------------------- 1 | function players.hud_info_add(player, message) 2 | end 3 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player_stats/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_player_stats 2 | depends = sfinv, vkore 3 | -------------------------------------------------------------------------------- /screenshotCDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/screenshotCDB.png -------------------------------------------------------------------------------- /mods/luamatrix/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /mods/rhotator/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /mods/sfinv/description.txt: -------------------------------------------------------------------------------- 1 | A cleaner, simpler solution to having an advanced inventory in Minetest. 2 | -------------------------------------------------------------------------------- /mods/vk_enemies/spider/mod.conf: -------------------------------------------------------------------------------- 1 | name = spider 2 | depends = mobkit_custom, vk_nodes, pathfinder 3 | -------------------------------------------------------------------------------- /mods/mobkit/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/mobkit/screenshot.png -------------------------------------------------------------------------------- /mods/sfinv/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/sfinv/screenshot.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/mod.conf: -------------------------------------------------------------------------------- 1 | name = vk_player 2 | depends = sfinv, vk_nodes, hudbars, vk_player_stats 3 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.de.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Leben 3 | Breath=Atem 4 | @1: @2/@3=@1: @2/@3 5 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.ru.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=HP 3 | Breath=дыхание 4 | @1: @2/@3=@1: @2/@3 5 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.tr.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Can 3 | Breath=Nefes 4 | @1: @2/@3=@1: @2/@3 5 | -------------------------------------------------------------------------------- /mods/hudbars/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/screenshot.png -------------------------------------------------------------------------------- /mods/vk_nodes/src/doors.nbe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/doors.nbe -------------------------------------------------------------------------------- /mods/vk_nodes/src/lamp.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/lamp.blend -------------------------------------------------------------------------------- /mods/vk_nodes/src/stairs.nbe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/stairs.nbe -------------------------------------------------------------------------------- /mods/vk_nodes/src/torch.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/torch.blend -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.es.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Salud 3 | Breath=Aliento 4 | @1: @2/@3=@1: @2/@3 5 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.ms.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Kesihatan 3 | Breath=Nafas 4 | @1: @2/@3=@1: @2/@3 5 | -------------------------------------------------------------------------------- /mods/vk_mapgen/schems/bush.mts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_mapgen/schems/bush.mts -------------------------------------------------------------------------------- /mods/vk_mapgen/schems/tree.mts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_mapgen/schems/tree.mts -------------------------------------------------------------------------------- /mods/vk_nodes/src/stations.nbe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/stations.nbe -------------------------------------------------------------------------------- /mods/vk_nodes/src/torch_uv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/torch_uv.png -------------------------------------------------------------------------------- /mods/vk_nodes/src/torch_wall.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/src/torch_wall.blend -------------------------------------------------------------------------------- /mods/rhotator/textures/rhotator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/textures/rhotator.png -------------------------------------------------------------------------------- /mods/rhotator/textures/rhotocube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/textures/rhotocube.png -------------------------------------------------------------------------------- /game.conf: -------------------------------------------------------------------------------- 1 | name = Voxel Knights 2 | description = A heavily WIP game based off of Skyrim and Spiral Knights 3 | allowed_mapgens = flat 4 | -------------------------------------------------------------------------------- /mods/rhotator/screenshots/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/preview.png -------------------------------------------------------------------------------- /mods/rhotator/textures/rhotator-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/textures/rhotator-alt.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_cobweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_cobweb.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_dirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_dirt.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_fire.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_grass.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_iron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_iron.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_leaves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_leaves.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_sand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_sand.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_stone.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_torch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_torch.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_tree.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_water.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_wood.png -------------------------------------------------------------------------------- /mods/vk_npcs/textures/vk_npcs_guard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_npcs/textures/vk_npcs_guard.png -------------------------------------------------------------------------------- /mods/vk_players/vk_party/src/nodes.nbe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_party/src/nodes.nbe -------------------------------------------------------------------------------- /mods/rhotator/textures/rhotator-multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/textures/rhotator-multi.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_mappick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_mappick.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/xp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/xp.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_bar_breath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_bar_breath.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_bar_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_bar_health.png -------------------------------------------------------------------------------- /mods/rhotator/textures/rhotator-memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/textures/rhotator-memory.png -------------------------------------------------------------------------------- /mods/sfinv/textures/sfinv_crafting_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/sfinv/textures/sfinv_crafting_arrow.png -------------------------------------------------------------------------------- /mods/vk_mapgen/schems/structures/town1.mts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_mapgen/schems/structures/town1.mts -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_chest_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_chest_back.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_chest_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_chest_front.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_chest_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_chest_side.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_chest_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_chest_top.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_door_wooden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_door_wooden.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_grass_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_grass_side.png -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_stone_brick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_stone_brick.png -------------------------------------------------------------------------------- /mods/vk_npcs/textures/vk_npcs_blacksmith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_npcs/textures/vk_npcs_blacksmith.png -------------------------------------------------------------------------------- /mods/vk_npcs/textures/vk_npcs_stable_man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_npcs/textures/vk_npcs_stable_man.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/models/player.b3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/models/player.b3d -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/heart.png -------------------------------------------------------------------------------- /mods/creative/textures/creative_clear_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/creative/textures/creative_clear_icon.png -------------------------------------------------------------------------------- /mods/creative/textures/creative_next_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/creative/textures/creative_next_icon.png -------------------------------------------------------------------------------- /mods/creative/textures/creative_prev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/creative/textures/creative_prev_icon.png -------------------------------------------------------------------------------- /mods/creative/textures/creative_trash_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/creative/textures/creative_trash_icon.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_icon_breath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_icon_breath.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_icon_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_icon_health.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/rhotator-recipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/rhotator-recipe.png -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/textures/slash.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_combat/vk_swords/textures/slash.1.png -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/textures/slash.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_combat/vk_swords/textures/slash.2.png -------------------------------------------------------------------------------- /mods/vk_mapgen/schems/structures/dungeon1.mts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_mapgen/schems/structures/dungeon1.mts -------------------------------------------------------------------------------- /mods/vk_nodes/textures/nodes_chest_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_nodes/textures/nodes_chest_bottom.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/models/player.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/models/player.blend -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/bubble.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/player.png -------------------------------------------------------------------------------- /mods/creative/mod.conf: -------------------------------------------------------------------------------- 1 | name = creative 2 | description = Minetest Game mod: creative 3 | depends = sfinv 4 | optional_depends = default, vk_player_stats 5 | -------------------------------------------------------------------------------- /mods/creative/textures/creative_search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/creative/textures/creative_search_icon.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_bar_background.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_bgicon_breath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_bgicon_breath.png -------------------------------------------------------------------------------- /mods/hudbars/textures/hudbars_bgicon_health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/hudbars/textures/hudbars_bgicon_health.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/rhotator-alt-recipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/rhotator-alt-recipe.png -------------------------------------------------------------------------------- /mods/vk_enemies/spider/models/spider_spider.b3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_enemies/spider/models/spider_spider.b3d -------------------------------------------------------------------------------- /mods/vk_enemies/spider/models/spider_spider.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_enemies/spider/models/spider_spider.blend -------------------------------------------------------------------------------- /mods/vk_enemies/spider/textures/spider_spider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_enemies/spider/textures/spider_spider.png -------------------------------------------------------------------------------- /mods/vk_npcs/textures/vk_npcs_tavern_keeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_npcs/textures/vk_npcs_tavern_keeper.png -------------------------------------------------------------------------------- /mods/vk_players/vk_party/textures/party_glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_party/textures/party_glow.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/gui_formbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/gui_formbg.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/gui_hb_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/gui_hb_bg.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/wieldhand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/wieldhand.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/interaction-triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/interaction-triangle.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/rhotator-cube-recipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/rhotator-cube-recipe.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/rhotator-multi-recipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/rhotator-multi-recipe.png -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/textures/swords_sword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_combat/vk_swords/textures/swords_sword.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/player_gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/player_gold.png -------------------------------------------------------------------------------- /mods/rhotator/screenshots/rhotator-memory-recipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/rhotator/screenshots/rhotator-memory-recipe.png -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/crack_anylength.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_players/vk_player/textures/crack_anylength.png -------------------------------------------------------------------------------- /mods/rhotator/default/README.txt: -------------------------------------------------------------------------------- 1 | please do not edit any file in this folder, 2 | corresponding custom.* files get created in the main mod's folder for you to customize 3 | -------------------------------------------------------------------------------- /mods/hudbars/locale/template.txt: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health= 3 | Breath= 4 | 5 | # Default format string for progress bar-style HUD bars, e.g. “Health 5/20” 6 | @1: @2/@3= 7 | -------------------------------------------------------------------------------- /mods/vk_enemies/spawners/textures/spawners_dungeon_spawner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LoneWolfHT/voxel_knights/HEAD/mods/vk_enemies/spawners/textures/spawners_dungeon_spawner.png -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.it.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Salute 3 | Breath=Ossigeno 4 | 5 | # Default format string for progress bar-style HUD bars, e.g. “Health 5/20” 6 | @1: @2/@3=@1: @2/@3 7 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.nl.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Gezondheid 3 | Breath=Adem 4 | 5 | # Default format string for progress bar-style HUD bars, e.g. “Health 5/20” 6 | @1: @2/@3=@1: @2/@3 7 | -------------------------------------------------------------------------------- /mods/vk_nodes/api.md: -------------------------------------------------------------------------------- 1 | # Node mod API 2 | 3 | ```lua 4 | nodes.register_on_nodeload(function(pos, node) 5 | -- Do stuff to a schematic node after it's been constructed for the first time 6 | end) 7 | ``` 8 | -------------------------------------------------------------------------------- /mods/hudbars/mod.conf: -------------------------------------------------------------------------------- 1 | name = hudbars 2 | description = Replaces the health and breath symbols in the HUD by “progress bars” and shows exact values. Other mods can add more progress bars for custom player stats. 3 | -------------------------------------------------------------------------------- /mods/hudbars/locale/hudbars.pt.tr: -------------------------------------------------------------------------------- 1 | # textdomain: hudbars 2 | Health=Saude 3 | Breath=Folego 4 | 5 | # Formato de string padrão para progresso bar-style de barras do HUD, por exemplo “Saude 5/20” 6 | @1: @2/@3=@1: @2/@3 7 | -------------------------------------------------------------------------------- /mods/luamatrix/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/entuland/lua-matrix is just a thin wrapper to make this library available as a mod inside the Minetest game. 2 | Please see https://github.com/davidm/lua-matrix for the original version -------------------------------------------------------------------------------- /mods/luamatrix/init.lua: -------------------------------------------------------------------------------- 1 | 2 | -- this whole mod is just a thin wrapper around https://github.com/davidm/lua-matrix 3 | 4 | local mod_path = minetest.get_modpath(minetest.get_current_modname()) 5 | 6 | matrix = dofile(mod_path .. "/matrix.lua") 7 | 8 | -- that's it 9 | -------------------------------------------------------------------------------- /mods/vk_npcs/models/player.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'player.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 225.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /.github/workflows/luacheck.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | name: build 3 | jobs: 4 | luacheck: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - name: Run LuaCheck 9 | uses: Roang-zero1/factorio-mod-luacheck@master 10 | with: 11 | luacheckrc_url: "" 12 | -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/init.lua: -------------------------------------------------------------------------------- 1 | swords = {} 2 | 3 | local modname = minetest.get_current_modname() 4 | 5 | dofile(minetest.get_modpath(modname).."/api.lua") 6 | 7 | swords.register_sword(modname..":sword", { 8 | description = "A basic sword", 9 | texture = "swords_sword.png", 10 | damage = {fleshy = 3}, 11 | speed = 1.5, 12 | glow = 1 13 | }) 14 | -------------------------------------------------------------------------------- /mods/vkore/helpers.lua: -------------------------------------------------------------------------------- 1 | function vkore.playerObj(player) 2 | if type(player) == "string" then 3 | return minetest.get_player_by_name(player) 4 | else 5 | return player 6 | end 7 | end 8 | 9 | function vkore.playerName(player) 10 | if type(player) == "string" then 11 | return player 12 | else 13 | return player:get_player_name() 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/regen.lua: -------------------------------------------------------------------------------- 1 | local timer = 0 2 | 3 | minetest.register_globalstep(function(dtime) 4 | timer = timer + dtime 5 | 6 | if timer >= 10 then 7 | timer = timer - 10 8 | 9 | for _, player in pairs(minetest.get_connected_players()) do 10 | local meta = player:get_meta() 11 | local new_hp = player:get_hp() + (meta:get_int("regen")/3) 12 | 13 | player:set_hp(new_hp) 14 | end 15 | end 16 | end) 17 | -------------------------------------------------------------------------------- /mods/vk_nodes/src/posts.nbe: -------------------------------------------------------------------------------- 1 | NBEFPproject.txt @$MINETEST NODEBOX EDITOR 2 | PARSER 2 3 | NAME test 4 | 5 | NODE post_regular 6 | POSITION 0 0 0 7 | NODEBOX post -0.125 -0.5 -0.125 0.125 0.5 0.125 8 | END NODE 9 | 10 | NODE post_cross 11 | POSITION 1 0 0 12 | NODEBOX post_horizontal -0.5 -0.125 -0.125 0.5 0.125 0.125 13 | NODEBOX post_vertical -0.125 -0.5 -0.125 0.125 0.5 0.125 14 | END NODE 15 | 16 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/inventory.lua: -------------------------------------------------------------------------------- 1 | hb.settings.bar_type = "progress_bar" 2 | 3 | minetest.register_on_joinplayer(function(player) 4 | player:set_formspec_prepend( 5 | "background[0,0;0,0;gui_formbg.png;true]" .. 6 | "real_coordinates[true]" 7 | ) 8 | end) 9 | 10 | sfinv.override_page("sfinv:crafting", { 11 | title = "Main", 12 | get = function(self, player, context) 13 | return sfinv.make_formspec(player, context, [[ 14 | ]], true) 15 | end 16 | }) 17 | -------------------------------------------------------------------------------- /mods/sfinv/init.lua: -------------------------------------------------------------------------------- 1 | dofile(minetest.get_modpath("sfinv") .. "/api.lua") 2 | 3 | sfinv.register_page("sfinv:crafting", { 4 | title = "Crafting", 5 | get = function(self, player, context) 6 | return sfinv.make_formspec(player, context, [[ 7 | list[current_player;craft;1.75,0.5;3,3;] 8 | list[current_player;craftpreview;5.75,1.5;1,1;] 9 | image[4.75,1.5;1,1;sfinv_crafting_arrow.png] 10 | listring[current_player;main] 11 | listring[current_player;craft] 12 | ]], true) 13 | end 14 | }) 15 | -------------------------------------------------------------------------------- /mods/vk_nodes/fire.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | minetest.register_node(modname..":fire", { 4 | description = "Fire", 5 | drawtype = "firelike", 6 | tiles = {{name = "nodes_fire.png", animation = { 7 | type = "vertical_frames", 8 | aspect_w = 16, 9 | aspect_h = 16, 10 | length = 3.0, 11 | }}}, 12 | groups = {unbreakable = 1}, 13 | walkable = false, 14 | paramtype = "light", 15 | sunlight_propogates = true, 16 | light_source = 8, 17 | damage_per_second = 2, 18 | }) 19 | -------------------------------------------------------------------------------- /mods/vk_quests/quests.lua: -------------------------------------------------------------------------------- 1 | vk_quests.register_quest("kill", "spider:spider", { 2 | description = "Kill 10 spiders", 3 | comments = { 4 | "I've been seeing too many spiders recently", 5 | "I'm planning on starting a fly collection but there's too much competition", 6 | "A spider ate my cousin Joe, but I recently took a sharpened stick to the knee so I can't avenge him myself" 7 | }, 8 | amount = 10, 9 | rewards_description = "Rewards: 5 gold and 15 xp", 10 | rewards = { 11 | xp = 15, 12 | gold = 5, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player_sky/init.lua: -------------------------------------------------------------------------------- 1 | minetest.register_on_joinplayer(function(player) 2 | if player.set_stars then 3 | player:set_sky({ 4 | type = "regular", 5 | sky_color = { 6 | day_sky = 0x65bcfd, 7 | day_horizon = 0x6cc0ff, 8 | dawn_sky = 0x32aeff, 9 | dawn_horizon = 0xf68b49, 10 | night_sky = 0x0093ff, 11 | night_horizon = 0x0093ff, 12 | indoors = 0x646464, 13 | } 14 | }) 15 | 16 | player:set_stars({ 17 | count = 3000, 18 | scale = 0.4, 19 | star_color = "#fffee9", 20 | }) 21 | end 22 | end) 23 | -------------------------------------------------------------------------------- /mods/vk_enemies/pathfinder/init.lua: -------------------------------------------------------------------------------- 1 | pathfinder = {} 2 | 3 | local function include(n, ...) 4 | return loadfile(minetest.get_modpath(minetest.get_current_modname()) 5 | .. "/" .. n .. ".lua")(...) 6 | end 7 | 8 | pathfinder.get = include("astar_mt", include("astar_core")) 9 | 10 | function pathfinder.find(pos1, pos2, maxpts) 11 | local pos, path, solved = pathfinder.get(pos1, pos2, maxpts) 12 | local npath = {} 13 | 14 | if not path then return end 15 | 16 | while pos do 17 | table.insert(npath, pos) 18 | pos = path[pos] 19 | end 20 | 21 | return npath, solved 22 | end 23 | -------------------------------------------------------------------------------- /mods/sfinv/README.txt: -------------------------------------------------------------------------------- 1 | Minetest Game mod: sfinv 2 | ======================== 3 | See license.txt for license information. 4 | 5 | Simple Fast Inventory. 6 | A cleaner, simpler, solution to having an advanced inventory in Minetest. 7 | See game_api.txt for this mod's API. 8 | Available for use outside of MTG here: 9 | https://forum.minetest.net/viewtopic.php?t=19765 10 | 11 | Authors of source code 12 | ---------------------- 13 | rubenwardy (MIT) 14 | 15 | Authors of media 16 | ---------------- 17 | paramat (CC BY-SA 3.0): 18 | sfinv_crafting_arrow.png - derived from a texture by BlockMen (CC BY-SA 3.0) 19 | -------------------------------------------------------------------------------- /mods/creative/README.txt: -------------------------------------------------------------------------------- 1 | Minetest Game mod: creative 2 | =========================== 3 | See license.txt for license information. 4 | 5 | Authors of source code 6 | ---------------------- 7 | Originally by Perttu Ahola (celeron55) (MIT) 8 | Jean-Patrick G. (kilbith) (MIT) 9 | 10 | Author of media (textures) 11 | -------------------------- 12 | paramat (CC BY-SA 3.0): 13 | * creative_prev_icon.png 14 | * creative_next_icon.png 15 | * creative_search_icon.png 16 | * creative_clear_icon.png 17 | * creative_trash_icon.png derived from a texture by kilbith (CC BY-SA 3.0) 18 | -------------------------------------------------------------------------------- /.luacheckrc: -------------------------------------------------------------------------------- 1 | unused_args = false 2 | max_line_length = false 3 | 4 | globals = { 5 | "vkore", "player_stats", "hb", "players", "gold", 6 | "party", "nodes", "mapgen", "spawners", "pathfinder", 7 | "mobkit", "mobkit_custom", "swords", "vk_quests", "vk_quest", 8 | "rhotator", "matrix", "dungeons" 9 | } 10 | 11 | read_globals = { 12 | "minetest", "sfinv", 13 | string = {fields = {"split"}}, 14 | table = {fields = {"copy", "getn", "indexof",}}, 15 | math = {fields = {"round"}}, 16 | 17 | -- Builtin 18 | "vector", "ItemStack", 19 | "dump", "DIR_DELIM", "VoxelArea", "Settings", "creative" 20 | } 21 | 22 | exclude_files = { 23 | ".luacheckrc", 24 | "mods/enemies/pathfinder/astar_core.lua", 25 | "mods/hudbars/", 26 | "mods/mobkit/", 27 | "mods/sfinv/", 28 | "mods/screwdriver2/", 29 | "mods/creative/", 30 | "mods/luamatrix/" 31 | } 32 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Voxel Knights 2 | 3 | ![GitHub](https://img.shields.io/github/license/LoneWolfHT/voxel_knights) 4 | 5 | ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/LoneWolfHT/voxel_knights?label=Version) ![GitHub last commit](https://img.shields.io/github/last-commit/LoneWolfHT/voxel_knights?label=Last%20Commit) 6 | 7 | [![ContentDB](https://content.minetest.net/packages/Lone_Wolf/voxel_knights/shields/downloads/)](https://content.minetest.net/packages/Lone_Wolf/voxel_knights/) ![Discord](https://img.shields.io/discord/546050656868499457?label=Discord%20Server) 8 | 9 | A heavily WIP game based off of Skyrim and Spiral Knights 10 | 11 | Mod licenses are in the mod folders. Let me know if a mod is missing a license 12 | 13 | ## Changes to mods 14 | 15 | * sfinv: Removed duplicate license 16 | 17 | ## Thanks to 18 | 19 | * Kazzarch - Suggesting code improvements - Reporting bugs 20 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/init.lua: -------------------------------------------------------------------------------- 1 | players = { 2 | party = {}, 3 | } 4 | 5 | minetest.register_on_newplayer(function(player) 6 | player:get_inventory():add_item("main", "vk_swords:sword") 7 | end) 8 | 9 | -- 10 | --- Include the rest of the mod's lua files 11 | -- 12 | 13 | local dirs = { -- Lua files to include 14 | "experience.lua", 15 | "hp.lua", 16 | "inventory.lua", 17 | "hud_info.lua", 18 | "gold.lua", 19 | "regen.lua", 20 | "model.lua", 21 | } 22 | 23 | for _, filename in ipairs(dirs) do 24 | dofile(minetest.get_modpath(minetest.get_current_modname()).."/"..filename) 25 | end 26 | 27 | function players.set_int(player, key, newval) 28 | local meta = player:get_meta() 29 | 30 | if key == "gold" then 31 | players.set_gold(player, newval) 32 | elseif key == "xp" then 33 | players.add_xp(player, newval - player:get_meta():get_int("xp")) 34 | else 35 | meta:set_int(key, newval) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /mods/vk_nodes/stairs.lua: -------------------------------------------------------------------------------- 1 | function nodes.register_stair_and_slab(name, def) 2 | minetest.register_node(minetest.get_current_modname()..":stair_"..name, { 3 | description = def.description.." Stair", 4 | tiles = def.tiles, 5 | groups = def.groups, 6 | drawtype = "nodebox", 7 | paramtype = "light", 8 | paramtype2 = "facedir", 9 | node_box = { 10 | type = "fixed", 11 | fixed = { 12 | {-0.5, 0, 0, 0.5, 0.5, 0.5}, -- back 13 | {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, -- bottom 14 | } 15 | } 16 | }) 17 | 18 | minetest.register_node(minetest.get_current_modname()..":slab_"..name, { 19 | description = def.description.." Slab", 20 | tiles = def.tiles, 21 | groups = def.groups, 22 | drawtype = "nodebox", 23 | paramtype = "light", 24 | paramtype2 = "facedir", 25 | node_box = { 26 | type = "fixed", 27 | fixed = { 28 | {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, -- slab 29 | } 30 | } 31 | }) 32 | end 33 | -------------------------------------------------------------------------------- /mods/vk_mapgen/init.lua: -------------------------------------------------------------------------------- 1 | minetest.set_mapgen_setting("mapgen_limit", tostring(vkore.settings.world_size), true) 2 | minetest.set_mapgen_setting("mg_name", "flat", true) 3 | minetest.set_mapgen_setting("mg_flags", "nocaves, nodungeons, light, decorations, biomes", true) 4 | minetest.set_mapgen_setting("mgflat_spflags", "hills, lakes", true) 5 | minetest.set_mapgen_setting("mgflat_hill_threshhold", "0.75", true) 6 | minetest.set_mapgen_setting( 7 | "mgflat_np_terrain", 8 | "noise_params_2d 0, 1, (600, 600, 600), 7244, 5, 0.6, 2.5, eased", 9 | true 10 | ) 11 | 12 | mapgen = { 13 | structures = {}, 14 | registered_structures = {}, 15 | } 16 | 17 | -- 18 | --- Include the rest of the mod's lua files 19 | -- 20 | 21 | local dirs = { 22 | "biomes.lua", 23 | "structures.lua", 24 | "decorations.lua", 25 | } -- Lua files to include 26 | 27 | for _, filename in ipairs(dirs) do 28 | dofile(minetest.get_modpath(minetest.get_current_modname()).."/"..filename) 29 | end 30 | -------------------------------------------------------------------------------- /mods/vk_mapgen/decorations.lua: -------------------------------------------------------------------------------- 1 | --- Trees 2 | -- 3 | 4 | minetest.register_decoration({ 5 | deco_type = "schematic", 6 | place_on = "vk_nodes:grass", 7 | sidelen = 1, 8 | noise_params = { 9 | offset = -0.01, 10 | scale = 0.03, 11 | spread = {x = 200, y = 130, z = 200}, 12 | seed = 777, 13 | octaves = 13, 14 | }, 15 | biomes = {"green_biome"}, 16 | y_min = 7, 17 | y_max = 100, 18 | schematic = "schems/tree.mts", 19 | flags = "place_center_x, place_center_z", 20 | rotation = "random", 21 | }) 22 | 23 | -- 24 | --- Bushes 25 | -- 26 | 27 | minetest.register_decoration({ 28 | deco_type = "schematic", 29 | place_on = "vk_nodes:grass", 30 | fill_ratio = 0.001, 31 | noise_params = { 32 | offset = -0.009, 33 | scale = 0.03, 34 | spread = {x = 20, y = 10, z = 20}, 35 | seed = 96832, 36 | octaves = 13, 37 | }, 38 | biomes = {"green_biome"}, 39 | y_min = 6, 40 | y_max = 100, 41 | schematic = "schems/bush.mts", 42 | flags = "place_center_x, place_center_z", 43 | rotation = "random", 44 | }) 45 | -------------------------------------------------------------------------------- /mods/vk_nodes/structure_nodes.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | minetest.register_node(modname..":wood", { 4 | description = "Wood", 5 | tiles = {"nodes_wood.png"}, 6 | groups = {unbreakable = 1}, 7 | }) 8 | 9 | nodes.register_stair_and_slab("wood", { 10 | description = "Wood", 11 | tiles = {"nodes_wood.png"}, 12 | groups = {unbreakable = 1}, 13 | }) 14 | 15 | minetest.register_node(modname..":stone_brick", { 16 | description = "Stone Brick", 17 | tiles = {"nodes_stone_brick.png"}, 18 | groups = {unbreakable = 1}, 19 | }) 20 | 21 | nodes.register_stair_and_slab("stone_brick", { 22 | description = "Stone Brick", 23 | tiles = {"nodes_stone_brick.png"}, 24 | groups = {unbreakable = 1}, 25 | }) 26 | 27 | minetest.register_node(modname..":cobweb", { 28 | description = "Cobweb", 29 | drawtype = "firelike", 30 | tiles = {"nodes_cobweb.png"}, 31 | paramtype = "light", 32 | sunlight_propagates = true, 33 | visual_scale = 1.3, 34 | groups = {unbreakable = 1}, 35 | walkable = false, 36 | }) 37 | -------------------------------------------------------------------------------- /mods/vk_nodes/posts.lua: -------------------------------------------------------------------------------- 1 | function nodes.register_posts(name, texture) 2 | minetest.register_node(minetest.get_current_modname()..":post_"..name, { 3 | description = name:sub(1, 1):upper() .. name:sub(2) .. " Post", 4 | tiles = {texture}, 5 | drawtype = "nodebox", 6 | paramtype = "light", 7 | sunlight_propogates = true, 8 | node_box = { 9 | type = "fixed", 10 | fixed = { 11 | {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- post 12 | } 13 | }, 14 | groups = {unbreakable = 1} 15 | }) 16 | 17 | minetest.register_node(minetest.get_current_modname()..":post_cross_"..name, { 18 | description = name:sub(1, 1):upper() .. name:sub(2) .. " Cross Post", 19 | tiles = {texture}, 20 | drawtype = "nodebox", 21 | paramtype = "light", 22 | paramtype2 = "facedir", 23 | sunlight_propogates = true, 24 | node_box = { 25 | type = "fixed", 26 | fixed = { 27 | {-0.5, -0.125, -0.125, 0.5, 0.125, 0.125}, -- post_horizontal 28 | {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- post_vertical 29 | } 30 | }, 31 | groups = {unbreakable = 1} 32 | }) 33 | end 34 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/hp.lua: -------------------------------------------------------------------------------- 1 | minetest.register_on_joinplayer(function(player) 2 | local max_hp = player:get_meta():get_int("max_hp") 3 | 4 | if max_hp == 0 then max_hp = 35 end 5 | 6 | players.set_max_hp(player, max_hp) 7 | end) 8 | 9 | minetest.register_on_newplayer(function(player) 10 | minetest.after(0.1, function() 11 | if player then 12 | player:set_hp(players.get_max_hp(player)) 13 | end 14 | end) 15 | end) 16 | 17 | function players.get_max_hp(player) 18 | local meta = player:get_meta() 19 | 20 | return meta:get_int("max_hp") + (meta:get_int("strength") * 5) + (meta:get_int("level") * 10) 21 | end 22 | 23 | function players.set_max_hp(player, new_max) 24 | local meta = player:get_meta() 25 | meta:set_int("max_hp", new_max) 26 | 27 | players.update_max_hp(player) 28 | end 29 | 30 | function players.update_max_hp(player) 31 | local meta = player:get_meta() 32 | local max_hp = meta:get_int("max_hp") 33 | local new_max = players.get_max_hp(player) 34 | 35 | player:set_properties({hp_max = new_max}) 36 | hb.change_hudbar(player, "health", player:get_hp(), new_max) 37 | meta:set_int("max_hp", max_hp) 38 | end 39 | -------------------------------------------------------------------------------- /api.md: -------------------------------------------------------------------------------- 1 | # Voxel Knights API 2 | 3 | May be incomplete. Any help with documentation is appreciated 4 | 5 | ## vk_quests 6 | 7 | `vk_quests.register_quest(type, name, def)` 8 | 9 | * type - Type of quest. 10 | * kill - Quest to kill a certain amount of enemies 11 | * name - Used to identify the quest 12 | * def - quest def. See [Quest Types] for more info 13 | 14 | ### [Quest Types] 15 | 16 | #### kill 17 | 18 | * type - "kill" 19 | * name - Name of enemy to kill (e.g spider:spider) 20 | * def: 21 | * description - Description of quest (e.g Kill 10 spiders) 22 | * comments (string/list of strings) - Comments for the NPC to make about the quest 23 | * amount - Amount of enemies that you need to kill 24 | * rewards - Table of rewards to give on completion. 25 | * Works with all [Player Meta] stored as an int 26 | * Example: {xp = 3, gold = 10} to give 3 xp and 10 gold 27 | 28 | ## [Player Meta] 29 | 30 | List of all player meta used for things like gold/xp 31 | 32 | * `gold` (int) - Stores the player's gold 33 | * `xp` (int) - Stores the player's xp 34 | * `availiable_statpoints` (int) - Stores the player's avaliable statpoints 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/mobkit/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 TheTermos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/rhotator/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 entuland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_nodes/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_combat/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_mapgen/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_enemies/spawners/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_enemies/spider/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 LoneWolfHT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_enemies/pathfinder/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C)2019 Aaron Suen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mods/vk_nodes/doors.lua: -------------------------------------------------------------------------------- 1 | function nodes.register_door(name, desc, texture, on_rightclick, infotext) 2 | minetest.register_node(minetest.get_current_modname()..":door_"..name, { 3 | description = (name:sub(1, 1):upper() .. name:sub(2) .. " Door"):gsub("_", " "), 4 | tiles = {texture}, 5 | drawtype = "nodebox", 6 | paramtype = "light", 7 | paramtype2 = "facedir", 8 | node_box = { 9 | type = "fixed", 10 | fixed = { 11 | {-0.5, -0.5, -0.125, 0.5, 1.5, 0.125}, -- door 12 | {0, 0.5, -0.25, 0.375, 0.625, 0.25}, -- knob 13 | } 14 | }, 15 | groups = {unbreakable = 1, door = 1, overrides_pointable = 1}, 16 | on_rightclick = on_rightclick, 17 | on_construct = function(pos) 18 | local meta = minetest.get_meta(pos) 19 | 20 | meta:set_string("infotext", desc) 21 | end 22 | }) 23 | end 24 | 25 | nodes.register_door("wooden", "Wooden Door", "nodes_door_wooden.png") 26 | nodes.register_door("iron", "Iron Door", "nodes_iron.png") 27 | nodes.register_door("dungeon_iron_enter", "Enter Dungeon", "nodes_iron.png") 28 | nodes.register_door("dungeon_iron_continue", "Continue Dungeon", "nodes_iron.png") 29 | nodes.register_door("dungeon_iron_exit", "Exit Dungeon", "nodes_iron.png") 30 | -------------------------------------------------------------------------------- /mods/vk_players/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | All mods that don't give a license 4 | Copyright (c) 2019-2020 LoneWolfHT 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /mods/rhotator/models/rhotocube.obj: -------------------------------------------------------------------------------- 1 | v -0.500000 -0.500000 0.500000 2 | v -0.500000 -0.500000 -0.500000 3 | v 0.500000 -0.500000 -0.500000 4 | v 0.500000 -0.500000 0.500000 5 | v -0.500000 0.500000 0.500000 6 | v -0.499999 0.500000 -0.500000 7 | v 0.500000 0.500000 -0.500000 8 | v 0.500000 0.500000 0.500000 9 | vt 0.666667 -0.000000 10 | vt 0.666667 0.500000 11 | vt 0.333333 0.500000 12 | vt 0.333333 -0.000000 13 | vt 0.666667 1.000000 14 | vt 0.333333 1.000000 15 | vt 0.333333 0.500000 16 | vt 0.666667 0.500000 17 | vt 0.333333 0.500000 18 | vt 0.333333 1.000000 19 | vt -0.000000 1.000000 20 | vt 0.000000 0.500000 21 | vt 1.000000 0.000000 22 | vt 1.000000 0.500000 23 | vt 0.666667 0.500000 24 | vt 0.666667 -0.000000 25 | vt 0.333333 -0.000000 26 | vt 0.000000 0.500000 27 | vt -0.000000 -0.000000 28 | vt 0.666667 0.500000 29 | vt 1.000000 0.500000 30 | vt 1.000000 1.000000 31 | vn 0.0000 -1.0000 0.0000 32 | vn 0.0000 1.0000 0.0000 33 | vn -1.0000 0.0000 -0.0000 34 | vn 0.0000 -0.0000 -1.0000 35 | vn 1.0000 -0.0000 0.0000 36 | vn -0.0000 0.0000 1.0000 37 | s off 38 | f 1/1/1 2/2/1 3/3/1 4/4/1 39 | f 5/5/2 8/6/2 7/7/2 6/8/2 40 | f 1/9/3 5/10/3 6/11/3 2/12/3 41 | f 2/13/4 6/14/4 7/15/4 3/16/4 42 | f 3/17/5 7/7/5 8/18/5 4/19/5 43 | f 5/5/6 1/20/6 4/21/6 8/22/6 44 | -------------------------------------------------------------------------------- /mods/vk_nodes/init.lua: -------------------------------------------------------------------------------- 1 | nodes = { 2 | registered_on_loadnode = {} 3 | } 4 | 5 | local modname = minetest.get_current_modname() 6 | 7 | function nodes.register_on_nodeload(func) 8 | table.insert(nodes.registered_on_loadnode, func) 9 | end 10 | 11 | minetest.register_lbm({ -- Loads nodes placed by schematics that have meta 12 | label = "Load special nodes placed by schematics", 13 | name = modname..":loadspecialnodes", 14 | nodenames = {"group:loadme"}, 15 | run_at_every_load = true, 16 | action = function(pos, node) 17 | if minetest.get_meta(pos):get_int("loaded") ~= 0 then return end -- Already loaded 18 | 19 | minetest.registered_nodes[node.name].on_construct(pos) 20 | 21 | for _, func in ipairs(nodes.registered_on_loadnode) do 22 | if func(pos, node) then 23 | break 24 | end 25 | end 26 | end 27 | }) 28 | 29 | -- 30 | --- Include the rest of the mod's lua files 31 | -- 32 | 33 | local dirs = { -- Lua files to include 34 | "fire.lua", 35 | "lighting.lua", 36 | "posts.lua", 37 | "doors.lua", 38 | "stairs.lua", 39 | "map.lua", 40 | "structure_nodes.lua", 41 | "stations.lua", 42 | --"treasure_chests.lua" 43 | } 44 | 45 | for _, filename in ipairs(dirs) do 46 | dofile(minetest.get_modpath(modname).."/"..filename) 47 | end 48 | -------------------------------------------------------------------------------- /mods/vk_nodes/textures/license.txt: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal (CC0 1.0) Public Domain Dedication 2 | 3 | LoneWolfHT (https://github.com/LoneWolfHT/) 4 | 5 | No Copyright 6 | 7 | The person who associated a work with this deed has dedicated the work to the 8 | public domain by waiving all of his or her rights to the work worldwide under 9 | copyright law, including all related and neighboring rights, to the extent 10 | allowed by law. 11 | 12 | You can copy, modify, distribute and perform the work, even for commercial 13 | purposes, all without asking permission. See Other Information below. 14 | 15 | Other Information: 16 | 17 | In no way are the patent or trademark rights of any person affected by CC0, nor 18 | are the rights that other persons may have in the work or in how the work is 19 | used, such as publicity or privacy rights. 20 | 21 | Unless expressly stated otherwise, the person who associated a work with this 22 | deed makes no warranties about the work, and disclaims liability for all uses 23 | of the work, to the fullest extent permitted by applicable law. 24 | 25 | When using or citing the work, you should not imply endorsement by the author 26 | or the affirmer. 27 | 28 | For more details: 29 | https://creativecommons.org/publicdomain/zero/1.0/ 30 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/textures/license.txt: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal (CC0 1.0) Public Domain Dedication 2 | 3 | LoneWolfHT (https://github.com/LoneWolfHT/) 4 | 5 | No Copyright 6 | 7 | The person who associated a work with this deed has dedicated the work to the 8 | public domain by waiving all of his or her rights to the work worldwide under 9 | copyright law, including all related and neighboring rights, to the extent 10 | allowed by law. 11 | 12 | You can copy, modify, distribute and perform the work, even for commercial 13 | purposes, all without asking permission. See Other Information below. 14 | 15 | Other Information: 16 | 17 | In no way are the patent or trademark rights of any person affected by CC0, nor 18 | are the rights that other persons may have in the work or in how the work is 19 | used, such as publicity or privacy rights. 20 | 21 | Unless expressly stated otherwise, the person who associated a work with this 22 | deed makes no warranties about the work, and disclaims liability for all uses 23 | of the work, to the fullest extent permitted by applicable law. 24 | 25 | When using or citing the work, you should not imply endorsement by the author 26 | or the affirmer. 27 | 28 | For more details: 29 | https://creativecommons.org/publicdomain/zero/1.0/ 30 | -------------------------------------------------------------------------------- /mods/vk_mapgen/biomes.lua: -------------------------------------------------------------------------------- 1 | minetest.register_alias("mapgen_stone", "vk_nodes:stone") 2 | minetest.register_alias("mapgen_water_source", "vk_nodes:water_source") 3 | minetest.register_alias("mapgen_river_water_source", "vk_nodes:water_source") 4 | 5 | minetest.register_biome({ 6 | name = "green_biome", 7 | node_top = "vk_nodes:grass", 8 | depth_top = 1, 9 | node_filler = "vk_nodes:dirt", 10 | depth_filler = 5, 11 | node_riverbed = "vk_nodes:sand", 12 | depth_riverbed = 5, 13 | y_max = 50, 14 | y_min = 4, 15 | vertical_blend = 8, 16 | heat_point = 50, 17 | humidity_point = 35, 18 | }) 19 | 20 | minetest.register_biome({ 21 | name = "mountain_biome", 22 | node_top = "vk_nodes:snow", 23 | depth_top = 1, 24 | node_filler = "vk_nodes:stone", 25 | depth_filler = 5, 26 | node_riverbed = "vk_nodes:sand", 27 | depth_riverbed = 5, 28 | y_max = 1500, 29 | y_min = 50, 30 | vertical_blend = 8, 31 | heat_point = 50, 32 | humidity_point = 35, 33 | }) 34 | 35 | minetest.register_biome({ 36 | name = "ocean", 37 | node_top = "vk_nodes:sand", 38 | depth_top = 1, 39 | node_filler = "vk_nodes:sand", 40 | depth_filler = 5, 41 | node_riverbed = "vk_nodes:sand", 42 | depth_riverbed = 5, 43 | node_cave_liquid = "vk_nodes:water_source", 44 | y_max = 3, 45 | y_min = -255, 46 | heat_point = 50, 47 | humidity_point = 35, 48 | }) 49 | -------------------------------------------------------------------------------- /mods/vk_quests/sfinv_page.lua: -------------------------------------------------------------------------------- 1 | sfinv.register_page("vk_quests:quests", { 2 | title = "Quests", 3 | get = function(self, player, context) 4 | if not context then context = {} end 5 | -- Active quest count 6 | local aquest_count = #vk_quests.get_unfinished_quests(player) 7 | local formspec = ([[ 8 | real_coordinates[true] 9 | label[3.5,0.5;Current quests in progress: %d] 10 | button[4.2,0.8;2,0.6;refresh;Refresh] 11 | ]]):format( 12 | aquest_count 13 | ) 14 | 15 | if aquest_count > 0 then 16 | formspec = formspec .. "textlist[0,1.6;10.5,4.1;quests;" 17 | 18 | for qid, questprog in pairs(vk_quests.get_unfinished_quests(player)) do 19 | local quest = vk_quests.get_quest(qid) 20 | 21 | formspec = ("%s\\[%d/%d\\] %s - %s,"):format( 22 | formspec, 23 | questprog.kills or 0, 24 | quest.amount, 25 | minetest.formspec_escape(quest.description), 26 | minetest.formspec_escape(quest.rewards_description) 27 | ) 28 | end 29 | 30 | formspec = formspec:sub(1, -2) -- Remove trailing comma 31 | formspec = formspec .. ";0;true]" 32 | end 33 | 34 | return sfinv.make_formspec(player, context, formspec, true) 35 | end, 36 | on_player_receive_fields = function(self, player, context, fields) 37 | if fields.refresh then 38 | sfinv.set_page(player, "vk_quests:quests") 39 | end 40 | end 41 | }) 42 | -------------------------------------------------------------------------------- /mods/vk_nodes/lighting.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | minetest.register_node(modname..":torch_wall", { 4 | description = "Wall Torch", 5 | drawtype = "mesh", 6 | tiles = {{name = "nodes_torch.png", animation = { 7 | type = "vertical_frames", 8 | aspect_w = 32, 9 | aspect_h = 32, 10 | length = 2.0, 11 | }}}, 12 | selection_box = { 13 | type = "fixed", 14 | fixed = { 15 | {-0.15, -0.5, -0.5, 0.15, 0.11, 0.5}, 16 | }, 17 | }, 18 | collision_box = { 19 | type = "fixed", 20 | fixed = { 21 | {-0.15, -0.5, -0.5, 0.15, 0.11, 0.5}, 22 | }, 23 | }, 24 | mesh = "torch_wall.obj", 25 | paramtype = "light", 26 | paramtype2 = "wallmounted", 27 | sunlight_propogates = true, 28 | light_source = 11, 29 | groups = {unbreakable = 1}, 30 | }) 31 | 32 | minetest.register_node(modname..":torch", { 33 | description = "Floor Torch", 34 | drawtype = "mesh", 35 | tiles = {{name = "nodes_torch.png", animation = { 36 | type = "vertical_frames", 37 | aspect_w = 32, 38 | aspect_h = 32, 39 | length = 2.0, 40 | }}}, 41 | selection_box = { 42 | type = "fixed", 43 | fixed = { 44 | {-0.11, -0.5, -0.11, 0.11, 0.45, 0.11}, 45 | }, 46 | }, 47 | collision_box = { 48 | type = "fixed", 49 | fixed = { 50 | {-0.11, -0.5, -0.11, 0.11, 0.45, 0.11}, 51 | }, 52 | }, 53 | mesh = "torch.obj", 54 | paramtype = "light", 55 | sunlight_propogates = true, 56 | light_source = 11, 57 | groups = {unbreakable = 1}, 58 | }) 59 | -------------------------------------------------------------------------------- /mods/vkore/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C)2019-2020 LoneWolfHT [MIT] (Line 31) 2 | Portions Copyright (C)2018-2019 Aaron Suen [MIT] (Line 5) 3 | 4 | 5 | MIT License 6 | =========== 7 | 8 | ------------------------------------------------------------------------ 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject 15 | to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 21 | KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 22 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | ------------------------------------------------------------------------ 28 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/experience.lua: -------------------------------------------------------------------------------- 1 | hb.register_hudbar("xp", 0xffffff, "XP", {bar = "xp.png"}, 0, 10, false, nil, nil) 2 | 3 | local xp_huds = {} 4 | 5 | minetest.register_on_joinplayer(function(player) 6 | local meta = player:get_meta() 7 | 8 | if meta:get_int("level") <= 0 then 9 | meta:set_int("level", 1) 10 | end 11 | 12 | xp_huds[player:get_player_name()] = player:hud_add({ 13 | hud_elem_type = "text", 14 | position = {x = 0.5, y = 1.0}, 15 | scale = {x = 100, y = 100}, 16 | text = ("Level %d"):format(meta:get_int("level")), 17 | number = 0xffffff, 18 | alignment = {x = 0, y = 1}, 19 | offset = {x = 0, y = -136}, 20 | }) 21 | 22 | hb.init_hudbar(player, "xp", meta:get_int("xp"), meta:get_int("level") * 50) 23 | end) 24 | 25 | function players.add_xp(player, xp) 26 | local meta = player:get_meta() 27 | local new_xp = meta:get_int("xp") + xp 28 | 29 | if new_xp >= meta:get_int("level") * 50 then 30 | new_xp = 0 31 | meta:set_int("level", meta:get_int("level")+1) 32 | 33 | player:hud_change(xp_huds[player:get_player_name()], "text", ("Level %d"):format(meta:get_int("level"))) 34 | meta:set_int("available_statpoints", meta:get_int("available_statpoints") + player_stats.statpoints_per_level) 35 | players.hud_info_add(player, "Level up!") 36 | else 37 | players.hud_info_add(player, ("+%d XP"):format(xp)) 38 | end 39 | 40 | meta:set_int("xp", new_xp) 41 | hb.change_hudbar(player, "xp", new_xp, meta:get_int("level") * 50) 42 | end 43 | -------------------------------------------------------------------------------- /mods/vk_nodes/stations.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | minetest.register_node(modname..":anvil", { 4 | description = "Anvil - Used for enhancing tools/armor", 5 | tiles = {"nodes_iron.png"}, 6 | drawtype = "nodebox", 7 | paramtype = "light", 8 | groups = {unbreakable = 1, loadme = 1, overrides_pointable = 1}, 9 | on_construct = function(pos) 10 | local meta = minetest.get_meta(pos) 11 | 12 | meta:set_string("infotext", "Anvil - Used for enhancing tools/armor\nRightclick with tool to start") 13 | 14 | meta:set_int("loaded", 1) 15 | end, 16 | node_box = { 17 | type = "fixed", 18 | fixed = { 19 | {-0.3125, -0.5, -0.5, 0.3125, -0.375, 0.5}, -- base 20 | {-0.1875, -0.375, -0.1875, 0.1875, 0, 0.1875}, -- body 21 | {-0.25, -0.0625, -0.4375, 0.25, 0.25, 0.625}, -- head1 22 | {-0.1875, -0.0625, -0.625, 0.1875, 0.1875, 0.0625003}, -- head2 23 | } 24 | }, 25 | paramtype2 = "facedir", 26 | }) 27 | 28 | minetest.register_node(modname..":forge", { 29 | description = "Forge - Used for reforging tools/armor", 30 | tiles = {"nodes_iron.png"}, 31 | drawtype = "nodebox", 32 | paramtype = "light", 33 | groups = {unbreakable = 1, loadme = 1, overrides_pointable = 1}, 34 | on_construct = function(pos) 35 | local meta = minetest.get_meta(pos) 36 | 37 | meta:set_string("infotext", "Forge - Used for reforging tools/armor\nRightclick with tool to start") 38 | 39 | meta:set_int("loaded", 1) 40 | end, 41 | node_box = { 42 | type = "fixed", 43 | fixed = { 44 | {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- base 45 | } 46 | }, 47 | paramtype2 = "facedir", 48 | }) 49 | -------------------------------------------------------------------------------- /mods/luamatrix/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LuaMatrix License 2 | ----------- 3 | 4 | LuaMatrix ( http://luamatrix.luaforge.net/ ) is licensed under the 5 | same terms as Lua (MIT license) reproduced below. This means that 6 | LuaMatrix is free software and can be used for both academic and 7 | commercial purposes at absolutely no cost. 8 | 9 | For details and rationale, see http://www.lua.org/license.html . 10 | 11 | =============================================================================== 12 | 13 | Copyright (C) 2007-2010 Michael Lutz. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | 33 | =============================================================================== 34 | 35 | (end of COPYRIGHT) 36 | -------------------------------------------------------------------------------- /mods/rhotator/custom.recipes.lua: -------------------------------------------------------------------------------- 1 | -- only alter this file if it's named "custom.recipes.lua" 2 | -- alter the recipes as you please and delete / comment out 3 | -- the recipes you don't want to be available in the game 4 | -- the original versions are in "default/recipes.lua" 5 | 6 | return { 7 | { 8 | output = "rhotator:screwdriver", 9 | recipe = { 10 | {"default:copper_ingot"}, 11 | {"group:stick"}, 12 | }, 13 | }, 14 | { 15 | output = "rhotator:screwdriver_alt", 16 | recipe = { 17 | {"default:copper_ingot", "group:stick"}, 18 | {"group:stick", ""}, 19 | }, 20 | }, 21 | { 22 | output = "rhotator:screwdriver_multi", 23 | recipe = { 24 | {"", "group:stick", ""}, 25 | {"group:stick", "default:copper_ingot", "group:stick"}, 26 | {"", "group:stick", ""}, 27 | }, 28 | }, 29 | { 30 | output = "rhotator:memory", 31 | recipe = { 32 | {"group:stick"}, 33 | {"default:copper_ingot"}, 34 | {"group:stick"}, 35 | }, 36 | }, 37 | { 38 | output = "rhotator:cube", 39 | recipe = { 40 | {"group:wool"}, 41 | {"rhotator:screwdriver"}, 42 | }, 43 | }, 44 | { 45 | output = "rhotator:cube", 46 | recipe = { 47 | {"group:wool"}, 48 | {"rhotator:screwdriver_alt"}, 49 | }, 50 | }, 51 | { 52 | output = "rhotator:cube", 53 | recipe = { 54 | {"group:wool"}, 55 | {"rhotator:memory"}, 56 | }, 57 | }, 58 | { 59 | output = "rhotator:cube", 60 | recipe = { 61 | {"group:wool"}, 62 | {"rhotator:screwdriver_multi"}, 63 | }, 64 | }, 65 | } 66 | -------------------------------------------------------------------------------- /mods/rhotator/default/recipes.lua: -------------------------------------------------------------------------------- 1 | -- only alter this file if it's named "custom.recipes.lua" 2 | -- alter the recipes as you please and delete / comment out 3 | -- the recipes you don't want to be available in the game 4 | -- the original versions are in "default/recipes.lua" 5 | 6 | return { 7 | { 8 | output = "rhotator:screwdriver", 9 | recipe = { 10 | {"default:copper_ingot"}, 11 | {"group:stick"}, 12 | }, 13 | }, 14 | { 15 | output = "rhotator:screwdriver_alt", 16 | recipe = { 17 | {"default:copper_ingot", "group:stick"}, 18 | {"group:stick", ""}, 19 | }, 20 | }, 21 | { 22 | output = "rhotator:screwdriver_multi", 23 | recipe = { 24 | {"", "group:stick", ""}, 25 | {"group:stick", "default:copper_ingot", "group:stick"}, 26 | {"", "group:stick", ""}, 27 | }, 28 | }, 29 | { 30 | output = "rhotator:memory", 31 | recipe = { 32 | {"group:stick"}, 33 | {"default:copper_ingot"}, 34 | {"group:stick"}, 35 | }, 36 | }, 37 | { 38 | output = "rhotator:cube", 39 | recipe = { 40 | {"group:wool"}, 41 | {"rhotator:screwdriver"}, 42 | }, 43 | }, 44 | { 45 | output = "rhotator:cube", 46 | recipe = { 47 | {"group:wool"}, 48 | {"rhotator:screwdriver_alt"}, 49 | }, 50 | }, 51 | { 52 | output = "rhotator:cube", 53 | recipe = { 54 | {"group:wool"}, 55 | {"rhotator:memory"}, 56 | }, 57 | }, 58 | { 59 | output = "rhotator:cube", 60 | recipe = { 61 | {"group:wool"}, 62 | {"rhotator:screwdriver_multi"}, 63 | }, 64 | }, 65 | } 66 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/client/init.lua: -------------------------------------------------------------------------------- 1 | minetest.mod_channel_join("hud_info") 2 | 3 | local hud = {} 4 | local hudlist = { 5 | ["messages"] = {}, 6 | ["ids"] = {} 7 | } 8 | local MSGS = "messages" 9 | local IDS = "ids" 10 | 11 | local player 12 | local function checkforplayerfunc() 13 | if not minetest.localplayer then 14 | minetest.after(1, checkforplayerfunc) 15 | else 16 | player = minetest.localplayer 17 | end 18 | end 19 | 20 | checkforplayerfunc() 21 | 22 | minetest.register_on_modchannel_message(function(channel_name, sender, message) 23 | if not player or sender ~= "" then return end 24 | 25 | local result = string.split(message, "!", nil, 1) 26 | 27 | if result[1] == player:get_name() then 28 | hud.new(result[2]) 29 | end 30 | end) 31 | 32 | local timer = 0 33 | 34 | function hud.new(message) 35 | if not player then return end 36 | 37 | timer = 0 38 | table.insert(hudlist[MSGS], 1, message) 39 | 40 | if #hudlist[MSGS] > 7 then 41 | table.remove(hudlist[MSGS]) 42 | end 43 | 44 | hud.refresh() 45 | end 46 | 47 | minetest.register_globalstep(function(dtime) 48 | timer = timer + dtime 49 | 50 | if timer >= 1.7 then 51 | timer = 0 52 | 53 | hud.new(" "); 54 | end 55 | end) 56 | 57 | function hud.refresh() 58 | hud.clear() 59 | 60 | for k, message in ipairs(hudlist[MSGS]) do 61 | table.insert(hudlist[IDS], player:hud_add({ 62 | hud_elem_type = "text", 63 | position = {x=0.5, y=0.5}, 64 | name = "hud_"..k, 65 | scale = {x=100, y=100}, 66 | text = message, 67 | number = tonumber("0x"..minetest.rgba(0, 255 - ((k-1)*20), 255 - ((k-1)*20), 255):sub(2, -3)), 68 | alignment = {x=0, y=0}, 69 | offset = {x=0, y=20 * k}, 70 | z_index = 0, 71 | })) 72 | end 73 | end 74 | 75 | function hud.clear() 76 | for _, id in pairs(hudlist[IDS]) do 77 | player:hud_remove(id) 78 | end 79 | 80 | hudlist[IDS] = {} 81 | end 82 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player_stats/stat_tab.lua: -------------------------------------------------------------------------------- 1 | sfinv.register_page(minetest.get_current_modname()..":stats", { 2 | title = "Stats", 3 | get = function(self, player, context) 4 | local ypos = 1 5 | local meta = player:get_meta() 6 | 7 | local formspec = ([[ 8 | real_coordinates[true] 9 | label[0.2,0.5;Available statpoints: %d] 10 | ]]):format( 11 | meta:get_int("available_statpoints") 12 | ) 13 | 14 | for stat, desc in pairs(player_stats.stats) do 15 | formspec = formspec .. 16 | ([[ 17 | style[stat_%s;bgcolor=grey] 18 | button[0.2,%f;1.7,0.5;stat_%s;%s] 19 | tooltip[stat_%s;%s] 20 | 21 | label[2,%f;%s] 22 | ]]):format( 23 | --stat name style 24 | stat, 25 | --stat name button 26 | ypos-0.25, 27 | stat, 28 | stat:gsub("^.", string.upper), 29 | --stat name tooltip 30 | stat, 31 | desc, 32 | --stat count 33 | ypos, 34 | meta:get_int(stat) 35 | ) 36 | 37 | ypos = ypos + 0.6 38 | end 39 | 40 | return sfinv.make_formspec(player, context, formspec, true) 41 | end, 42 | on_player_receive_fields = function(self, player, context, fields) 43 | for name in pairs(fields) do 44 | if name:find("stat_") then 45 | local stat = name:sub(name:find("_")+1) 46 | local meta = player:get_meta() 47 | local statcount = meta:get_int(stat) 48 | local available_statpoints = meta:get_int("available_statpoints") 49 | 50 | if available_statpoints > 0 and statcount < player_stats.stat_limit then 51 | meta:set_int("available_statpoints", available_statpoints - 1) 52 | meta:set_int(stat, statcount + 1) 53 | 54 | if stat == "strength" then 55 | players.update_max_hp(player) 56 | elseif stat == "dexterity" then 57 | player_stats.update_movement_speed(player) 58 | end 59 | end 60 | 61 | sfinv.set_page(player, context.page) 62 | 63 | break 64 | end 65 | end 66 | end 67 | }) 68 | -------------------------------------------------------------------------------- /mods/vkore/init.lua: -------------------------------------------------------------------------------- 1 | vkore = { 2 | settings = { 3 | game_mode = minetest.settings:get("vkore_game_mode") or "play", -- dev, play 4 | world_size = 3200, 5 | }, 6 | dev_priv = "voxel_knights_dev" 7 | } 8 | 9 | local dirs = { 10 | vector.new(1, 0, 0), 11 | vector.new(0, 1, 0), 12 | vector.new(0, 0, 1), 13 | vector.new(-1, 0, 0), 14 | vector.new(0, -1, 0), 15 | vector.new(0, 0, -1), 16 | } 17 | 18 | function vkore.scan_flood(pos, range, func) 19 | local q = {pos} 20 | local seen = { } 21 | for d = 0, range do 22 | local nxt = {} 23 | for _, p in ipairs(q) do 24 | local res = func(p, d) -- false = stopdir, true = stop, nil = continue 25 | if res then return res end 26 | if res == nil then 27 | for _, v in pairs(dirs) do 28 | local np = { 29 | x = p.x + v.x, 30 | y = p.y + v.y, 31 | z = p.z + v.z 32 | } 33 | local nk = minetest.hash_node_position(np) 34 | if not seen[nk] then 35 | seen[nk] = true 36 | np.dir = v 37 | table.insert(nxt, np) 38 | end 39 | end 40 | end 41 | end 42 | if #nxt < 1 then break end 43 | for i = 1, #nxt do 44 | local j = math.random(1, #nxt) 45 | nxt[i], nxt[j] = nxt[j], nxt[i] 46 | end 47 | q = nxt 48 | end 49 | end 50 | 51 | minetest.register_privilege("voxel_knights_dev", { 52 | description = "Allows usage of dev commands", 53 | give_to_singleplayer = false, 54 | give_to_admin = true, 55 | }) 56 | 57 | -- add 'all' group to all registered nodes for use with group-based builtin functions like find_nodes_in_area() 58 | minetest.register_on_mods_loaded(function() 59 | for name, def in pairs(minetest.registered_nodes) do 60 | if not def.groups then def.groups = {} end 61 | def.groups.all = 1 62 | 63 | minetest.override_item(name, {groups = def.groups}) 64 | end 65 | 66 | -- Backwards compat 67 | for name in pairs(minetest.registered_items) do 68 | if name:find("vk_") then 69 | minetest.register_alias(name:sub(4), name) 70 | end 71 | end 72 | end) 73 | 74 | dofile(minetest.get_modpath("vkore").."/helpers.lua") 75 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/gold.lua: -------------------------------------------------------------------------------- 1 | gold = { 2 | huds = {}, 3 | infohuds = {}, 4 | } 5 | 6 | minetest.register_on_joinplayer(function(player) 7 | local meta = player:get_meta() 8 | 9 | player:hud_add({ 10 | hud_elem_type = "image", 11 | position = {x=0, y=1}, 12 | name = "gold_icon", 13 | scale = {x=3, y=3}, 14 | text = "player_gold.png", 15 | alignment = {x=1, y=-1}, 16 | offset = {x=0, y=0}, 17 | z_index = 0, 18 | }) 19 | 20 | players.set_gold(player, meta:get_int("gold")) 21 | end) 22 | 23 | minetest.register_on_leaveplayer(function(player) 24 | gold.huds[player:get_player_name()] = nil 25 | end) 26 | 27 | function players.set_gold(player, newgold) 28 | local name 29 | local meta = player:get_meta() 30 | 31 | if type(player) == "string" then -- name was passed instead of player obj 32 | name = player 33 | player = minetest.get_player_by_name(player) 34 | else 35 | name = player:get_player_name() 36 | end 37 | 38 | if gold.huds[name] then 39 | player:hud_remove(gold.huds[name]) 40 | end 41 | 42 | gold.huds[name] = player:hud_add({ 43 | hud_elem_type = "text", 44 | position = {x=0, y=1}, 45 | name = "gold_text", 46 | scale = {x=100, y=100}, 47 | text = ": "..newgold, 48 | number = 0xffd200, 49 | alignment = {x=1, y=0}, 50 | offset = {x=48, y=-24}, 51 | z_index = 0, 52 | }) 53 | 54 | players.hud_info_add(player, "+"..newgold - meta:get_int("gold").." gold") 55 | meta:set_int("gold", newgold) 56 | end 57 | 58 | function players.get_gold(player) 59 | if type(player) == "string" then -- name was passed instead of player obj 60 | return minetest.get_player_by_name(player):get_meta():get_int("gold") 61 | else 62 | return player:get_meta():get_int("gold") 63 | end 64 | end 65 | 66 | function gold.infohuds.add(player, number) 67 | table.insert(gold.infohuds[player:get_player_name()], player:hud_add({ 68 | hud_elem_type = "text", 69 | position = {x=0, y=1}, 70 | name = "gold_info", 71 | scale = {x=100, y=100}, 72 | text = ": "..gold, 73 | number = 0xffd200, 74 | alignment = {x=1, y=0}, 75 | offset = {x=48, y=-24}, 76 | z_index = 0, 77 | })) 78 | end 79 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player_stats/init.lua: -------------------------------------------------------------------------------- 1 | player_stats = { 2 | stat_limit = 100, 3 | stats = { 4 | ["strength" ] = "Boosts melee dmg and hp", 5 | ["dexterity"] = "Boosts attack and movement speed", 6 | ["power" ] = "Boosts mana and stamina", 7 | ["focus" ] = "Boosts ranged dmg and magic dmg", 8 | ["regen" ] = "Boosts hp/mana/stamina regen" 9 | }, 10 | statpoints_per_level = 2, 11 | } 12 | 13 | minetest.register_on_joinplayer(function(player) 14 | local meta = player:get_meta() 15 | 16 | for stat in pairs(player_stats.stats) do 17 | if meta:get_int(stat) == 0 then 18 | meta:set_int(stat, 3) 19 | end 20 | end 21 | 22 | player_stats.update_movement_speed(player) 23 | end) 24 | 25 | function player_stats.update_movement_speed(player) 26 | player:set_physics_override({speed = 1 + (player:get_meta():get_int("dexterity")/60)}) 27 | end 28 | 29 | minetest.register_chatcommand("set_stat", { 30 | params = "( | all) ", 31 | description = "Set the value of one of your stats", 32 | privs = {[vkore.dev_priv] = true}, 33 | func = function(name, params) 34 | params = string.split(params, " ") 35 | if not params or #params ~= 2 then return false, "Invalid params" end 36 | 37 | local player = minetest.get_player_by_name(name) 38 | 39 | if not player then return false, "You don't exist, you're lucky you're even getting this error message" end 40 | 41 | params[2] = tonumber(params[2]) 42 | 43 | if not player_stats.stats[params[1]] then return false, "Invalid stat" end 44 | if not params[2] or params[2] < 0 then return false, "Invalid value" end 45 | 46 | if params[2] > player_stats.stat_limit then params[2] = player_stats.stat_limit end 47 | 48 | player:get_meta():set_int(params[1], params[2]) 49 | 50 | if params[1] == "strength" then 51 | players.update_max_hp(player) 52 | elseif params[1] == "dexterity" then 53 | player_stats.update_movement_speed(player) 54 | end 55 | 56 | return true, ("Set stat %s to %s"):format(dump(params[1]), dump(params[2])); 57 | end, 58 | }) 59 | 60 | dofile(minetest.get_modpath(minetest.get_current_modname()).."/stat_tab.lua") 61 | -------------------------------------------------------------------------------- /mods/vk_combat/vk_swords/api.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | swords.register_sword("swords:sword", { 3 | description = "A basic sword", 4 | texture = "swords_sword.png", 5 | damage = {fleshy = 3}, 6 | base_speed = 1.5, 7 | glow = 1 8 | }) 9 | ]]-- 10 | 11 | function swords.register_sword(name, def) 12 | minetest.register_tool(name, { 13 | description = def.description, 14 | inventory_image = def.texture, 15 | groups = {sword = 1}, 16 | wield_scale = def.wield_scale or vector.new(2, 2.5, 1.5), 17 | glow = def.glow or 0, 18 | tool_capabilities = { 19 | full_punch_interval = def.speed, 20 | damage_groups = def.damage, 21 | punch_attack_uses = 0, 22 | }, 23 | on_hit = function(pos, damage, dir) 24 | local r = math.min(255, math.ceil((255/(damage.max-damage.min)) * (damage.dmg-damage.min))+125) 25 | local g = r 26 | local b = r 27 | 28 | if damage.dmg == damage.max then 29 | r = 255 30 | g = 25 31 | b = 25 32 | elseif damage.dmg >= damage.max*9/10 then 33 | r = 255 34 | g = 255 35 | b = 25 36 | end 37 | 38 | minetest.add_particlespawner({ 39 | amount = damage.dmg == damage.max and 5 or 1, 40 | time = 0.1, 41 | minpos = vector.add(pos, vector.new(0, 0.7, 0)), 42 | maxpos = vector.add(pos, vector.new(0, 0.7, 0)), 43 | minvel = {x=-2, y=-1, z=-2}, 44 | maxvel = {x=2, y=3, z=2}, 45 | minacc = {x=0, y=-9.8, z=0}, 46 | maxacc = {x=0, y=-9.8, z=0}, 47 | minexptime = 0.2, 48 | maxexptime = 0.6, 49 | minsize = 2, 50 | maxsize = 3, 51 | collisiondetection = true, 52 | texture = "smoke_puff.png", 53 | glow = 3 54 | }) 55 | 56 | minetest.add_particle({ 57 | pos = vector.subtract(pos, vector.multiply(dir, 1.5)), 58 | velocity = {x=0, y=0, z=0}, 59 | expirationtime = 0.1, 60 | size = (g == 255 and 10) or (r == 255 and 13) or 7, 61 | collisiondetection = false, 62 | collision_removal = false, 63 | object_collision = false, 64 | texture = ("(slash.%d.png^[colorize:#%X%X%X:255)%s"):format(math.random(1, 2), r, g, b, math.random(0, 1)==1 and "^[transformFX" or ""), 65 | glow = 5, 66 | }) 67 | end, 68 | }) 69 | end 70 | -------------------------------------------------------------------------------- /mods/hudbars/README.md: -------------------------------------------------------------------------------- 1 | # HUD bars 2 | 3 | ## Description 4 | This mod changes the HUD of Minetest. It replaces the default health and breath 5 | symbols by horizontal colored bars with text showing the number. 6 | 7 | Furthermore, it enables other mods to add their own custom bars to the HUD, 8 | this mod will place them accordingly. 9 | 10 | **Important**: Keep in mind if running a server with this mod, that the custom 11 | position should be displayed correctly on every screen size. 12 | 13 | ## Current version 14 | The current version is 2.2.2. 15 | 16 | This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer 17 | standard. 18 | 19 | ## Settings 20 | This mod can be configured quite a bit. You can change HUD bar appearance, offsets, ordering, and more. 21 | Use the advanced settings menu in Minetest for detailed configuration. 22 | 23 | ## API 24 | The API is used to add your own custom HUD bars. 25 | Documentation for the API of this mod can be found in `API.md`. 26 | 27 | ## Legal 28 | ### License of source code 29 | Author: Wuzzy (2015) 30 | 31 | Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen. 32 | 33 | Translations: 34 | 35 | * German: Wuzzy 36 | * Portuguese: BrunoMine 37 | * Turkish: admicos 38 | * Dutch: kingoscargames 39 | * Italian: Hamlet 40 | * Malay: muhdnurhidayat 41 | * Russian: Imk 42 | * Spanish: wuniversales 43 | 44 | This program is free software. It comes without any warranty, to 45 | the extent permitted by applicable law. You can redistribute it 46 | and/or modify it under the terms of the MIT License. 47 | 48 | ### Licenses of textures 49 | 50 | * `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen 51 | * `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen 52 | * `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy 53 | * `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License) 54 | * `hudbars_bar_health.png`—Wuzzy (MIT License) 55 | * `hudbars_bar_breath.png`—Wuzzy (MIT License) 56 | * `hudbars_bar_background.png`—Wuzzy (MIT License) 57 | 58 | ### License references 59 | 60 | * [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) 61 | * [MIT License](https://opensource.org/licenses/MIT) 62 | -------------------------------------------------------------------------------- /mods/rhotator/notify.lua: -------------------------------------------------------------------------------- 1 | local mod_name = minetest.get_current_modname() 2 | local huds = {} 3 | local hud_timeout_seconds = 3 4 | 5 | -- defaults 6 | local position = { x = 0.1, y = 0.9} 7 | local alignment = { x = 1, y = -1} 8 | local normal_color = 0xFFFFFF 9 | local warning_color = 0xFFFF00 10 | local error_color = 0xDD0000 11 | local direction = 0 12 | 13 | local notify = {} 14 | notify.__index = notify 15 | setmetatable(notify, notify) 16 | 17 | local function hud_remove(player, playername) 18 | local hud = huds[playername] 19 | if not hud then return end 20 | if os.time() < hud_timeout_seconds + hud.time then 21 | return 22 | end 23 | player:hud_remove(hud.id) 24 | huds[playername] = nil 25 | end 26 | 27 | local function hud_create(player, message, params) 28 | local playername = player:get_player_name() 29 | local def = type(params) == "table" and params or {} 30 | def.position = def.position or position 31 | def.alignment = def.alignment or alignment 32 | def.number = def.number or def.color or normal_color 33 | def.color = nil 34 | def.position = def.position or position 35 | def.direction = def.direction or direction 36 | def.text = message or def.text 37 | def.hud_elem_type = def.hud_elem_type or "text" 38 | def.name = mod_name .. "_feedback" 39 | local id = player:hud_add(def) 40 | huds[playername] = { 41 | id = id, 42 | time = os.time(), 43 | } 44 | end 45 | 46 | notify.warn = function(player, message) 47 | notify(player, message, {color = warning_color }) 48 | end 49 | 50 | notify.warning = notify.warn 51 | 52 | notify.err = function(player, message) 53 | notify(player, message, {color = error_color }) 54 | end 55 | 56 | notify.error = notify.err 57 | 58 | notify.__call = function(self, player, message, params) 59 | local playername 60 | if type(player) == "string" then 61 | playername = player 62 | player = minetest.get_player_by_name(playername) 63 | elseif player and player.get_player_name then 64 | playername = player:get_player_name() 65 | else 66 | return 67 | end 68 | message = "[" .. mod_name .. "] " .. message 69 | local hud = huds[playername] 70 | if hud then 71 | player:hud_remove(hud.id) 72 | end 73 | hud_create(player, message, params) 74 | minetest.after(hud_timeout_seconds, function() 75 | hud_remove(player, playername) 76 | end) 77 | end 78 | 79 | return notify 80 | -------------------------------------------------------------------------------- /mods/vk_players/vk_party/init.lua: -------------------------------------------------------------------------------- 1 | party = { 2 | party_zones = {}, 3 | dungeon = "none" 4 | } 5 | 6 | local modname = minetest.get_current_modname() 7 | local add_glow_particlespawner 8 | 9 | -- 10 | --- To use these just minetest.add_node(pos, {name = "party:party_zone"}) and set the meta string 'destination' 11 | --- to the name of the 'dungeon' they're entering 12 | -- 13 | 14 | minetest.register_node(modname..":party_zone", { 15 | description = "Party Zone. Will teleport players into door if all are standing in it", 16 | tiles = {"party_glow.png"}, 17 | drawtype = "nodebox", 18 | paramtype = "light", 19 | light_source = 8, 20 | sunlight_propogates = true, 21 | walkable = false, 22 | pointable = false, 23 | node_box = { 24 | type = "fixed", 25 | fixed = { 26 | {-1.5, -0.5, -1.5, 1.5, -0.4375, 1.5}, 27 | } 28 | }, 29 | on_construct = function(pos) 30 | add_glow_particlespawner(pos) 31 | 32 | minetest.after(7, function() 33 | local meta = minetest.get_meta(pos) 34 | local destination = meta:get_string("destination") 35 | 36 | minetest.delete_particlespawner(party.party_zones[pos]) 37 | minetest.remove_node(pos) 38 | 39 | if destination ~= "" then 40 | dungeons.start_dungeon(pos, destination) 41 | else 42 | minetest.log("error", "Party zone has no destination. Aborting...") 43 | end 44 | end) 45 | end 46 | }) 47 | 48 | add_glow_particlespawner = function(pos) 49 | local pos1 = vector.new(pos.x - 1.5, pos.y, pos.z - 1.5) 50 | local pos2 = vector.new(pos.x + 1.5, pos.y, pos.z + 1.5) 51 | 52 | local spawner = minetest.add_particlespawner({ 53 | amount = 30, 54 | time = 0, 55 | minpos = pos1, 56 | maxpos = pos2, 57 | minvel = {x=0, y=20, z=0}, 58 | maxvel = {x=0, y=15, z=0}, 59 | minacc = {x=0, y=0, z=0}, 60 | maxacc = {x=0, y=0, z=0}, 61 | minexptime = 0.3, 62 | maxexptime = 0.5, 63 | minsize = 1, 64 | maxsize = 2, 65 | collisiondetection = false, 66 | collision_removal = false, 67 | object_collision = false, 68 | vertical = true, 69 | texture = "party_glow.png", 70 | glow = 10, 71 | }) 72 | 73 | if not party.party_zones then 74 | party.party_zones = {} 75 | end 76 | 77 | party.party_zones[pos] = spawner 78 | end 79 | 80 | minetest.register_lbm({ 81 | label = "Remove broken party zones", 82 | name = modname..":remove_broken_zones", 83 | nodenames = {modname..":party_zone"}, 84 | run_at_every_load = true, 85 | action = function(pos) 86 | minetest.remove_node(pos) 87 | end 88 | }) 89 | -------------------------------------------------------------------------------- /mods/vk_enemies/mobkit_custom/init.lua: -------------------------------------------------------------------------------- 1 | mobkit_custom = {} 2 | 3 | -- default attack, turns towards tgtobj and leaps 4 | -- returns when tgtobj out of range 5 | function mobkit.hq_attack(self,prty,tgtobj) 6 | mobkit.lq_turn2pos(self, tgtobj:get_pos()) 7 | 8 | if self.attack_ok then 9 | self.attack_ok = false 10 | 11 | tgtobj:punch( 12 | self.object, 13 | self.attack.interval, 14 | self.attack, 15 | vector.direction(self.object:get_pos(), tgtobj:get_pos()) 16 | ) 17 | 18 | minetest.after(self.attack.interval, function() self.attack_ok = true end) 19 | end 20 | end 21 | 22 | local old_mobkit_hq_die = mobkit.hq_die 23 | function mobkit.hq_die(self) 24 | if self.puncher then 25 | local puncher = minetest.get_player_by_name(self.puncher) 26 | 27 | if puncher then 28 | players.set_gold(puncher, players.get_gold(puncher) + math.random(self.gold or 0, self.gold_max or self.gold or 0)) 29 | players.add_xp(puncher, math.random(self.xp or 0, self.xp_max or self.xp or 0)) 30 | vk_quests.on_enemy_death(self.name, puncher) 31 | end 32 | end 33 | 34 | old_mobkit_hq_die(self) 35 | end 36 | 37 | function mobkit_custom.on_punch(self, puncher, lastpunch, toolcaps, dir) 38 | if puncher:is_player() then 39 | self.puncher = puncher:get_player_name() 40 | end 41 | 42 | if toolcaps.damage_groups then 43 | local damage = math.ceil(puncher:get_meta():get_int("strength")/2) 44 | local min_damage = damage 45 | local max_damage = damage 46 | local on_hit = minetest.registered_items[puncher:get_wielded_item():get_name()].on_hit 47 | 48 | 49 | for group, val in pairs(toolcaps.damage_groups) do 50 | local tflp_calc = lastpunch / toolcaps.full_punch_interval 51 | 52 | if tflp_calc < 0.0 then tflp_calc = 0.0 end 53 | if tflp_calc > 1.0 then tflp_calc = 1.0 end 54 | 55 | -- Increase max_damage if sword group matches mob group 56 | max_damage = max_damage + (val * ((self.object:get_armor_groups()[group] or 0) / 100.0)) 57 | 58 | damage = damage + (val * tflp_calc * ((self.object:get_armor_groups()[group] or 0) / 100.0)) 59 | end 60 | 61 | if on_hit then on_hit(self.object:get_pos(), {min=min_damage,dmg=damage, max=max_damage}, dir or puncher:get_look_dir()) end 62 | 63 | minetest.log("action", 64 | ("player '%s' deals %f damage to object '%s'"):format(self.puncher or "!", damage, dump(self.name)) 65 | ) 66 | 67 | self.hp = self.hp - damage 68 | 69 | if dir then 70 | dir.y = 0.6 71 | if lastpunch > 1 then lastpunch = 1 end 72 | 73 | self.object:add_velocity(vector.multiply(dir, lastpunch*4)) 74 | end 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /mods/vk_enemies/pathfinder/astar_mt.lua: -------------------------------------------------------------------------------- 1 | -- LUALOCALS < --------------------------------------------------------- 2 | local ipairs, minetest, pairs, vector 3 | = ipairs, minetest, pairs, vector 4 | -- LUALOCALS > --------------------------------------------------------- 5 | 6 | local astar = ... 7 | 8 | local alldirs = { 9 | {x = 1, y = 0, z = 0}, 10 | --{x = 1, y = 0, z = 1}, 11 | --{x = 1, y = 0, z = -1}, 12 | {x = 0, y = 0, z = 1}, 13 | {x = 0, y = 0, z = -1}, 14 | {x = -1, y = 0, z = 0}, 15 | --{x = -1, y = 0, z = 1}, 16 | --{x = -1, y = 0, z = -1} 17 | } 18 | 19 | local openspaces = {} 20 | minetest.after(0, function() 21 | for k, v in pairs(minetest.registered_nodes) do 22 | if v.walkable == false then 23 | openspaces[k] = true 24 | end 25 | end 26 | end) 27 | 28 | local function findpath(start, target, maxpts) 29 | maxpts = maxpts * 3 30 | local pos_intern 31 | do 32 | local cache = {} 33 | pos_intern = function(pos) 34 | local key = minetest.pos_to_string(pos) 35 | local got = cache[key] 36 | if got then return got end 37 | cache[key] = pos 38 | return pos 39 | end 40 | end 41 | 42 | local function walkable(pos) return not openspaces[minetest.get_node(pos).name] end 43 | local function addy(pos, y) return {x = pos.x, y = pos.y + y, z = pos.z} end 44 | local function check(pos) 45 | if walkable(pos) then 46 | local above = addy(pos, 1) 47 | if not walkable(above) and not walkable(addy(above, 1)) then 48 | return above 49 | end 50 | return 51 | end 52 | local below = addy(pos, -1) 53 | if walkable(below) then return pos end 54 | for _ = 1, 5 do 55 | pos = below 56 | below = addy(pos, -1) 57 | if walkable(below) then return pos end 58 | end 59 | end 60 | 61 | local checkmemo = {} 62 | local function memocheck(pos) 63 | pos = pos_intern(pos) 64 | local got = checkmemo[pos] 65 | if got then return got end 66 | got = check(pos) 67 | checkmemo[pos] = got 68 | return got 69 | end 70 | 71 | local function neigh(pos) 72 | local t = {} 73 | for _, v in ipairs(alldirs) do 74 | local p = memocheck(vector.add(pos, v)) 75 | if p then t[#t + 1] = p end 76 | end 77 | local i = 0 78 | return function() 79 | i = i + 1 80 | local v = t[i] 81 | return v 82 | end 83 | end 84 | 85 | local function heur(pos) return vector.distance(pos, target) end 86 | 87 | local function cost(a, b) 88 | local c = vector.distance(a, b) 89 | if b.y > a.y then c = c + 1 end 90 | return c 91 | end 92 | 93 | start = pos_intern(start) 94 | return start, astar(start, heur, maxpts, cost, neigh) 95 | end 96 | 97 | return findpath 98 | -------------------------------------------------------------------------------- /mods/hudbars/default_settings.lua: -------------------------------------------------------------------------------- 1 | -- (Hardcoded) default settings 2 | 3 | hb.settings.max_bar_length = 160 4 | hb.settings.statbar_length = 20 5 | 6 | -- Statbar positions 7 | hb.settings.pos_left = {} 8 | hb.settings.pos_right = {} 9 | hb.settings.start_offset_left = {} 10 | hb.settings.start_offset_right= {} 11 | hb.settings.pos_left.x = hb.load_setting("hudbars_pos_left_x", "number", 0.5) 12 | hb.settings.pos_left.y = hb.load_setting("hudbars_pos_left_y", "number", 1) 13 | hb.settings.pos_right.x = hb.load_setting("hudbars_pos_right_x", "number", 0.5) 14 | hb.settings.pos_right.y = hb.load_setting("hudbars_pos_right_y", "number", 1) 15 | hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "progress_bar", {"progress_bar", "statbar_classic", "statbar_modern"}) 16 | if hb.settings.bar_type == "progress_bar" then 17 | hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_offset_left_x", "number", -175) 18 | hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_offset_left_y", "number", -86) 19 | hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_offset_right_x", "number", 15) 20 | hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y", "number", -86) 21 | else 22 | hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -265) 23 | hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_statbar_offset_left_y", "number", -90) 24 | hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 25) 25 | hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90) 26 | end 27 | hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 24) 28 | hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1) 29 | 30 | -- Experimental setting: Changing this setting is not officially supported, do NOT rely on it! 31 | hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_default_hudbars", "bool", true) 32 | 33 | -- Misc. settings 34 | hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"}) 35 | hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", true) 36 | 37 | local sorting = minetest.settings:get("hudbars_sorting") 38 | if sorting ~= nil then 39 | hb.settings.sorting = {} 40 | hb.settings.sorting_reverse = {} 41 | for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do 42 | hb.settings.sorting[k] = tonumber(v) 43 | hb.settings.sorting_reverse[tonumber(v)] = k 44 | end 45 | else 46 | hb.settings.sorting = { ["health"] = 0, ["breath"] = 1 } 47 | hb.settings.sorting_reverse = { [0] = "health", [1] = "breath" } 48 | end 49 | -------------------------------------------------------------------------------- /mods/sfinv/license.txt: -------------------------------------------------------------------------------- 1 | License of source code 2 | ---------------------- 3 | 4 | The MIT License (MIT) 5 | Copyright (C) 2016-2018 rubenwardy 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 8 | software and associated documentation files (the "Software"), to deal in the Software 9 | without restriction, including without limitation the rights to use, copy, modify, merge, 10 | publish, distribute, sublicense, and/or sell copies of the Software, and to permit 11 | persons to whom the Software is furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or 14 | substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 17 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 18 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 19 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | DEALINGS IN THE SOFTWARE. 22 | 23 | For more details: 24 | https://opensource.org/licenses/MIT 25 | 26 | 27 | License of media 28 | ---------------- 29 | 30 | Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) 31 | Copyright (C) 2019 paramat 32 | 33 | You are free to: 34 | Share — copy and redistribute the material in any medium or format. 35 | Adapt — remix, transform, and build upon the material for any purpose, even commercially. 36 | The licensor cannot revoke these freedoms as long as you follow the license terms. 37 | 38 | Under the following terms: 39 | 40 | Attribution — You must give appropriate credit, provide a link to the license, and 41 | indicate if changes were made. You may do so in any reasonable manner, but not in any way 42 | that suggests the licensor endorses you or your use. 43 | 44 | ShareAlike — If you remix, transform, or build upon the material, you must distribute 45 | your contributions under the same license as the original. 46 | 47 | No additional restrictions — You may not apply legal terms or technological measures that 48 | legally restrict others from doing anything the license permits. 49 | 50 | Notices: 51 | 52 | You do not have to comply with the license for elements of the material in the public 53 | domain or where your use is permitted by an applicable exception or limitation. 54 | No warranties are given. The license may not give you all of the permissions necessary 55 | for your intended use. For example, other rights such as publicity, privacy, or moral 56 | rights may limit how you use the material. 57 | 58 | For more details: 59 | http://creativecommons.org/licenses/by-sa/3.0/ 60 | -------------------------------------------------------------------------------- /mods/creative/init.lua: -------------------------------------------------------------------------------- 1 | creative = {} 2 | 3 | local function update_sfinv(name) 4 | minetest.after(0, function() 5 | local player = minetest.get_player_by_name(name) 6 | if player then 7 | if sfinv.get_page(player):sub(1, 9) == "creative:" then 8 | sfinv.set_page(player, sfinv.get_homepage_name(player)) 9 | else 10 | sfinv.set_player_inventory_formspec(player) 11 | end 12 | end 13 | end) 14 | end 15 | 16 | minetest.register_privilege("creative", { 17 | description = "Allow player to use creative inventory", 18 | give_to_singleplayer = false, 19 | give_to_admin = false, 20 | on_grant = update_sfinv, 21 | on_revoke = update_sfinv, 22 | }) 23 | 24 | local creative_mode_cache = minetest.settings:get_bool("creative_mode") 25 | 26 | function creative.is_enabled_for(name) 27 | return creative_mode_cache or 28 | minetest.check_player_privs(name, {creative = true}) 29 | end 30 | 31 | dofile(minetest.get_modpath("creative") .. "/inventory.lua") 32 | 33 | if creative_mode_cache then 34 | -- Dig time is modified according to difference (leveldiff) between tool 35 | -- 'maxlevel' and node 'level'. Digtime is divided by the larger of 36 | -- leveldiff and 1. 37 | -- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been 38 | -- increased such that nodes of differing levels have an insignificant 39 | -- effect on digtime. 40 | local digtime = 42 41 | local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256} 42 | 43 | minetest.register_item(":", { 44 | type = "none", 45 | wield_image = "wieldhand.png", 46 | wield_scale = {x = 1, y = 1, z = 2.5}, 47 | range = 10, 48 | tool_capabilities = { 49 | full_punch_interval = 0.5, 50 | max_drop_level = 3, 51 | groupcaps = { 52 | crumbly = caps, 53 | cracky = caps, 54 | snappy = caps, 55 | choppy = caps, 56 | oddly_breakable_by_hand = caps, 57 | -- dig_immediate group doesn't use value 1. Value 3 is instant dig 58 | dig_immediate = 59 | {times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256}, 60 | }, 61 | damage_groups = {fleshy = 10}, 62 | } 63 | }) 64 | end 65 | 66 | -- Unlimited node placement 67 | minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) 68 | if placer and placer:is_player() then 69 | return creative.is_enabled_for(placer:get_player_name()) 70 | end 71 | end) 72 | 73 | -- Don't pick up if the item is already in the inventory 74 | local old_handle_node_drops = minetest.handle_node_drops 75 | function minetest.handle_node_drops(pos, drops, digger) 76 | if not digger or not digger:is_player() or 77 | not creative.is_enabled_for(digger:get_player_name()) then 78 | return old_handle_node_drops(pos, drops, digger) 79 | end 80 | local inv = digger:get_inventory() 81 | if inv then 82 | for _, item in ipairs(drops) do 83 | if not inv:contains_item("main", item, true) then 84 | inv:add_item("main", item) 85 | end 86 | end 87 | end 88 | end 89 | -------------------------------------------------------------------------------- /mods/vk_nodes/treasure_chests.lua: -------------------------------------------------------------------------------- 1 | function nodes.register_lootbox(name, def) 2 | minetest.register_node(name, { 3 | description = def.description, 4 | tiles = { 5 | "nodes_chest_top.png", "nodes_chest_bottom.png", 6 | "nodes_chest_side.png", "nodes_chest_side.png", 7 | "nodes_chest_back.png", "nodes_chest_front.png" 8 | }, 9 | groups = {unbreakable = 1, loadme = 1, lootbox = 1, overrides_pointable = 1}, 10 | paramtype = "light", 11 | paramtype2 = "facedir", 12 | on_construct = function(pos) 13 | local meta = minetest.get_meta(pos) 14 | local inv = meta:get_inventory() 15 | local spos = ("%d,%d,%d"):format(pos.x, pos.y, pos.z) 16 | local formspec = ([[ 17 | size[10,11] 18 | real_coordinates[true] 19 | list[nodemeta:%s;main;0.15,0.15;8,4;] 20 | button[3,5.1;4,0.8;take_all;Take All] 21 | list[current_player;main;0.15,6.1;8,1;] 22 | list[current_player;main;0.15,7.4;8,3;8] 23 | listring[nodemeta:%s;main] 24 | listring[current_player;main] 25 | ]]):format(spos, spos) 26 | 27 | meta:set_string("formspec", formspec) 28 | meta:set_string("infotext", "Treasure Chest") 29 | inv:set_size("main", 8*4) 30 | 31 | for _, loot in pairs(def.loot) do 32 | if loot[2] then 33 | if loot[3] then 34 | inv:add_item("main", loot[1] .. " " .. math.random(loot[2], loot[3])) 35 | else 36 | inv:add_item("main", loot[1] .. " " .. loot[2]) 37 | end 38 | else 39 | inv:add_item("main", loot[1]) 40 | end 41 | end 42 | end, 43 | allow_metadata_inventory_put = function(pos, listname, index, stack, player) 44 | return 0 45 | end, 46 | on_metadata_inventory_take = function(pos, listname, index, stack, player) 47 | local inv = minetest.get_meta(pos):get_inventory() 48 | 49 | if inv:is_empty("main") then 50 | minetest.remove_node(pos) 51 | end 52 | end, 53 | on_receive_fields = function(pos, formname, fields, sender) 54 | if fields.take_all then 55 | local playerinv = sender:get_inventory() 56 | local inv = minetest.get_meta(pos):get_inventory() 57 | 58 | for _, stack in ipairs(inv:get_list("main")) do 59 | if playerinv:room_for_item("main", stack) then 60 | playerinv:add_item("main", stack) 61 | inv:remove_item("main", stack) 62 | end 63 | end 64 | 65 | if inv:is_empty("main") then 66 | minetest.remove_node(pos) 67 | end 68 | end 69 | end, 70 | }) 71 | 72 | end 73 | 74 | minetest.register_node("vk_nodes:treasure_chest", { 75 | description = "Treasure chest placeholder", 76 | tiles = { 77 | "nodes_chest_top.png", "nodes_chest_bottom.png", 78 | "nodes_chest_side.png", "nodes_chest_side.png", 79 | "nodes_chest_back.png", "nodes_chest_front.png" 80 | }, 81 | groups = {unbreakable = 1, loadme = 1}, 82 | paramtype = "light", 83 | paramtype2 = "facedir", 84 | on_construct = function(pos) 85 | -- TODO: set up a dungeon function that'll give info on what lootbox to place based on party depth, ect 86 | end, 87 | }) 88 | -------------------------------------------------------------------------------- /mods/creative/license.txt: -------------------------------------------------------------------------------- 1 | License of source code 2 | ---------------------- 3 | 4 | The MIT License (MIT) 5 | Copyright (C) 2012-2016 Perttu Ahola (celeron55) 6 | Copyright (C) 2015-2016 Jean-Patrick G. (kilbith) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 9 | software and associated documentation files (the "Software"), to deal in the Software 10 | without restriction, including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, and to permit 12 | persons to whom the Software is furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 18 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 19 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 20 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | DEALINGS IN THE SOFTWARE. 23 | 24 | For more details: 25 | https://opensource.org/licenses/MIT 26 | 27 | 28 | Licenses of media (textures) 29 | ---------------------------- 30 | 31 | Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) 32 | Copyright (C) 2016 Jean-Patrick G. (kilbith) 33 | Copyright (C) 2018 paramat 34 | 35 | You are free to: 36 | Share — copy and redistribute the material in any medium or format. 37 | Adapt — remix, transform, and build upon the material for any purpose, even commercially. 38 | The licensor cannot revoke these freedoms as long as you follow the license terms. 39 | 40 | Under the following terms: 41 | 42 | Attribution — You must give appropriate credit, provide a link to the license, and 43 | indicate if changes were made. You may do so in any reasonable manner, but not in any way 44 | that suggests the licensor endorses you or your use. 45 | 46 | ShareAlike — If you remix, transform, or build upon the material, you must distribute 47 | your contributions under the same license as the original. 48 | 49 | No additional restrictions — You may not apply legal terms or technological measures that 50 | legally restrict others from doing anything the license permits. 51 | 52 | Notices: 53 | 54 | You do not have to comply with the license for elements of the material in the public 55 | domain or where your use is permitted by an applicable exception or limitation. 56 | No warranties are given. The license may not give you all of the permissions necessary 57 | for your intended use. For example, other rights such as publicity, privacy, or moral 58 | rights may limit how you use the material. 59 | 60 | For more details: 61 | http://creativecommons.org/licenses/by-sa/3.0/ 62 | -------------------------------------------------------------------------------- /mods/vk_players/vk_player/model.lua: -------------------------------------------------------------------------------- 1 | local anims = { 2 | stand = {range = {x = 0 , y = 0 }, speed = 30}, 3 | sit = {range = {x = 1 , y = 1 }, speed = 30}, 4 | lay = {range = {x = 2 , y = 2 }, speed = 30}, 5 | walk = {range = {x = 3 , y = 26 }, speed = 30}, 6 | walk_mine = {range = {x = 28 , y = 52 }, speed = 30}, 7 | mine = {range = {x = 53 , y = 77 }, speed = 30}, 8 | swim_mine = {range = {x = 78 , y = 108}, speed = 28}, 9 | swim_up = {range = {x = 109, y = 133}, speed = 28}, 10 | swim_down = {range = {x = 134, y = 158}, speed = 28}, 11 | wave = {range = {x = 159, y = 171}, speed = 34} 12 | } 13 | 14 | local registered_on_wield = {} 15 | local last_wielded_item = ItemStack() 16 | 17 | function players.register_on_wield(func) 18 | table.insert(registered_on_wield, func) 19 | end 20 | 21 | minetest.register_on_joinplayer(function(player) 22 | player:set_properties({ 23 | visual_size = vector.new(), 24 | }) 25 | 26 | local obj = minetest.add_entity(player:get_pos(), "vk_player:model") 27 | obj:get_luaentity().player = player:get_player_name() 28 | 29 | obj:set_attach(player, "Chest", vector.new(0, -1, 0), vector.new(), true) 30 | player:set_eye_offset({x=0, y=-1, z=2}, {x=0, y=0, z=0}) 31 | 32 | player:hud_set_flags({wielditem = false}) 33 | end) 34 | 35 | minetest.register_entity("vk_player:model", { 36 | initial_properties = { 37 | visual = "mesh", 38 | visual_size = vector.new(0.9, 0.9, 0.9), 39 | mesh = "player.b3d", 40 | textures = {"player.png"}, 41 | pointable = false, 42 | glow = 1, 43 | }, 44 | on_step = function(self, dtime) 45 | if not self.player then return self.object:remove() end 46 | 47 | local player = minetest.get_player_by_name(self.player) 48 | if not player then return self.object:remove() end 49 | 50 | -- Only run anim code every 0.1 seconds 51 | self.timer = (self.timer or 0) + dtime 52 | if self.timer < 0.1 then return else self.timer = 0 end 53 | 54 | -- 55 | --- Player Model animations 56 | local controls = player:get_player_control() 57 | 58 | if controls.right or controls.left or controls.down or controls.up then 59 | if controls.lmb or controls.rmb then 60 | self.object:set_animation(anims.walk_mine.range, anims.walk_mine.speed * (player:get_physics_override().speed or 1)) 61 | else 62 | self.object:set_animation(anims.walk.range, anims.walk.speed * (player:get_physics_override().speed or 1)) 63 | end 64 | elseif controls.lmb or controls.rmb then 65 | self.object:set_animation(anims.mine.range, anims.mine.speed * (player:get_physics_override().speed or 1)) 66 | else 67 | self.object:set_animation(anims.stand.range, anims.stand.speed * (player:get_physics_override().speed or 1)) 68 | end 69 | --- End of Player Model animations 70 | -- 71 | 72 | -- 73 | --- Start of wielditem code 74 | local wielditem = player:get_wielded_item() 75 | local wieldname = wielditem:get_name() 76 | 77 | if wieldname ~= last_wielded_item:get_name() then 78 | last_wielded_item = wielditem 79 | for _, func in ipairs(registered_on_wield) do 80 | if func(player, wielditem, last_wielded_item) then 81 | break 82 | end 83 | end 84 | end 85 | --- End of wielditem code 86 | -- 87 | end 88 | }) 89 | -------------------------------------------------------------------------------- /mods/vk_quests/init.lua: -------------------------------------------------------------------------------- 1 | vk_quests = {} 2 | vk_quest = {} 3 | 4 | local modname = minetest.get_current_modname() 5 | 6 | local nextid = 1 7 | function vk_quests.register_quest(type, name, def) 8 | def.qid = nextid 9 | nextid = nextid + 1 10 | 11 | if type == "kill" then 12 | if not def.on_complete then 13 | def.on_complete = function(player) 14 | local meta = player:get_meta() 15 | 16 | for key, addition in pairs(def.rewards) do 17 | players.set_int(player, key, meta:get_int(key) + addition) 18 | end 19 | 20 | minetest.chat_send_player(player:get_player_name(), "You completed quest \""..def.description.."\"!") 21 | vk_quests.finish_quest(player, def.qid) 22 | end 23 | end 24 | end 25 | 26 | vk_quest[type.."_"..name] = def 27 | end 28 | 29 | function vk_quests.get_quest(id) 30 | for name, quest in pairs(vk_quest) do 31 | if quest.qid == id then 32 | return quest, name 33 | end 34 | end 35 | end 36 | 37 | function vk_quests.start_quest(player, id) 38 | local unfinished_quests = vk_quests.get_unfinished_quests(player) 39 | 40 | unfinished_quests[id] = {} 41 | 42 | vk_quests.set_unfinished_quests(player, unfinished_quests) 43 | end 44 | 45 | function vk_quests.finish_quest(player, id) 46 | local unfinished_quests = vk_quests.get_unfinished_quests(player) 47 | 48 | unfinished_quests[id] = nil 49 | 50 | vk_quests.set_unfinished_quests(player, unfinished_quests) 51 | end 52 | 53 | function vk_quests.get_unfinished_quest(player, id) 54 | player = vkore.playerObj(player) 55 | 56 | local meta = player:get_meta() 57 | local unfinished_quests = minetest.deserialize(meta:get_string("unfinished_quests")) or {} 58 | 59 | return unfinished_quests and unfinished_quests[id] or nil 60 | end 61 | 62 | function vk_quests.get_unfinished_quests(player) 63 | player = vkore.playerObj(player) 64 | 65 | return minetest.deserialize(player:get_meta():get_string("unfinished_quests")) or {} 66 | end 67 | 68 | function vk_quests.set_unfinished_quests(player, unfinished_quests) 69 | player = vkore.playerObj(player) 70 | 71 | player:get_meta():set_string("unfinished_quests", minetest.serialize(unfinished_quests)) 72 | end 73 | 74 | function vk_quests.on_enemy_death(enemy, slayer) 75 | local unfinished_quests = vk_quests.get_unfinished_quests(slayer) 76 | 77 | if unfinished_quests == {} then 78 | return 79 | end 80 | 81 | for quest, progress in pairs(unfinished_quests) do 82 | local questdef = vk_quest["kill_"..enemy] 83 | 84 | if quest == questdef.qid then 85 | if not progress.kills then 86 | unfinished_quests[quest].kills = 0 87 | end 88 | 89 | unfinished_quests[quest].kills = unfinished_quests[quest].kills + 1 90 | 91 | if unfinished_quests[quest].kills >= questdef.amount then 92 | unfinished_quests[quest] = nil 93 | questdef.on_complete(slayer) 94 | end 95 | end 96 | end 97 | 98 | vk_quests.set_unfinished_quests(slayer, unfinished_quests) 99 | end 100 | 101 | minetest.register_on_joinplayer(function(player) 102 | if vk_quests.get_unfinished_quests(player) == {} then 103 | vk_quests.set_unfinished_quests(player, {}) 104 | end 105 | end) 106 | 107 | dofile(minetest.get_modpath(modname).."/quests.lua") 108 | dofile(minetest.get_modpath(modname).."/sfinv_page.lua") 109 | -------------------------------------------------------------------------------- /mods/vk_enemies/spawners/init.lua: -------------------------------------------------------------------------------- 1 | spawners = {} 2 | local SPAWNER_RADIUS = 6 3 | 4 | --[[ 5 | #### - entity: Name of entity to spawn (If func is not given) 6 | #### - size : Size of node as a 3d vector, gives map-makers an idea of how large your entity is 7 | #### - func : Custom function called when the spawner is 'activated'. Use it to customize how the spawning is done 8 | --]] 9 | 10 | function spawners.register_dungeon_spawner(entity, size, func) 11 | minetest.register_node(entity .. "_dungeon_spawner", { 12 | description = "Enemy spawner ("..entity..")", 13 | drawtype = "nodebox", 14 | tiles = {"spawners_dungeon_spawner.png"}, 15 | paramtype = "light", 16 | sunlight_propagates = false, 17 | walkable = false, 18 | light_source = 1, 19 | groups = {unbreakable = 1, dungeon_spawner = 1}, 20 | node_box = { 21 | type = "fixed", 22 | fixed = {-size.x/2, -size.y/2, -size.z/2, size.x/2, size.y/2, size.z/2} 23 | }, 24 | trigger = func or function(pos) 25 | if vkore.settings.game_mode ~= "dev" then 26 | minetest.add_entity(pos, entity) 27 | minetest.remove_node(pos) 28 | end 29 | end, 30 | }) 31 | end 32 | 33 | minetest.register_lbm({ 34 | label = "Activate enemy dungeon spawners", 35 | name = "spawners:activate_dungeon_spawners", 36 | nodenames = {"group:dungeon_spawner"}, 37 | run_at_every_load = true, 38 | action = function(pos, node) 39 | if vkore.settings.game_mode ~= "dev" then 40 | minetest.registered_nodes[node.name].trigger(pos) 41 | end 42 | end, 43 | }) 44 | 45 | function spawners.register_overworld_spawner(entity, enemies_per_spawner, biomes, func) 46 | minetest.register_node(entity .. "_overworld_spawner", { 47 | description = "Enemy spawner ("..entity..")", 48 | drawtype = "airlike", 49 | paramtype = "light", 50 | sunlight_propagates = false, 51 | walkable = false, 52 | light_source = 1, 53 | groups = {overworld_spawner = 1}, 54 | enemies_per_spawner = enemies_per_spawner, 55 | trigger = func or function(pos, mobs_to_spawn) 56 | if mobs_to_spawn <= 0 then return end 57 | 58 | local nodes_near = minetest.find_nodes_in_area_under_air( 59 | vector.add(pos, SPAWNER_RADIUS), 60 | vector.subtract(pos, SPAWNER_RADIUS), 61 | "group:all" 62 | ) 63 | 64 | while mobs_to_spawn > 0 do 65 | minetest.add_entity(nodes_near[math.random(1, #nodes_near)], entity) 66 | mobs_to_spawn = mobs_to_spawn - 1 67 | end 68 | end, 69 | }) 70 | 71 | minetest.register_decoration({ 72 | deco_type = "simple", 73 | place_on = "vk_nodes:grass", 74 | decoration = entity .. "_overworld_spawner", 75 | fill_ratio = 0.00005, 76 | biomes = {"green_biome"}, 77 | flags = "force_placement, all_floors", 78 | }) 79 | end 80 | 81 | minetest.register_lbm({ 82 | label = "Activate enemy overworld spawners", 83 | name = "spawners:activate_overworld_spawners", 84 | nodenames = {"group:overworld_spawner"}, 85 | run_at_every_load = true, 86 | action = function(pos, node) 87 | local objs_in_area = minetest.get_objects_inside_radius(pos, SPAWNER_RADIUS+5) 88 | local nodedef = minetest.registered_nodes[node.name] 89 | 90 | -- Remove objs that aren't spawned by this spawner 91 | for key, obj in pairs(objs_in_area) do 92 | if obj:is_player() or obj:get_luaentity().name ~= node.name:sub(1, node.name:find("_")-1) then 93 | table.remove(objs_in_area, key) 94 | end 95 | end 96 | 97 | nodedef.trigger(pos, nodedef.enemies_per_spawner - #objs_in_area) 98 | end 99 | }) 100 | -------------------------------------------------------------------------------- /mods/vk_enemies/pathfinder/astar_core.lua: -------------------------------------------------------------------------------- 1 | -- LUALOCALS < --------------------------------------------------------- 2 | local _, pairs 3 | = next, pairs 4 | -- LUALOCALS > --------------------------------------------------------- 5 | 6 | --[[ 7 | A* Pathfinding Algorithm 8 | 9 | Params: 10 | start = starting position. 11 | heur(p) = function to compute heuristic cost estimate from 12 | position p to goal; must return <= 0 if p IS goal. 13 | maxpts = maximum number of nodes to examine before giving up. 14 | edgecost(a, b) = function to get real cost of moving from a to b. 15 | neigh(p) = generator function to get all possible neighboring nodes of 16 | p. N.B. position values that are equal must be 17 | reference-equal, i.e. for non-scalars, interning is probably 18 | required. 19 | 20 | Returns: 21 | - Path, as hash[from]=to, to look up next step given position. 22 | Nil if pathfinding failed entirely, or already at goal. 23 | - Truthy if a real solution was found, falsey if path is a 24 | partial estimated solution based on heuristic. 25 | - Total real cost of solution path given. 26 | - Number of maxpts NOT consumed by the search. 27 | --]] 28 | 29 | local function result(solved, goal, from, cost, maxpts) 30 | if not goal then return end 31 | 32 | local path = {} 33 | local prev 34 | while goal do 35 | if prev then 36 | path[goal] = prev 37 | end 38 | prev = goal 39 | goal = from[goal] 40 | end 41 | 42 | return path, solved, cost, maxpts 43 | end 44 | 45 | local function astar(start, heur, maxpts, edgecost, neigh) 46 | if heur(start) <= 0 then return end 47 | 48 | local bestpos, bestscore 49 | local closed = {} 50 | local priq = {[1] = {[1] = start}} 51 | local from = {} 52 | local costs = {[start] = 0} 53 | while maxpts > 0 do 54 | -- Get the next set of points to process, sharing 55 | -- the same lowest estimated total cost so far. 56 | local minscore, curset 57 | for k, v in pairs(priq) do 58 | if not minscore or k < minscore then 59 | minscore = k 60 | curset = v 61 | end 62 | end 63 | if not curset then return result(nil, bestpos, from, bestscore, maxpts) end 64 | priq[minscore] = nil 65 | 66 | -- Point/cost pairs pending addition to priq 67 | local addq = {} 68 | 69 | -- Proces each point within the group, in reverse 70 | -- order (preferring later-found points, closer to 71 | -- depth-first). 72 | for idx = #curset, 1, -1 do 73 | local curpt = curset[idx] 74 | 75 | maxpts = maxpts - 1 76 | if maxpts < 1 then break end 77 | closed[curpt] = true 78 | 79 | local curptcost = costs[curpt] 80 | for n in neigh(curpt) do 81 | repeat 82 | if closed[n] then break end 83 | local newcost = curptcost + edgecost(curpt, n) 84 | local oldcost = costs[n] 85 | if oldcost and oldcost <= newcost then break end 86 | costs[n] = newcost 87 | from[n] = curpt 88 | addq[n] = {p = n, c = newcost} 89 | until false 90 | end 91 | end 92 | 93 | for k, v in pairs(addq) do 94 | local h = heur(v.p) 95 | if h <= 0 then return result(true, v.p, from, v.c, maxpts) end 96 | 97 | local f = h + v.c 98 | if not bestscore or f < bestscore then 99 | bestscore = f 100 | bestpos = v.p 101 | end 102 | 103 | local t = priq[f] 104 | if not t then 105 | t = {} 106 | priq[f] = t 107 | end 108 | t[#t + 1] = v.p 109 | end 110 | end 111 | return result(nil, bestpos, from, bestscore, maxpts) 112 | end 113 | 114 | return astar 115 | -------------------------------------------------------------------------------- /mods/vk_mapgen/structures.lua: -------------------------------------------------------------------------------- 1 | local mods = minetest.get_mod_storage() 2 | local modname = minetest.get_current_modname() 3 | 4 | mapgen.structures = minetest.deserialize(mods:get_string("structures") ~= "" or "{}") or {} 5 | 6 | function mapgen.register_structure(name, def) 7 | mapgen.structures[name] = {} 8 | 9 | mapgen.registered_structures[name] = def 10 | 11 | minetest.register_node(modname..":"..name, { 12 | drawtype = "airlike", 13 | walkable = false, 14 | pointable = false, 15 | buildable_to = true, 16 | paramtype = "light", 17 | sunlight_propagates = true, 18 | groups = {structure_placeholder = 1}, 19 | }) 20 | 21 | minetest.register_decoration({ 22 | deco_type = "simple", 23 | place_on = def.placeon or "vk_nodes:grass", 24 | decoration = modname..":"..name, 25 | fill_ratio = def.rarity, 26 | biomes = {"green_biome"}, 27 | y_min = def.y_min or 8, 28 | y_max = def.y_max or 8, 29 | flags = "force_placement, all_floors", 30 | }) 31 | end 32 | 33 | minetest.register_lbm({ 34 | label = "Place structures", 35 | name = modname..":place_structure", 36 | nodenames = {"group:structure_placeholder"}, 37 | run_at_every_load = true, 38 | action = function(pos, node) 39 | local schemname = mapgen.get_schemname(node.name) 40 | local result 41 | local structure = mapgen.registered_structures[schemname] 42 | 43 | minetest.remove_node(pos) 44 | 45 | if mapgen.structure_is_nearby(pos, mapgen.registered_structures[schemname].bubble) == false then 46 | vkore.scan_flood(pos, structure.radius, function(p, dist) 47 | local nodename = minetest.get_node(p).name 48 | 49 | if p.y < pos.y-1 or p.y > pos.y+1 then return false end -- Just scan a node off from y 8 (ground level) 50 | 51 | if p.y <= 8 then 52 | if nodename == "air" then 53 | result = "Will jut over edge" 54 | return true 55 | end 56 | else 57 | if nodename == "vk_nodes:grass" then -- There is terrain in the way 58 | result = "Will break terrain" 59 | return true 60 | end 61 | end 62 | end) 63 | 64 | pos.y = pos.y - 1 65 | 66 | if math.abs(pos.x) + structure.radius >= vkore.settings.world_size or 67 | math.abs(pos.z) + structure.radius >= vkore.settings.world_size then 68 | result = "Too close to map edge" 69 | end 70 | 71 | if not result then 72 | result = minetest.place_schematic( 73 | pos, -- pos to place schematic 74 | minetest.get_modpath(modname) .. "/schems/structures/" .. schemname .. ".mts", 75 | "random", -- rotation 76 | nil, -- replacements 77 | true, -- force_placement 78 | "place_center_x, place_center_z" -- flags 79 | ) 80 | end 81 | else 82 | result = "Pops a bubble" 83 | end 84 | 85 | if result == true then 86 | mapgen.new_structure(schemname, pos) 87 | minetest.log("action", "Spawned structure " .. schemname .. " at "..minetest.pos_to_string(pos)) 88 | elseif vkore.settings.game_mode == "dev" then 89 | minetest.log("error", 90 | "Failed to spawn structure " .. schemname .. " at " .. minetest.pos_to_string(pos) .. 91 | ". result = " .. dump(result) 92 | ) 93 | end 94 | end 95 | }) 96 | 97 | function mapgen.get_schemname(name) 98 | return name:sub(name:find(":")+1) 99 | end 100 | 101 | -- Check to see if a structure placed at pos will break another structure's 'bubble' with its own 102 | function mapgen.structure_is_nearby(pos, bubble) 103 | for structure, positions in pairs(mapgen.structures) do 104 | local bubble2 = mapgen.registered_structures[structure].bubble 105 | 106 | for _, structpos in ipairs(positions) do 107 | if vector.distance(pos, structpos) <= bubble + bubble2 then 108 | return true 109 | end 110 | end 111 | end 112 | 113 | return false 114 | end 115 | 116 | function mapgen.new_structure(schemname, pos) 117 | table.insert(mapgen.structures[schemname], pos) 118 | mods:set_string("structures", minetest.serialize(mapgen.structures)) 119 | end 120 | 121 | mapgen.register_structure("town1", { 122 | rarity = 0.00005, 123 | radius = 40, 124 | bubble = 100, 125 | }) 126 | 127 | -- mapgen.register_structure("dungeon1", { 128 | -- rarity = 0.00001, 129 | -- radius = 7, 130 | -- bubble = 25, 131 | -- }) 132 | -------------------------------------------------------------------------------- /mods/sfinv/README.md: -------------------------------------------------------------------------------- 1 | # Simple Fast Inventory 2 | 3 | ![SFINV Screeny](screenshot.png) 4 | 5 | A cleaner, simpler solution to having an advanced inventory in Minetest. 6 | 7 | Written by rubenwardy. 8 | License: MIT 9 | 10 | ## API 11 | 12 | It is recommended that you read this link for a good introduction to the sfinv API 13 | by its author: https://rubenwardy.com/minetest_modding_book/en/chapters/sfinv.html 14 | 15 | ### sfinv Methods 16 | 17 | **Pages** 18 | 19 | * sfinv.set_page(player, pagename) - changes the page 20 | * sfinv.get_homepage_name(player) - get the page name of the first page to show to a player 21 | * sfinv.register_page(name, def) - register a page, see section below 22 | * sfinv.override_page(name, def) - overrides fields of an page registered with register_page. 23 | * Note: Page must already be defined, (opt)depend on the mod defining it. 24 | * sfinv.set_player_inventory_formspec(player) - (re)builds page formspec 25 | and calls set_inventory_formspec(). 26 | * sfinv.get_formspec(player, context) - builds current page's formspec 27 | 28 | **Contexts** 29 | 30 | * sfinv.get_or_create_context(player) - gets the player's context 31 | * sfinv.set_context(player, context) 32 | 33 | **Theming** 34 | 35 | * sfinv.make_formspec(player, context, content, show_inv, size) - adds a theme to a formspec 36 | * show_inv, defaults to false. Whether to show the player's main inventory 37 | * size, defaults to `size[8,8.6]` if not specified 38 | * sfinv.get_nav_fs(player, context, nav, current_idx) - creates tabheader or "" 39 | 40 | ### sfinv Members 41 | 42 | * pages - table of pages[pagename] = def 43 | * pages_unordered - array table of pages in order of addition (used to build navigation tabs). 44 | * contexts - contexts[playername] = player_context 45 | * enabled - set to false to disable. Good for inventory rehaul mods like unified inventory 46 | 47 | ### Context 48 | 49 | A table with these keys: 50 | 51 | * page - current page name 52 | * nav - a list of page names 53 | * nav_titles - a list of page titles 54 | * nav_idx - current nav index (in nav and nav_titles) 55 | * any thing you want to store 56 | * sfinv will clear the stored data on log out / log in 57 | 58 | ### sfinv.register_page 59 | 60 | sfinv.register_page(name, def) 61 | 62 | def is a table containing: 63 | 64 | * `title` - human readable page name (required) 65 | * `get(self, player, context)` - returns a formspec string. See formspec variables. (required) 66 | * `is_in_nav(self, player, context)` - return true to show in the navigation (the tab header, by default) 67 | * `on_player_receive_fields(self, player, context, fields)` - on formspec submit. 68 | * `on_enter(self, player, context)` - called when the player changes pages, usually using the tabs. 69 | * `on_leave(self, player, context)` - when leaving this page to go to another, called before other's on_enter 70 | 71 | ### get formspec 72 | 73 | Use sfinv.make_formspec to apply a layout: 74 | 75 | return sfinv.make_formspec(player, context, [[ 76 | list[current_player;craft;1.75,0.5;3,3;] 77 | list[current_player;craftpreview;5.75,1.5;1,1;] 78 | image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270] 79 | listring[current_player;main] 80 | listring[current_player;craft] 81 | image[0,4.25;1,1;gui_hb_bg.png] 82 | image[1,4.25;1,1;gui_hb_bg.png] 83 | image[2,4.25;1,1;gui_hb_bg.png] 84 | image[3,4.25;1,1;gui_hb_bg.png] 85 | image[4,4.25;1,1;gui_hb_bg.png] 86 | image[5,4.25;1,1;gui_hb_bg.png] 87 | image[6,4.25;1,1;gui_hb_bg.png] 88 | image[7,4.25;1,1;gui_hb_bg.png] 89 | ]], true) 90 | 91 | See above (methods section) for more options. 92 | 93 | ### Customising themes 94 | 95 | Simply override this function to change the navigation: 96 | 97 | function sfinv.get_nav_fs(player, context, nav, current_idx) 98 | return "navformspec" 99 | end 100 | 101 | And override this function to change the layout: 102 | 103 | function sfinv.make_formspec(player, context, content, show_inv, size) 104 | local tmp = { 105 | size or "size[8,8.6]", 106 | theme_main, 107 | sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), 108 | content 109 | } 110 | if show_inv then 111 | tmp[4] = theme_inv 112 | end 113 | return table.concat(tmp, "") 114 | end 115 | -------------------------------------------------------------------------------- /mods/vk_nodes/map.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | minetest.register_tool(modname..":mappick", { 4 | description = "Map Pickaxe", 5 | inventory_image = "nodes_mappick.png", 6 | wield_scale = {x = 1.5, z = 1.5, y = 2}, 7 | range = 15, 8 | tool_capabilities = { 9 | full_punch_interval = 0.1, 10 | max_drop_level = 3, 11 | groupcaps = { 12 | unbreakable = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 13 | dig_immediate = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 14 | fleshy = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 15 | choppy = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 16 | bendy = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 17 | cracky = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 18 | crumbly = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3}, 19 | snappy = {times={[1] = 0.7, [2] = 0.7, [3] = 0.7}, uses = 0, maxlevel = 3} 20 | }, 21 | damage_groups = {fleshy = 4}, 22 | } 23 | }) 24 | 25 | minetest.register_node(modname..":grass", { 26 | description = "Grass", 27 | tiles = {"nodes_grass.png", "nodes_dirt.png", "nodes_grass_side.png"}, 28 | groups = {unbreakable = 1}, 29 | }) 30 | 31 | minetest.register_node(modname..":dirt", { 32 | description = "Dirt", 33 | tiles = {"nodes_dirt.png"}, 34 | groups = {unbreakable = 1}, 35 | }) 36 | 37 | minetest.register_node(modname..":sand", { 38 | description = "Sand", 39 | tiles = {"nodes_sand.png"}, 40 | groups = {unbreakable = 1}, 41 | }) 42 | 43 | minetest.register_node(modname..":stone", { 44 | description = "Stone", 45 | tiles = {"nodes_stone.png"}, 46 | groups = {unbreakable = 1}, 47 | }) 48 | 49 | nodes.register_stair_and_slab("stone", { 50 | description = "Stone", 51 | tiles = {"nodes_stone.png"}, 52 | groups = {unbreakable = 1}, 53 | paramtype2 = "facedir", 54 | }) 55 | 56 | minetest.register_node(modname..":snow", { 57 | description = "Snow", 58 | tiles = {"nodes_sand.png^[colorize:white:140"}, 59 | groups = {unbreakable = 1}, 60 | }) 61 | 62 | -- 63 | --- Plants 64 | -- 65 | 66 | minetest.register_node(modname..":tree", { 67 | description = "Tree", 68 | tiles = {"nodes_tree.png"}, 69 | groups = {unbreakable = 1}, 70 | }) 71 | 72 | nodes.register_stair_and_slab("tree", { 73 | description = "Tree", 74 | tiles = {"nodes_tree.png"}, 75 | groups = {unbreakable = 1}, 76 | paramtype2 = "facedir", 77 | }) 78 | 79 | minetest.register_node(modname..":leaves", { 80 | drawtype = "glasslike", 81 | description = "Leaves", 82 | paramtype = "light", 83 | sunlight_propogates = true, 84 | tiles = {"nodes_leaves.png"}, 85 | groups = {unbreakable = 1}, 86 | }) 87 | 88 | -- 89 | --- Misc 90 | -- 91 | 92 | nodes.register_posts("wooden", "nodes_tree.png") 93 | nodes.register_posts("iron", "nodes_iron.png") 94 | 95 | -- 96 | --- Liquids 97 | -- 98 | 99 | minetest.register_node(modname..":water_source", { 100 | description = "Water Source", 101 | drawtype = "liquid", 102 | tiles = { 103 | { 104 | name = "nodes_water.png", 105 | backface_culling = false, 106 | animation = { 107 | type = "vertical_frames", 108 | aspect_w = 16, 109 | aspect_h = 16, 110 | length = 4.0, 111 | }, 112 | }, 113 | { 114 | name = "nodes_water.png", 115 | backface_culling = true, 116 | animation = { 117 | type = "vertical_frames", 118 | aspect_w = 16, 119 | aspect_h = 16, 120 | length = 4.0, 121 | }, 122 | }, 123 | }, 124 | paramtype = "light", 125 | sunlight_propogates = true, 126 | walkable = false, 127 | pointable = false, 128 | diggable = false, 129 | buildable_to = true, 130 | is_ground_content = false, 131 | drop = "", 132 | drowning = 2, 133 | liquidtype = "source", 134 | liquid_alternative_flowing = modname..":water_flowing", 135 | liquid_alternative_source = modname..":water_source", 136 | liquid_renewable = true, 137 | alpha = 200, 138 | liquid_viscosity = 3, 139 | post_effect_color = {a = 103, r = 0, g = 50, b = 62}, 140 | groups = {water = 1, liquid = 1}, 141 | }) 142 | 143 | local waterdef = table.copy(minetest.registered_nodes[modname..":water_source"]) 144 | waterdef.drawtype = "flowingliquid" 145 | waterdef.liquidtype = "flowing" 146 | waterdef.groups.not_in_creative_inventory = 1 147 | waterdef.special_tiles = waterdef.tiles 148 | minetest.register_node(modname..":water_flowing", waterdef) 149 | -------------------------------------------------------------------------------- /mods/vk_enemies/spider/init.lua: -------------------------------------------------------------------------------- 1 | local ROAM = 1 2 | local AMBUSH = 2 3 | local GOTO_COVER = 3 4 | local ATTACK = 4 5 | 6 | local function custom_hq_goto(self, prty, tpos) -- Improved hq_goto 7 | local func = function(funcself) 8 | if mobkit.is_queue_empty_low(funcself) and funcself.isonground then 9 | local pos = self.object:get_pos() 10 | local nextpos = pathfinder.find(pos, tpos, 50) 11 | 12 | if nextpos ~= nil and vector.distance(nextpos[2], tpos) >= 1 then 13 | mobkit.goto_next_waypoint(funcself, nextpos[2]) 14 | else 15 | return true 16 | end 17 | end 18 | end 19 | 20 | mobkit.queue_high(self,func,prty) 21 | end 22 | 23 | local function ambush(self, prty) -- mobkit API will soon reduce completion radius, and this will no longer be needed 24 | mobkit.lq_idle(self, 0) 25 | 26 | local func = function(funcself) 27 | local nearby_player = mobkit.get_nearby_player(funcself) 28 | 29 | if nearby_player then 30 | local dist = math.round(vector.distance(funcself.object:get_pos(), nearby_player:get_pos())) 31 | local lastplayerdist = mobkit.recall(funcself, "lastplayerdist") 32 | 33 | if dist < 5 or 34 | (lastplayerdist ~= nil and lastplayerdist < dist) then -- They are close/retreating. Get them!! 35 | mobkit.remember(funcself, "ambushing", nil) 36 | mobkit.remember(funcself, "lastplayerdist", nil) 37 | return true 38 | else 39 | mobkit.remember(funcself, "lastplayerdist", dist) 40 | end 41 | end 42 | end 43 | 44 | mobkit.remember(self, "ambushing", true) 45 | mobkit.queue_high(self,func,prty) 46 | end 47 | 48 | minetest.register_entity("spider:spider", { 49 | physical = true, 50 | collide_with_objects = true, 51 | visual = "mesh", 52 | visual_size = vector.new(10, 10, 10), 53 | collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.4, 0.4}, 54 | mesh = "spider_spider.b3d", 55 | textures = {"spider_spider.png"}, 56 | timeout = 0, 57 | glow = 1, 58 | stepheight = 0.6, 59 | buoyancy = 1, 60 | lung_capacity = 3, -- seconds 61 | hp = 25, 62 | max_hp = 35, 63 | on_step = mobkit.stepfunc, 64 | on_activate = function(self, staticdata, dtime_s) 65 | self.attack_ok = true 66 | 67 | mobkit.actfunc(self, staticdata, dtime_s) 68 | end, 69 | get_staticdata = mobkit.statfunc, 70 | logic = function(self) 71 | mobkit.vitals(self) 72 | 73 | local obj = self.object 74 | local pos = obj:get_pos() 75 | 76 | if self.hp <= 0 then 77 | mobkit.clear_queue_high(self) 78 | mobkit.hq_die(self) 79 | return 80 | end 81 | 82 | if mobkit.timer(self, 1) then 83 | local priority = mobkit.get_queue_priority(self) 84 | local nearby_player = mobkit.get_nearby_player(self) 85 | 86 | if nearby_player and priority < ATTACK and mobkit.recall(self, "ambushing") ~= true and -- Not attacking/ambushing 87 | vector.distance(nearby_player:get_pos(), pos) <= 10 then -- Not attacking nearby player 88 | mobkit.hq_hunt(self, ATTACK, nearby_player) 89 | end 90 | 91 | -- If not finding cover or hiding in cover 92 | if priority < GOTO_COVER and minetest.get_node(pos).name ~= "spider:spider_cover" then 93 | local nearest_cover = minetest.find_node_near(pos, 20, "spider:spider_cover") 94 | 95 | if nearest_cover then 96 | if custom_hq_goto(self, GOTO_COVER, nearest_cover) then -- spider arrived at web 97 | ambush(self, AMBUSH) 98 | end 99 | else 100 | mobkit.hq_roam(self, ROAM) 101 | end 102 | elseif priority ~= AMBUSH and minetest.get_node(pos).name == "spider:spider_cover" then 103 | ambush(self, AMBUSH) 104 | end 105 | end 106 | end, 107 | animation = { 108 | ["stand"] = { 109 | range = {x = 1, y = 1}, 110 | speed = 0, 111 | loop = false, 112 | }, 113 | ["walk"] = { 114 | range = {x = 1,y = 47}, 115 | speed = 40, 116 | loop = true 117 | }, 118 | }, 119 | gold = 1, 120 | gold_max = 3, 121 | xp = 2, 122 | xp_max = 3, 123 | max_speed = 5, 124 | jump_height = 3.5, 125 | view_range = 20, 126 | attack={ 127 | range = 3, 128 | interval = 1, 129 | damage_groups = {fleshy = 5} 130 | }, 131 | on_punch = mobkit_custom.on_punch, 132 | armor_groups = {fleshy=10} 133 | }) 134 | 135 | local spiderdef = table.copy(minetest.registered_nodes["vk_nodes:cobweb"]) 136 | 137 | spiderdef.description = "Spider cover. Spiders will hide in this node and ambush players" 138 | spiderdef.inventory_image = "nodes_cobweb.png" 139 | 140 | minetest.register_node("spider:spider_cover", spiderdef) 141 | 142 | spawners.register_dungeon_spawner("spider:spider", vector.new(1.5, 1, 1.5)) 143 | spawners.register_overworld_spawner("spider:spider", 3) 144 | -------------------------------------------------------------------------------- /mods/sfinv/api.lua: -------------------------------------------------------------------------------- 1 | sfinv = { 2 | pages = {}, 3 | pages_unordered = {}, 4 | contexts = {}, 5 | enabled = true 6 | } 7 | 8 | function sfinv.register_page(name, def) 9 | assert(name, "Invalid sfinv page. Requires a name") 10 | assert(def, "Invalid sfinv page. Requires a def[inition] table") 11 | assert(def.get, "Invalid sfinv page. Def requires a get function.") 12 | assert(not sfinv.pages[name], "Attempt to register already registered sfinv page " .. dump(name)) 13 | 14 | sfinv.pages[name] = def 15 | def.name = name 16 | table.insert(sfinv.pages_unordered, def) 17 | end 18 | 19 | function sfinv.override_page(name, def) 20 | assert(name, "Invalid sfinv page override. Requires a name") 21 | assert(def, "Invalid sfinv page override. Requires a def[inition] table") 22 | local page = sfinv.pages[name] 23 | assert(page, "Attempt to override sfinv page " .. dump(name) .. " which does not exist.") 24 | for key, value in pairs(def) do 25 | page[key] = value 26 | end 27 | end 28 | 29 | function sfinv.get_nav_fs(player, context, nav, current_idx) 30 | -- Only show tabs if there is more than one page 31 | if #nav > 1 then 32 | return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") .. 33 | ";" .. current_idx .. ";true;false]" 34 | else 35 | return "" 36 | end 37 | end 38 | 39 | local theme_inv = [[ 40 | image[0,4.7;1,1;gui_hb_bg.png] 41 | image[1,4.7;1,1;gui_hb_bg.png] 42 | image[2,4.7;1,1;gui_hb_bg.png] 43 | image[3,4.7;1,1;gui_hb_bg.png] 44 | image[4,4.7;1,1;gui_hb_bg.png] 45 | image[5,4.7;1,1;gui_hb_bg.png] 46 | image[6,4.7;1,1;gui_hb_bg.png] 47 | image[7,4.7;1,1;gui_hb_bg.png] 48 | list[current_player;main;0,4.7;8,1;] 49 | list[current_player;main;0,5.85;8,3;8] 50 | ]] 51 | 52 | function sfinv.make_formspec(player, context, content, show_inv, size) 53 | local tmp = { 54 | size or "size[8,8.6]", 55 | sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), 56 | show_inv and theme_inv or "", 57 | content 58 | } 59 | return table.concat(tmp, "") 60 | end 61 | 62 | function sfinv.get_homepage_name(player) 63 | return "sfinv:crafting" 64 | end 65 | 66 | function sfinv.get_formspec(player, context) 67 | -- Generate navigation tabs 68 | local nav = {} 69 | local nav_ids = {} 70 | local current_idx = 1 71 | for i, pdef in pairs(sfinv.pages_unordered) do 72 | if not pdef.is_in_nav or pdef:is_in_nav(player, context) then 73 | nav[#nav + 1] = pdef.title 74 | nav_ids[#nav_ids + 1] = pdef.name 75 | if pdef.name == context.page then 76 | current_idx = #nav_ids 77 | end 78 | end 79 | end 80 | context.nav = nav_ids 81 | context.nav_titles = nav 82 | context.nav_idx = current_idx 83 | 84 | -- Generate formspec 85 | local page = sfinv.pages[context.page] or sfinv.pages["404"] 86 | if page then 87 | return page:get(player, context) 88 | else 89 | local old_page = context.page 90 | local home_page = sfinv.get_homepage_name(player) 91 | 92 | if old_page == home_page then 93 | minetest.log("error", "[sfinv] Couldn't find " .. dump(old_page) .. 94 | ", which is also the old page") 95 | 96 | return "" 97 | end 98 | 99 | context.page = home_page 100 | assert(sfinv.pages[context.page], "[sfinv] Invalid homepage") 101 | minetest.log("warning", "[sfinv] Couldn't find " .. dump(old_page) .. 102 | " so switching to homepage") 103 | 104 | return sfinv.get_formspec(player, context) 105 | end 106 | end 107 | 108 | function sfinv.get_or_create_context(player) 109 | local name = player:get_player_name() 110 | local context = sfinv.contexts[name] 111 | if not context then 112 | context = { 113 | page = sfinv.get_homepage_name(player) 114 | } 115 | sfinv.contexts[name] = context 116 | end 117 | return context 118 | end 119 | 120 | function sfinv.set_context(player, context) 121 | sfinv.contexts[player:get_player_name()] = context 122 | end 123 | 124 | function sfinv.set_player_inventory_formspec(player, context) 125 | local fs = sfinv.get_formspec(player, 126 | context or sfinv.get_or_create_context(player)) 127 | player:set_inventory_formspec(fs) 128 | end 129 | 130 | function sfinv.set_page(player, pagename) 131 | local context = sfinv.get_or_create_context(player) 132 | local oldpage = sfinv.pages[context.page] 133 | if oldpage and oldpage.on_leave then 134 | oldpage:on_leave(player, context) 135 | end 136 | context.page = pagename 137 | local page = sfinv.pages[pagename] 138 | if page.on_enter then 139 | page:on_enter(player, context) 140 | end 141 | sfinv.set_player_inventory_formspec(player, context) 142 | end 143 | 144 | function sfinv.get_page(player) 145 | local context = sfinv.contexts[player:get_player_name()] 146 | return context and context.page or sfinv.get_homepage_name(player) 147 | end 148 | 149 | minetest.register_on_joinplayer(function(player) 150 | if sfinv.enabled then 151 | sfinv.set_player_inventory_formspec(player) 152 | end 153 | end) 154 | 155 | minetest.register_on_leaveplayer(function(player) 156 | sfinv.contexts[player:get_player_name()] = nil 157 | end) 158 | 159 | minetest.register_on_player_receive_fields(function(player, formname, fields) 160 | if formname ~= "" or not sfinv.enabled then 161 | return false 162 | end 163 | 164 | -- Get Context 165 | local name = player:get_player_name() 166 | local context = sfinv.contexts[name] 167 | if not context then 168 | sfinv.set_player_inventory_formspec(player) 169 | return false 170 | end 171 | 172 | -- Was a tab selected? 173 | if fields.sfinv_nav_tabs and context.nav then 174 | local tid = tonumber(fields.sfinv_nav_tabs) 175 | if tid and tid > 0 then 176 | local id = context.nav[tid] 177 | local page = sfinv.pages[id] 178 | if id and page then 179 | sfinv.set_page(player, id) 180 | end 181 | end 182 | else 183 | -- Pass event to page 184 | local page = sfinv.pages[context.page] 185 | if page and page.on_player_receive_fields then 186 | return page:on_player_receive_fields(player, context, fields) 187 | end 188 | end 189 | end) 190 | -------------------------------------------------------------------------------- /mods/creative/inventory.lua: -------------------------------------------------------------------------------- 1 | local player_inventory = {} 2 | local inventory_cache = {} 3 | 4 | local function init_creative_cache(items) 5 | inventory_cache[items] = {} 6 | local i_cache = inventory_cache[items] 7 | 8 | for name, def in pairs(items) do 9 | if def.groups.not_in_creative_inventory ~= 1 and 10 | def.description and def.description ~= "" then 11 | i_cache[name] = def 12 | end 13 | end 14 | table.sort(i_cache) 15 | return i_cache 16 | end 17 | 18 | function creative.init_creative_inventory(player) 19 | local player_name = player:get_player_name() 20 | player_inventory[player_name] = { 21 | size = 0, 22 | filter = "", 23 | start_i = 0 24 | } 25 | 26 | minetest.create_detached_inventory("creative_" .. player_name, { 27 | allow_move = function(inv, from_list, from_index, to_list, to_index, count, player2) 28 | local name = player2 and player2:get_player_name() or "" 29 | if not creative.is_enabled_for(name) or 30 | to_list == "main" then 31 | return 0 32 | end 33 | return count 34 | end, 35 | allow_put = function(inv, listname, index, stack, player2) 36 | return 0 37 | end, 38 | allow_take = function(inv, listname, index, stack, player2) 39 | local name = player2 and player2:get_player_name() or "" 40 | if not creative.is_enabled_for(name) then 41 | return 0 42 | end 43 | return -1 44 | end, 45 | on_move = function(inv, from_list, from_index, to_list, to_index, count, player2) 46 | end, 47 | on_take = function(inv, listname, index, stack, player2) 48 | if stack and stack:get_count() > 0 then 49 | minetest.log("action", player_name .. " takes " .. stack:get_name().. " from creative inventory") 50 | end 51 | end, 52 | }, player_name) 53 | 54 | return player_inventory[player_name] 55 | end 56 | 57 | function creative.update_creative_inventory(player_name, tab_content) 58 | local creative_list = {} 59 | local inv = player_inventory[player_name] or 60 | creative.init_creative_inventory(minetest.get_player_by_name(player_name)) 61 | local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name}) 62 | 63 | local items = inventory_cache[tab_content] or init_creative_cache(tab_content) 64 | 65 | for name, def in pairs(items) do 66 | if def.name:find(inv.filter, 1, true) or 67 | def.description:lower():find(inv.filter, 1, true) then 68 | creative_list[#creative_list+1] = name 69 | end 70 | end 71 | 72 | table.sort(creative_list) 73 | player_inv:set_size("main", #creative_list) 74 | player_inv:set_list("main", creative_list) 75 | inv.size = #creative_list 76 | end 77 | 78 | -- Create the trash field 79 | local trash = minetest.create_detached_inventory("creative_trash", { 80 | -- Allow the stack to be placed and remove it in on_put() 81 | -- This allows the creative inventory to restore the stack 82 | allow_put = function(inv, listname, index, stack, player) 83 | return stack:get_count() 84 | end, 85 | on_put = function(inv, listname) 86 | inv:set_list(listname, {}) 87 | end, 88 | }) 89 | trash:set_size("main", 1) 90 | 91 | creative.formspec_add = "" 92 | 93 | function creative.register_tab(name, title, items) 94 | sfinv.register_page("creative:" .. name, { 95 | title = title, 96 | is_in_nav = function(self, player, context) 97 | return creative.is_enabled_for(player:get_player_name()) 98 | end, 99 | get = function(self, player, context) 100 | local player_name = player:get_player_name() 101 | creative.update_creative_inventory(player_name, items) 102 | local inv = player_inventory[player_name] 103 | local start_i = inv.start_i or 0 104 | local pagenum = math.floor(start_i / (3*8) + 1) 105 | local pagemax = math.ceil(inv.size / (3*8)) 106 | return sfinv.make_formspec(player, context, 107 | "label[6.2,3.35;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" .. 108 | [[ 109 | image[4.06,3.4;0.8,0.8;creative_trash_icon.png] 110 | listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] 111 | list[detached:creative_trash;main;4,3.3;1,1;] 112 | listring[] 113 | image_button[5.4,3.25;0.8,0.8;creative_prev_icon.png;creative_prev;] 114 | image_button[7.2,3.25;0.8,0.8;creative_next_icon.png;creative_next;] 115 | image_button[2.1,3.25;0.8,0.8;creative_search_icon.png;creative_search;] 116 | image_button[2.75,3.25;0.8,0.8;creative_clear_icon.png;creative_clear;] 117 | tooltip[creative_search;Search] 118 | tooltip[creative_clear;Reset] 119 | tooltip[creative_prev;Previous page] 120 | tooltip[creative_next;Next page] 121 | listring[current_player;main] 122 | field_close_on_enter[creative_filter;false] 123 | ]] .. 124 | "field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" .. 125 | "listring[detached:creative_" .. player_name .. ";main]" .. 126 | "list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" .. 127 | creative.formspec_add, true) 128 | end, 129 | on_enter = function(self, player, context) 130 | local player_name = player:get_player_name() 131 | local inv = player_inventory[player_name] 132 | if inv then 133 | inv.start_i = 0 134 | end 135 | end, 136 | on_player_receive_fields = function(self, player, context, fields) 137 | local player_name = player:get_player_name() 138 | local inv = player_inventory[player_name] 139 | assert(inv) 140 | 141 | if fields.creative_clear then 142 | inv.start_i = 0 143 | inv.filter = "" 144 | creative.update_creative_inventory(player_name, items) 145 | sfinv.set_player_inventory_formspec(player, context) 146 | elseif fields.creative_search or 147 | fields.key_enter_field == "creative_filter" then 148 | inv.start_i = 0 149 | inv.filter = fields.creative_filter:lower() 150 | creative.update_creative_inventory(player_name, items) 151 | sfinv.set_player_inventory_formspec(player, context) 152 | elseif not fields.quit then 153 | local start_i = inv.start_i or 0 154 | 155 | if fields.creative_prev then 156 | start_i = start_i - 3*8 157 | if start_i < 0 then 158 | start_i = inv.size - (inv.size % (3*8)) 159 | if inv.size == start_i then 160 | start_i = math.max(0, inv.size - (3*8)) 161 | end 162 | end 163 | elseif fields.creative_next then 164 | start_i = start_i + 3*8 165 | if start_i >= inv.size then 166 | start_i = 0 167 | end 168 | end 169 | 170 | inv.start_i = start_i 171 | sfinv.set_player_inventory_formspec(player, context) 172 | end 173 | end 174 | }) 175 | end 176 | 177 | creative.register_tab("all", "All", minetest.registered_items) 178 | creative.register_tab("nodes", "Nodes", minetest.registered_nodes) 179 | creative.register_tab("tools", "Tools", minetest.registered_tools) 180 | creative.register_tab("craftitems", "Items", minetest.registered_craftitems) 181 | 182 | local old_homepage_name = sfinv.get_homepage_name 183 | function sfinv.get_homepage_name(player) 184 | if creative.is_enabled_for(player:get_player_name()) then 185 | return "creative:all" 186 | else 187 | return old_homepage_name(player) 188 | end 189 | end 190 | -------------------------------------------------------------------------------- /mods/vk_npcs/init.lua: -------------------------------------------------------------------------------- 1 | local modname = minetest.get_current_modname() 2 | 3 | local default_hit_replies = { 4 | "Keep your weapons to yourself", 5 | "Stop that", 6 | "Do I need to call a guard?", 7 | "Are you done or are you going to wear yourself out doing that?", 8 | "Didn't your parents tell you not to attack strangers?", 9 | "I can hit back too you know", 10 | "Enough!", 11 | "Go practice that somewhere else", 12 | } 13 | 14 | local function prettify(npcname) 15 | local output = npcname:gsub("_", " ") 16 | 17 | return output:gsub("^(.)", string.upper) 18 | end 19 | 20 | --[[ 21 | context is used to save formspec info when a player is interacting with npcs. 22 | It is cleared on exit/server restart 23 | Default values: 24 | { 25 | tab = 1, -- Current tab the player is on 26 | npcdef = def, -- NPC definition. Used to grab convos and NPC names 27 | quest = 1, -- Selected quest in quest list 28 | quests = {}, -- List of quests availiable from npc 29 | } 30 | ]] 31 | local context = {} 32 | minetest.register_on_leaveplayer(function(player) context[player:get_player_name()] = nil end) 33 | 34 | local function register_npc(name, def) 35 | def.npcname = name 36 | 37 | minetest.register_node(modname..":"..name, { 38 | npcname = name, 39 | description = "NPC "..prettify(name), 40 | drawtype = "mesh", 41 | mesh = "player.obj", 42 | visual_scale = 0.093, 43 | wield_scale = vector.new(0.093, 0.093, 0.093), 44 | tiles = {def.texture}, 45 | paramtype = "light", 46 | paramtype2 = "facedir", 47 | selection_box = { 48 | type = "fixed", 49 | fixed = { 50 | {-0.45, -0.5, -0.25, 0.45, 1.45, 0.25}, 51 | } 52 | }, 53 | collision_box = { 54 | type = "fixed", 55 | fixed = { 56 | {-0.45, -0.5, -0.25, 0.45, 1.45, 0.25}, 57 | } 58 | }, 59 | groups = {unbreakable = 1, loadme = 1, overrides_pointable = 1}, 60 | on_construct = function(pos) 61 | 62 | end, 63 | on_punch = function(pos, node, puncher, ...) 64 | if def.on_punch and def.on_punch(pos, node, puncher, ...) then 65 | return 66 | end 67 | 68 | if def.hit_replies and puncher and puncher:is_player() then 69 | minetest.chat_send_player(puncher:get_player_name(), ("<%s> "):format(prettify(name))..def.hit_replies[math.random(1, #def.hit_replies)]) 70 | end 71 | end, 72 | on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) 73 | if not clicker or not clicker:is_player() then return end 74 | 75 | local pname = clicker:get_player_name() 76 | 77 | if not context[pname] or context[pname].npcdef.npcname ~= name then 78 | context[pname] = { 79 | tab = 1, 80 | npcdef = def, 81 | quest = 1 82 | } 83 | end 84 | 85 | vk_quests.show_npc_form(pname, context[pname]) 86 | end 87 | }) 88 | end 89 | 90 | function vk_quests.show_npc_form(pname, pcontext) 91 | local temp 92 | local formspec = ([[ 93 | size[8,6] 94 | real_coordinates[true] 95 | label[0.2,0.3;%s] 96 | ]]):format( 97 | prettify(pcontext.npcdef.npcname) 98 | ) 99 | 100 | if not pcontext.npcdef.convos then 101 | minetest.chat_send_player(pname, ("<%s> "):format(prettify(pcontext.npcdef.npcname)).."I have nothing to say") 102 | return 103 | end 104 | 105 | local convos = "" 106 | local convo_content 107 | temp = 0 -- tab number 108 | for cname, content in pairs(pcontext.npcdef.convos) do 109 | temp = temp + 1 110 | 111 | -- Save the content of the currently selected convo for later use 112 | if temp == pcontext.tab then 113 | convo_content = content 114 | end 115 | 116 | convos = convos .. cname .. "," 117 | end 118 | 119 | convos = convos:sub(1, -2) -- Remove trailing comma 120 | 121 | formspec = formspec .. 122 | "tabheader[0,2;1;convos;"..convos..";".. pcontext.tab ..";false;true]" 123 | 124 | local quests = {} 125 | local quest_convo = false 126 | 127 | for _, quest in pairs(convo_content) do 128 | if vk_quest[quest] then 129 | quest_convo = true 130 | table.insert(quests, vk_quest[quest]) 131 | end 132 | end 133 | 134 | if quest_convo then 135 | local comments = quests[pcontext.quest].comments 136 | 137 | -- Remove quests in progress 138 | for k, quest in ipairs(quests) do 139 | if vk_quests.get_unfinished_quest(pname, quest.qid) then 140 | table.remove(quests, k) 141 | end 142 | end 143 | 144 | if #quests > 0 then 145 | formspec = formspec .. 146 | "hypertext[0,2.2;8,4;comment;\""..comments[math.random(1, #comments)].."\"]" .. 147 | "textlist[0,3.5;8,2.5;quests;" 148 | 149 | pcontext.quests = {} 150 | for _, quest in ipairs(quests) do 151 | table.insert(pcontext.quests, quest.qid) 152 | formspec = ("%s%s - %s,"):format( 153 | formspec, 154 | quest.description, 155 | minetest.formspec_escape(quest.rewards_description) 156 | ) 157 | end 158 | 159 | formspec = formspec:sub(1, -2) -- Remove trailing comma 160 | formspec = formspec .. ";"..pcontext.quest..";false]" 161 | else 162 | formspec = formspec .. "label[0,2.4;\"I don't have any quests for you\"]" 163 | end 164 | else 165 | formspec = formspec .. "label[0,2.4;\"I don't have anything to say\"]" 166 | end 167 | 168 | minetest.show_formspec(pname, "npcform", formspec) 169 | end 170 | 171 | minetest.register_on_player_receive_fields(function(player, formname, fields) 172 | if formname ~= "npcform" or not fields then return end 173 | 174 | local pname = player:get_player_name() 175 | 176 | if not context[pname] then 177 | minetest.log("error", "Player submitted fields without context") 178 | minetest.close_formspec(pname, "npcform") 179 | 180 | return true 181 | end 182 | 183 | local update_form = false 184 | 185 | -- Update selected tab if changed 186 | if fields.convos then 187 | context[pname].tab = tonumber(fields.convos) 188 | 189 | update_form = true 190 | end 191 | 192 | if fields.quests then 193 | local event = minetest.explode_textlist_event(fields.quests) 194 | 195 | if (event.type == "CHG" or event.type == "DCL") and event.index ~= context[pname].quest then 196 | context[pname].quest = event.index 197 | update_form = true 198 | elseif event.type == "DCL" then 199 | vk_quests.start_quest(pname, context[pname].quests[event.index]) 200 | update_form = true 201 | end 202 | end 203 | 204 | if update_form then 205 | vk_quests.show_npc_form(pname, context[pname]) 206 | end 207 | 208 | return true 209 | end) 210 | 211 | register_npc("blacksmith", { 212 | texture = "vk_npcs_blacksmith.png", 213 | hit_replies = default_hit_replies, 214 | }) 215 | 216 | register_npc("stable_man", { 217 | texture = "vk_npcs_stable_man.png", 218 | hit_replies = default_hit_replies, 219 | }) 220 | 221 | register_npc("guard", { 222 | texture = "vk_npcs_guard.png", 223 | hit_replies = default_hit_replies, 224 | convos = { 225 | Quests = { 226 | "kill_spider:spider", 227 | }, 228 | Rumors = { 229 | ["I hear the tavern keeper doesn't actually sell any drinks, she just stands there, staring"] = { 230 | ["Do they pay you money if you win?"] = "You'll have to wait in line, ".. 231 | "they've been having a staring contest with their customers for 3 days now", 232 | ["uhhhhh, bye"] = "Farewell", 233 | } 234 | } 235 | } 236 | }) 237 | 238 | register_npc("tavern_keeper", { 239 | texture = "vk_npcs_tavern_keeper.png", 240 | hit_replies = default_hit_replies, 241 | }) 242 | -------------------------------------------------------------------------------- /mods/hudbars/settingtypes.txt: -------------------------------------------------------------------------------- 1 | [Appearance] 2 | # Specifies how the value indicators (i.e. health, breah, etc.) look. There are 3 styles 3 | # available. You can choose between the default progress-bar-like bars and the good 4 | # old statbars like you know from vanilla Minetest. 5 | # These values are possible: 6 | # - progress_bar: A horizontal progress-bar-like bar with a label, showing numerical value 7 | # (current, maximum), and an icon. These bars usually convey the most 8 | # information. This is the default and recommended value. 9 | # - statbar_classic: Classic statbar, like in vanilla Minetest. Made out of up to 20 10 | # half-symbols. Those bars represent the vague ratio between 11 | # the current value and the maximum value. 1 half-symbol stands for 12 | # approximately 5% of the maximum value. 13 | # - statbar_modern: Like the classic statbar, but also supports background images, this 14 | # kind of statbar may be considered to be more user-friendly than the 15 | # classic statbar. This bar type closely resembles the mod 16 | # “Better HUD” [hud] by BlockMen. 17 | hudbars_bar_type (HUD bars style) enum progress_bar progress_bar,statbar_classic,statbar_modern 18 | 19 | 20 | # If enabled (default), the breath indicators in the HUD will be automatically hidden shortly 21 | # after the breath has been filled up. Otherwise, the breath will always be displayed. 22 | hudbars_autohide_breath (Automatically hide breath indicators) bool true 23 | 24 | # This setting changes the way the HUD bars are ordered on the display. You can choose 25 | # between a zig-zag pattern (default) or a vertically stacked pattern. 26 | # The following values are allowed: 27 | # - zigzag: Starting from the left bottom, the next is right from the first, 28 | # the next is above the first, the next is right of the third, etc. 29 | # - stack_up: The HUD bars are stacked vertically, going upwards. 30 | # - stack_down: The HUD bars are stacked vertically, going downwards. 31 | hudbars_alignment_pattern (HUD bars alignment pattern) enum zigzag zigzag,stack_up,stack_down 32 | 33 | # This setting allows you to specify the order of the HUD bars explicitly. If left empty 34 | # (the default), the health and breath indicators come first, additional indicators 35 | # may appear in any order. This setting is quite technical and normal users probably do not 36 | # need to worry about it. 37 | # 38 | # Syntax: 39 | # The setting has to be specified as a comma-seperated list of key=value pairs, where a key 40 | # refers to the identifier of a HUD bar and the value refers to the slot number of where the 41 | # HUD bar should be placed. The slot number must be an integer greater of equal to 0. Where 42 | # the HUD bars will be displayed exactly depends on the alignment pattern being used. 43 | # All HUD bars to which no order value has been applied will fill in all slots which have 44 | # not been occupied by the HUD bars specified in this setting, the slots will be filled in 45 | # from the lowest slot number. 46 | # Note that the order of those remaining HUD bars is not fixed, it basically just boils 47 | # down on which mod “came” first. Don't worry, the mod will still work perfectly fine, this 48 | # setting is entirely optional. 49 | # The identifier for the health bar is “health” and the identifier for the breath bar is 50 | # “breath”. For other HUD bars, you have to learn it from the mod which is supplying them. 51 | # 52 | # Be careful not to use slot indices twice, or else different HUD bars will be drawn over 53 | # each other! 54 | # 55 | # Example: “breath=0, health=1” 56 | # This makes the breath bar first and the health bar second, which is the opposite order 57 | # of the default one. 58 | hudbars_sorting (HUD bars order) string 59 | 60 | [Positions and offsets] 61 | # Horizontal (x) main position of the HUD bars over the entire screen. 62 | # 0.0 is left-most, 1.0 is right-most. 63 | # For the zig-zag alignment pattern, this is for the left HUD bars. 64 | hudbars_pos_left_x (Left HUD bar screen x position) float 0.5 0.0 1.0 65 | # Vertical (y) main position of the HUD bars over the entire screen. 66 | # 0.0 is top, 1.0 is bottom. 67 | # For the zig-zag alignment pattern, this is for the left HUD bars. 68 | hudbars_pos_left_y (Left HUD bar screen y position) float 1.0 0.0 1.0 69 | # Horizontal (x) main position of the right HUD bars over the entire screen. 70 | # 0.0 is left-most, 1.0 is right-most. 71 | # Only used for the zig-zag alignment pattern. 72 | hudbars_pos_right_x (Right HUD bar screen x position) float 0.5 0.0 1.0 73 | # Vertical main position (y) of the right HUD bars over the entire screen. 74 | # 0.0 is top, 1.0 is bottom. 75 | # Only used for the zig-zag alignment pattern. 76 | hudbars_pos_right_y (Right HUD bar screen y position) float 1.0 0.0 1.0 77 | 78 | # Precise x offset in pixels from the basic screen x position of the HUD bars. 79 | # For the zig-zag alignment pattern, this is for the left HUD bars. 80 | # This setting is used for the progress bar HUD bar style. 81 | hudbars_start_offset_left_x (Left HUD bar x offset) int -175 82 | # Precise y offset in pixels from the basic screen y position of the HUD bars. 83 | # For the zig-zag alignment pattern, this is for the left HUD bars. 84 | # This setting is used for the progress bar HUD bar style. 85 | hudbars_start_offset_left_y (Left HUD bar y offset) int -86 86 | # Precise x offset in pixels from the basic screen x position of the right HUD bars. 87 | # Only used for the zig-zag alignment pattern. 88 | # This setting is used for the progress bar HUD bar style. 89 | hudbars_start_offset_right_x (Right HUD bar x offset) int 15 90 | # Precise y offset in pixels from the basic screen y position of the right HUD bars. 91 | # Only used for the zig-zag alignment pattern. 92 | # This setting is used for the progress bar HUD bar style. 93 | hudbars_start_offset_right_y (Right HUD bar y offset) int -86 94 | 95 | # Precise x offset in pixels from the basic screen x position of the HUD statbars. 96 | # For the zig-zag alignment pattern, this is for the left HUD statbars. 97 | # This setting is used for the classic and modern statbar styles. 98 | hudbars_start_statbar_offset_left_x (Left HUD statbar x offset) int -265 99 | # Precise y offset in pixels from the basic screen y position of the HUD statbars. 100 | # For the zig-zag alignment pattern, this is for the left HUD statbars. 101 | # This setting is used for the classic and modern statbar styles. 102 | hudbars_start_statbar_offset_left_y (Left HUD statbar y offset) int -90 103 | # Precise x offset in pixels from the basic screen x position of the right HUD statbars. 104 | # Only used for the zig-zag alignment pattern. 105 | # This setting is used for the classic and modern statbar styles. 106 | hudbars_start_statbar_offset_right_x (Right HUD statbar x offset) int 25 107 | # Precise y offset in pixels from the basic screen y position of the right HUD statbars. 108 | # Only used for the zig-zag alignment pattern. 109 | # This setting is used for the classic and modern statbar styles. 110 | hudbars_start_statbar_offset_right_y (Right HUD statbar y offset) int -90 111 | 112 | # The vertical distance between two HUD bars, in pixels. 113 | hudbars_vmargin (Vertical distance between HUD bars) int 24 0 114 | 115 | [Performance] 116 | # The of seconds which need to pass before the server updates the default HUD bars 117 | # (health and breath). Increase this number if you have a slow server or a slow network 118 | # connection and experience performance problems. 119 | hudbars_tick (Default HUD bars update interval) float 0.1 0.0 4.0 120 | -------------------------------------------------------------------------------- /mods/rhotator/README.md: -------------------------------------------------------------------------------- 1 | # Rhotator Screwdriver (rhotator) v1.4 2 | 3 | A different twist at Minetest screwdriving. 4 | 5 | Tested on Minetest 0.4.16, 0.4.17 and 5.0.0 (latest dev snapshot) 6 | 7 | If you like my contributions you may consider reading http://entuland.com/en/support-entuland 8 | 9 | WIP MOD forum thread: https://forum.minetest.net/viewtopic.php?f=9&t=20321 10 | 11 | A silly, incomplete and unscripted video presentation of this mod: https://youtu.be/ESTJ9FYGHh4 (about half an hour) 12 | 13 | An update/recap video for version 1.4 https://youtu.be/Z2a1iWJNqgs (five minutes approx) 14 | 15 | # Dependencies 16 | 17 | A thin wrapper around a very useful library to deal with Matrices: 18 | 19 | [matrix] https://github.com/entuland/lua-matrix 20 | 21 | # Important 22 | 23 | From version 1.3 recipes for all crafts can be customized in `custom.recipes.lua` - anytime you're upgrading this mod verify `default/recipes.lua` for new crafts or a different file format and update `custom.recipes.lua` accordingly. 24 | 25 | # Main features 26 | 27 | - for `facedir` and `colorfacedir` nodes: 28 | - rotate any node in a predictable manner regardless its current rotation 29 | - **rotation memory**: optionally, place any new node with the same rotation as the last rotated node or copying the rotation of pointed-to nodes (see the [rotation memory modes](#rotation-memory-modes) section) 30 | 31 | - for `wallmounted` and `colorwallmounted` nodes: 32 | - cycle through valid rotations in the same way as the built-in screwdriver would 33 | 34 | # Why yet another screwdriver? 35 | 36 | The default screwdriver included in minetest_game, as well as any other screwdriver mod I have found, operate differently depending on the node's direction and rotation. This means that any given click on a node may produce different results which you cannot predict at a glance, unless you're perfectly aware of where the node's main axis is pointing to. 37 | 38 | The Rhotator Screwdriver uses a different approach: the direction and orientation of the node make absolutely no difference. 39 | 40 | These are the factors that affect the results of a click: 41 | 42 | - the face you point at 43 | - where on that face you point 44 | - what button you click 45 | - whether or not you hold down the sneak key 46 | 47 | You will always be able to predict exactly the effect of the Rhotator Screwdriver. 48 | 49 | Four consecutive clicks of the same button on the same position will always bring the node back to its original direction / orientation - or even less clicks, if you use the sneak key to invert the rotation direction. 50 | 51 | ### Why is it called "Rhotator" and not "Rotator"? 52 | 53 | In mathematics the greek letter *Rho* is used to indicate some stuff associated to certain types of matrices. Since I'm using matrices to compute the various rotations in the game I thought about including it in the mod's name to reduce the chance of naming conflicts. 54 | 55 | # Appearance 56 | 57 | Here you can see the Rhotator Screwdriver along with the Testing Cube. 58 | 59 | *The testing cube is just an addition to help practicing with this screwdriver.* 60 | 61 | The Rhotator Screwdriver will rotate ANY node where `paramtype2` has any of these values: `facedir, colorfacedir, wallmounted, colorwallmounted`. 62 | 63 | The latter two types are handled exactly as the built-in screwdriver of `minetest_game` handles them. 64 | 65 | ![Preview](/screenshots/preview.png) 66 | 67 | # Usage 68 | 69 | ## Main rhotator screwdrivers 70 | 71 | This is the behavior of the default ![Rhotator Screwdriver](/textures/rhotator.png) `rhotator:screwdriver` tool: 72 | 73 | - a right click will rotate the face you're pointing in clockwise direction 74 | - the arrow in the Testing Cube shows how the face will rotate when right-clicked 75 | - `RT` in the tool stands for `rotate` 76 | - hold the sneak key down while clicking to rotate counter-clockwise 77 | 78 | - a left click will rotate the node as if you "pushed" the closest edge you're pointing at 79 | - the colored edges in the Testing Cube indicate the color of the face you'll see when left-clicking near that edge 80 | - `PS` in the tool stands for `push` 81 | - hold the sneak key down while clicking to "pull" instead of "pushing" 82 | 83 | (an alternative ![Rhotator Screwdriver](/textures/rhotator-alt.png) `rhotator:screwdriver_alt` tool is available with a sligthly different recipe, the buttons swapped and a corresponding texture with `RT` and `PS` swapped as well) 84 | 85 | The `push` interaction area is not limited to the edges you can see in the Testing Cube. In reality you can click anywhere in a triangle like this (highlighted here just for convenience, you won't see anything like this in the game): 86 | 87 | ![Interaction triangle](/screenshots/interaction-triangle.png) 88 | 89 | ## Memory tool 90 | 91 | The Rhotator Memory Tool ![Rhotator Memory Tool](/textures/rhotator-memory.png) `rhotator:memory` allows cycling through the three memory modes with a left click (mnemonic `TG` for `toggle`, in the memory tool) and copying the rotation of an already placed node with the right click (mnemonic `CP` in the memory tool). The sneak key has no effect on the memory tool. 92 | 93 | See also the [rotation memory modes section](#rotation-memory-modes). 94 | 95 | ## Multi tool 96 | 97 | The Rhotator Multi Tool ![Rhotator Multi Tool](/textures/rhotator-multi.png) `rhotator:screwdriver_multi` combines four main features in a single tool: rotating faces clockwise, pushing edges, cycling throuh the memory modes and copying the rotation from a node. The multi tool can be configured to swap buttons around and to invert the effect of the sneak key. You cannot rotate faces counter-clockwise or pull edges with the multi tool. 98 | 99 | See the [commands section](#commands) for details about to configure the multi tool. 100 | 101 | # Non-full nodes 102 | 103 | Nodes that don't occupy a full cube (such as slabs and stairs) can still be rotated properly, it's enough that you pay attention to the direction of the part you're pointing at - the "stomp" parts of the stairs, for example, will behave as the "top" face, the "rise" parts will behave as the "front" face. With the Rhotator Screwdriver there never really is a "top" or a "front" or whatever: the only thing that matters is the face you're pointing at. 104 | 105 | Some nodes have a limited freedom of rotation (wallmounted ones, for instance), some others can't be rotated at all (doors and many default nodes such as sand) 106 | 107 | # Rotation memory modes 108 | 109 | Anytime you rotate a node with the Rhotator Screwdriver the resulting rotation gets stored, and any subsequent nodes you'll place will be rotated according to that rotation (assuming you have rotation memory set to `on`). As exposed above, you can also copy the rotation of an already placed node with the memory tool or the multi tool. 110 | 111 | If instead you set the memory on `auto` the rotation of newly placed nodes will be copied from the node you're aiming to when you place them - this allows for easy continuation of staircases and roofs regardless of their orientation. 112 | 113 | If the memory mode is set to `off` the node will be placed in its default orientation (which may also involve different rotations depending on how that node has been implemented). 114 | 115 | # Crafting 116 | 117 | ## Rhotator Screwdriver 118 | a stick and a copper ingot 119 | 120 | ![Rhotator Screwdriver crafting](/screenshots/rhotator-recipe.png) 121 | 122 | ## Rhotator Screwdriver Alt 123 | two sticks and a copper ingot 124 | 125 | ![Rhotator Screwdriver Alt crafting](/screenshots/rhotator-alt-recipe.png) 126 | 127 | ## Rhotator Multi Tool 128 | four sticks and a copper ingot in a 'plus' pattern 129 | 130 | ![Rhotator Multi Tool crafting](/screenshots/rhotator-multi-recipe.png) 131 | 132 | ## Rhotator Memory Tool 133 | again two sticks and a copper ingot, in a different pattern 134 | 135 | ![Rhotator Memory Tool crafting](/screenshots/rhotator-memory-recipe.png) 136 | 137 | ## Rhotator Testing Cube 138 | any of the screwdriver tools and any wool block 139 | 140 | ![Rhotator Testing Cube crafting](/screenshots/rhotator-cube-recipe.png) 141 | 142 | Recipes can be customized by editing the `custom.recipes.lua` file that gets created in the mods' root folder upon first run. 143 | 144 | # Chat commands 145 | 146 | `/rhotator`: displays this description 147 | 148 | `/rhotator memory [on|off|auto]`: displays or sets rotation memory for newly placed blocks 149 | 150 | `/rhotator multi`: lists the configuration of the multitool 151 | 152 | `/rhotator multi invert_buttons [on|off]`: displays or sets mouse button inversion in the multitool 153 | 154 | `/rhotator multi invert_sneak [on|off]`: displays or sets sneak effect inversion in the multitool 155 | 156 | Rotation memory starts off by default, it gets stored and recalled for each player between different sessions and between server restarts. 157 | 158 | # Usage feedback 159 | 160 | An HUD message will show usage feedback, in particular it will inform about nodes that aren't currently supported. 161 | 162 | Here are possible messages you can receive: 163 | 164 | - Rotated pointed face clockwise 165 | - Rotated pointed face counter-clockwise 166 | - Pushed closest edge 167 | - Pulled closest edge 168 | - Cannot rotate node with paramtype2 == glasslikeliquidlevel 169 | - Unsupported node type: modname:nodename 170 | - Wallmounted node rotated with default screwdriver behavior 171 | 172 | plus some more messages warning about protected areas or rotations performed or prevented by custom on_rotate() handlers. 173 | -------------------------------------------------------------------------------- /mods/hudbars/API.md: -------------------------------------------------------------------------------- 1 | API documentation for the HUD bars mod 2 | ====================================== 3 | 4 | ## Introduction 5 | This API allows you to add, change, hide and unhide custom HUD bars for this mod. 6 | 7 | ## Overview 8 | To give you a *very* brief overview over this API, here is the basic workflow on how to add your own custom HUD bar: 9 | 10 | * Create images for your HUD bar 11 | * Call `hb.register_hudbar` to make the definition of the HUD bar known to this mod 12 | * Call `hb.init_hudbar` for each player for which you want to use previously defined HUD bar 13 | * Use `hb.change_hudbar` whenever you need to change the values of a HUD bar of a certain player 14 | * If you need it: Use `hb.hide_hudbar` and `hb.unhide_hudbar` to hide or unhide HUD bars of a certain player 15 | 16 | ## The basic rules 17 | In order to use this API, you should be aware of a few basic rules in order to understand it: 18 | 19 | * A HUD bar is an approximate graphical representation of the ratio of a current value and a maximum value, i.e. current health of 15 and maximum health of 20. A full HUD bar represents 100%, an empty HUD bar represents 0%. 20 | * The current value must always be equal to or smaller then the maximum 21 | * Both current value and maximum must not be smaller than 0 22 | * Both current value and maximum must be real numbers. So no NaN, infinity, etc. 23 | * The HUD bar will be hidden if the maximum equals 0. This is intentional. 24 | * The health and breath HUD bars are hardcoded. 25 | 26 | These are soft rules, the HUD bars mod will not enforce all of these. 27 | But this mod has been programmed under the assumption that these rules are followed, for integrity. 28 | 29 | ## Adding a HUD bar 30 | To make a new HUD bar known to this mod, you need … 31 | 32 | * … an image of size 2×16 for the bar 33 | * … an icon of size 16×16 (optional) 34 | * … to register it with `hb.register_hudbar` 35 | 36 | ### Bar image 37 | The image for the bar will be repeated horizontally to denote the “value” of the HUD bar. 38 | It **must** be of size 2×16. 39 | If neccessary, the image will be split vertically in half, and only the left half of the image 40 | is displayed. So the final HUD bar will always be displayed on a per-pixel basis. 41 | 42 | The default bar images are single-colored, but you can use other styles as well, for instance, 43 | a vertical gradient. 44 | 45 | ### Icon 46 | A 16×16 image shown left of the HUD bar. This is optional. 47 | 48 | ### `hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string, format_string_config)` 49 | This function registers a new custom HUD bar definition to the HUD bars mod, so it can be later used to be displayed, changed, hidden 50 | and unhidden on a per-player basis. 51 | Note this does not yet display the HUD bar. 52 | 53 | The HUD bars will be displayed in a “first come, first serve” order. This API does not allow fow a custom order or a way to set it 54 | manually in a reliable way. However, you can use the setting `hudbars_sorting` for this. See the advanced setting menu in Minetest 55 | for more information. 56 | 57 | 58 | #### Parameters 59 | * `identifier`: A globally unique internal name for the HUD bar, will be used later to refer to it. Please only rely on alphanumeric characters for now. The identifiers “`health`” and “`breath`” are used internally for the built-in health and breath bar, respectively. Please do not use these names. 60 | * `text_color`: A 3-octet number defining the color of the text. The octets denote, in this order red, green and blue and range from `0x00` (complete lack of this component) to `0xFF` (full intensity of this component). Example: `0xFFFFFF` for white. 61 | * `label`: A string which is displayed on the HUD bar itself to describe the HUD bar. Try to keep this string short. 62 | * `textures`: A table with the following fields: 63 | * `bar`: The file name of the bar image (as string). This is only used for the `progress_bar` bar type (see `README.txt`, settings section). 64 | * `icon`: The file name of the icon, as string. For the `progress_bar` type, it is shown as single image left of the bar, for the two statbar bar types, it is used as the statbar icon and will be repeated. This field can be `nil`, in which case no icon will be used, but this is not recommended, because the HUD bar will be invisible if the one of the statbar bar types is used. 65 | * `bgicon`: The file name of the background icon, it is used as the background for the modern statbar mode only. This field can be `nil`, in which case no background icon will be displayed in this mode. 66 | * `default_start_value`: If this HUD bar is added to a player, and no initial value is specified, this value will be used as initial current value 67 | * `default_max_value`: If this HUD bar is added to a player, and no initial maximum value is specified, this value will be used as initial maximum value 68 | * `default_start_hidden`: The HUD bar will be initially start hidden by default when added to a player. Use `hb.unhide_hudbar` to unhide it. 69 | * `format_string`: Optional; You can specify an alternative format string to use for the final text on the HUD bar. The default format string is “`@1: @2/@3`” (The “@” numbers are placeholders that have a meaning in this order: @1 = Label, @2 = current value, @3 = maximum value). Do *not* use minetest.translator on this string, the string will be translated by `hudbars`, but you still must put this string into the translation catalogue file. 70 | * `format_string_config`: Required if `format_string` is set. This allows to change which parameters to use in the format string. It's a table with these fields: 71 | * `textdomain`: Text domain of the format string, used by `minetest.translate` 72 | * `order`: Table that contains the order of the placeholders. It's also possible to remove placeholders. Default order: `{ "label", "value", "max_value" }` 73 | * `format_value`: Format string to apply when displaying `value`. Syntax is same as in `string.format`. Default: `"%d"` 74 | * `format_max_value`: Same as `format_value` but is applied to `max_value` 75 | 76 | #### Example 77 | Example (mostly) from `hbarmor` mod: 78 | 79 | ``` 80 | hb.register_hudbar("armor", 0xFFFFFF, minetest.translator("hbarmor", "Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } ) 81 | ``` 82 | 83 | Displays an armor HUD bar with a label of the form „Armor: 53%“. (`N` is a dummy function that returns its argument, used to make the string visible for translator scripts.) 84 | 85 | #### Return value 86 | Always `nil`. 87 | 88 | 89 | ## Displaying a HUD bar 90 | After a HUD bar has been registered, they are not yet displayed yet for any player. HUD bars must be 91 | explicitly initialized on a per-player basis. 92 | 93 | You probably want to do this in the `minetest.register_on_joinplayer`. 94 | 95 | ### `hb.init_hudbar(player, identifier, start_value, start_max, start_hidden)` 96 | This function initialzes and activates a previously registered HUD bar and assigns it to a 97 | certain client/player. This has only to be done once per player and after that, you can change 98 | the values using `hb.change_hudbar`. 99 | 100 | However, if `start_hidden` was set to `true` for the HUD bar (in `hb.register_hudbar`), the HUD bar 101 | will initially be hidden, but the HUD elements are still sent to the client. Otherwise, 102 | the HUD bar will be initially be shown to the player. 103 | 104 | #### Parameters 105 | * `player`: `ObjectRef` of the player to which the new HUD bar should be displayed to. 106 | * `identifier`: The identifier of the HUD bar type, as specified in `hb.register_hudbar`. 107 | * `start_value`: The initial current value of the HUD bar. This is optional, `default_start_value` of the registration function will be used, if this is `nil`. 108 | * `start_max`: The initial maximum value of the HUD bar. This is optional, `default_start_max` of the registration function will be used, if this is `nil` 109 | * `start_hidden`: Whether the HUD bar is initially hidden. This is optional, `default_start_hidden` of the registration function will be used as default 110 | 111 | #### Return value 112 | `true` on success, `false` otherwise. 113 | 114 | 115 | ## Modifying a HUD bar 116 | After a HUD bar has been added, you can change the current and maximum value and other attributes on a per-player basis. 117 | You use the function `hb.change_hudbar` for this. 118 | 119 | ### `hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color)` 120 | Changes the values and the appearance of an initialized HUD bar for a certain player. `new_value` 121 | and `new_max_value` are the most important parameters as they specify the new current and maximum new values, you do not need 122 | to worry too much about the other parameters. 123 | 124 | The following parameters are less important and provided for styling the HUD bar after registration (if 125 | this is desired). The “styling” parameters parallel the parameters of `hb.register_hudbar`. It is 126 | recommended to not change the style of a HUD bar too often as this can be distracting or confusing 127 | for players. 128 | 129 | `new_value`, `new_max_value` `new_icon`, `new_bgicon`, `new_bar`, `new_label` and `new_text_color` can be 130 | `nil`; if one of them is `nil`, that means the value is unchanged. If all those values are `nil`, this 131 | function is a no-op. 132 | 133 | This function tries to minimize the amount of calls to `hud_change` of the Minetest Lua API 134 | (and thus, network traffic), when you only change the value and/or maximum value. In this case, 135 | `hud_change` is only called if it is actually needed, e.g. when the actual length of the bar 136 | or the displayed string changed, so you do not have to worry about it. There is, however, no 137 | such network optimization for the “styling” parameters, so keep this in mind. 138 | 139 | #### Parameters 140 | * `player`: `ObjectRef` of the player to which the HUD bar belongs to 141 | * `identifier`: The identifier of the HUD bar type to change, as specified in `hb.register_hudbar`. 142 | * `new_value`: The new current value of the HUD bar 143 | * `new_max_value`: The new maximum value of the HUD bar 144 | * `new_icon`: File name of the new icon 145 | * `new_bgicon`: File name of the new background icon for the modern-style statbar 146 | * `new_bar`: File name of the new bar segment image 147 | * `new_label`: A new text label of the HUD bar. Note the format string still applies 148 | * `new_text_color`: A 3-octet number defining the new color of the text. 149 | 150 | #### Return value 151 | `true` on success, `false` otherwise. 152 | 153 | 154 | ## Hiding and unhiding a HUD bar 155 | You can also hide custom HUD bars, meaning they will not be displayed for a certain player. You can still 156 | use `hb.change_hudbar` on a hidden HUD bar, the new values will be correctly displayed after the HUD bar 157 | has been unhidden. Both functions will only call `hud_change` if there has been an actual change to avoid 158 | unneccessary traffic. 159 | 160 | Note that the hidden state of a HUD bar will *not* be saved by this mod on server shutdown, so you may need 161 | to write your own routines for this or by setting the correct value for `start_hidden` when calling 162 | `hb.init_hudbar`. 163 | 164 | ### `hb.hide_hudbar(player, identifier)` 165 | Hides the specified HUD bar from the screen of the specified player. 166 | 167 | #### Parameters 168 | * `player`: `ObjectRef` of the player to which the HUD bar belongs to 169 | * `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. 170 | 171 | #### Return value 172 | `true` on success, `false` otherwise. 173 | 174 | 175 | ### `hb.unhide_hudbar(player, identifier)` 176 | Makes a previously hidden HUD bar visible again to a player. 177 | 178 | #### Parameters 179 | * `player`: `ObjectRef` of the player to which the HUD bar belongs to 180 | * `identifier`: The identifier of the HUD bar type to unhide, as specified in `hb.register_hudbar`. 181 | 182 | #### Return value 183 | `true` on success, `false` otherwise. 184 | 185 | 186 | ## Reading HUD bar information 187 | It is also possible to read information about existing HUD bars. 188 | 189 | ### `hb.get_hudbar_state(player, identifier)` 190 | Returns the current state of the active player's HUD bar. 191 | 192 | #### Parameters 193 | * `player`: `ObjectRef` of the player to which the HUD bar belongs to 194 | * `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. 195 | 196 | #### Return value 197 | On success, returns a table which holds information on the current state of the HUD bar. Note 198 | the table is a deep copy of the internal HUD bar state, it is *not* a reference; the information 199 | hold by the table is only true for the moment you called this function. The fields of this table are: 200 | 201 | * `value`: Current value of HUD bar. 202 | * `max`: Current maximum value of HUD bar. 203 | * `hidden`: Boolean denoting whether the HUD bar is hidden. 204 | * `barlength`: The length of the HUD bar in pixels. This field is meaningless if the HUD bar is currently hidden. 205 | * `text`: The text shown on the HUD bar. This fiels is meaningless if the HUD bar is currently hidden. 206 | 207 | If the player does not exist, returns `nil` instead. 208 | 209 | ### `hb.get_hudbar_identifiers()` 210 | Returns a table of all currently registered HUD bar identifiers. 211 | -------------------------------------------------------------------------------- /mods/vk_nodes/models/torch.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.80 (sub 75) OBJ File: 'torch.blend' 2 | # www.blender.org 3 | o Cube_Cube.001 4 | v -0.100000 -0.500000 -0.100000 5 | v -0.100000 0.200000 -0.100000 6 | v 0.100000 -0.500000 -0.100000 7 | v 0.100000 0.200000 -0.100000 8 | v -0.100000 -0.500000 0.100000 9 | v -0.100000 0.200000 0.100000 10 | v 0.100000 -0.500000 0.100000 11 | v 0.100000 0.200000 0.100000 12 | v -0.025000 0.200000 -0.025000 13 | v -0.025000 0.275000 -0.025000 14 | v 0.025000 0.200000 -0.025000 15 | v 0.025000 0.275000 -0.025000 16 | v -0.025000 0.200000 0.025000 17 | v -0.025000 0.275000 0.025000 18 | v 0.025000 0.200000 0.025000 19 | v 0.025000 0.275000 0.025000 20 | v -0.070711 0.200000 -0.070711 21 | v 0.070711 0.200000 0.070711 22 | v -0.070711 0.410000 -0.070711 23 | v 0.070711 0.410000 0.070711 24 | v -0.070711 0.200000 0.070711 25 | v 0.070711 0.200000 -0.070711 26 | v -0.070711 0.410000 0.070711 27 | v 0.070711 0.410000 -0.070711 28 | v 0.100000 0.430000 -0.100000 29 | v 0.100000 0.200000 -0.100000 30 | v 0.080000 0.430000 -0.100000 31 | v 0.080000 0.200000 -0.100000 32 | v 0.080000 0.200000 -0.080000 33 | v 0.080000 0.430000 -0.080000 34 | v 0.100000 0.200000 -0.080000 35 | v 0.100000 0.430000 -0.080000 36 | v -0.080000 0.430000 -0.080000 37 | v -0.080000 0.200000 -0.080000 38 | v -0.100000 0.430000 -0.080000 39 | v -0.100000 0.200000 -0.080000 40 | v -0.100000 0.200000 -0.100000 41 | v -0.100000 0.430000 -0.100000 42 | v -0.080000 0.200000 -0.100000 43 | v -0.080000 0.430000 -0.100000 44 | v 0.100000 0.430000 0.100000 45 | v 0.100000 0.200000 0.100000 46 | v 0.080000 0.430000 0.100000 47 | v 0.080000 0.200000 0.100000 48 | v 0.080000 0.200000 0.080000 49 | v 0.080000 0.430000 0.080000 50 | v 0.100000 0.200000 0.080000 51 | v 0.100000 0.430000 0.080000 52 | v -0.080000 0.430000 0.080000 53 | v -0.080000 0.200000 0.080000 54 | v -0.100000 0.430000 0.080000 55 | v -0.100000 0.200000 0.080000 56 | v -0.100000 0.200000 0.100000 57 | v -0.100000 0.430000 0.100000 58 | v -0.080000 0.200000 0.100000 59 | v -0.080000 0.430000 0.100000 60 | v -0.080000 0.400000 -0.080000 61 | v 0.080000 0.400000 -0.080000 62 | v -0.080000 0.380000 -0.080000 63 | v 0.080000 0.380000 -0.080000 64 | v 0.080000 0.380000 -0.100000 65 | v -0.080000 0.380000 -0.100000 66 | v 0.080000 0.400000 -0.100000 67 | v -0.080000 0.400000 -0.100000 68 | v -0.080000 0.280000 -0.080000 69 | v 0.080000 0.280000 -0.080000 70 | v -0.080000 0.260000 -0.080000 71 | v 0.080000 0.260000 -0.080000 72 | v 0.080000 0.260000 -0.100000 73 | v -0.080000 0.260000 -0.100000 74 | v 0.080000 0.280000 -0.100000 75 | v -0.080000 0.280000 -0.100000 76 | v -0.080000 0.400000 0.100000 77 | v 0.080000 0.400000 0.100000 78 | v -0.080000 0.380000 0.100000 79 | v 0.080000 0.380000 0.100000 80 | v 0.080000 0.380000 0.080000 81 | v -0.080000 0.380000 0.080000 82 | v 0.080000 0.400000 0.080000 83 | v -0.080000 0.400000 0.080000 84 | v -0.080000 0.280000 0.100000 85 | v 0.080000 0.280000 0.100000 86 | v -0.080000 0.260000 0.100000 87 | v 0.080000 0.260000 0.100000 88 | v 0.080000 0.260000 0.080000 89 | v -0.080000 0.260000 0.080000 90 | v 0.080000 0.280000 0.080000 91 | v -0.080000 0.280000 0.080000 92 | v 0.100000 0.400000 0.080000 93 | v 0.100000 0.400000 -0.080000 94 | v 0.100000 0.380000 0.080000 95 | v 0.100000 0.380000 -0.080000 96 | v 0.080000 0.380000 -0.080000 97 | v 0.080000 0.380000 0.080000 98 | v 0.080000 0.400000 -0.080000 99 | v 0.080000 0.400000 0.080000 100 | v 0.100000 0.280000 0.080000 101 | v 0.100000 0.280000 -0.080000 102 | v 0.100000 0.260000 0.080000 103 | v 0.100000 0.260000 -0.080000 104 | v 0.080000 0.260000 -0.080000 105 | v 0.080000 0.260000 0.080000 106 | v 0.080000 0.280000 -0.080000 107 | v 0.080000 0.280000 0.080000 108 | v -0.080000 0.400000 0.080000 109 | v -0.080000 0.400000 -0.080000 110 | v -0.080000 0.380000 0.080000 111 | v -0.080000 0.380000 -0.080000 112 | v -0.100000 0.380000 -0.080000 113 | v -0.100000 0.380000 0.080000 114 | v -0.100000 0.400000 -0.080000 115 | v -0.100000 0.400000 0.080000 116 | v -0.080000 0.280000 0.080000 117 | v -0.080000 0.280000 -0.080000 118 | v -0.080000 0.260000 0.080000 119 | v -0.080000 0.260000 -0.080000 120 | v -0.100000 0.260000 -0.080000 121 | v -0.100000 0.260000 0.080000 122 | v -0.100000 0.280000 -0.080000 123 | v -0.100000 0.280000 0.080000 124 | vt 0.500000 1.000000 125 | vt 0.500000 0.500000 126 | vt 0.750000 0.500000 127 | vt 0.750000 1.000000 128 | vt 1.000000 0.500000 129 | vt 1.000000 1.000000 130 | vt 0.500000 1.000000 131 | vt 0.500000 0.500000 132 | vt 0.750000 0.500000 133 | vt 0.750000 1.000000 134 | vt 1.000000 0.500000 135 | vt 1.000000 1.000000 136 | vt 0.750000 1.000000 137 | vt 0.750000 0.500000 138 | vt 0.000000 0.500000 139 | vt 0.500000 0.500000 140 | vt 0.500000 1.000000 141 | vt 0.000000 1.000000 142 | vt 0.000000 0.000000 143 | vt 0.500000 0.000000 144 | vt 0.500000 0.500000 145 | vt 0.000000 0.500000 146 | vt 0.000000 0.000000 147 | vt 0.500000 0.000000 148 | vt 0.500000 0.500000 149 | vt 0.000000 0.500000 150 | vt 0.000000 0.000000 151 | vt 0.500000 0.000000 152 | vt 0.500000 0.500000 153 | vt 0.000000 0.500000 154 | vt 0.000000 0.000000 155 | vt 0.500000 0.000000 156 | vt 0.500000 0.500000 157 | vt 0.000000 0.500000 158 | vt 0.500000 0.000000 159 | vt 1.000000 0.000000 160 | vt 1.000000 0.500000 161 | vt 0.500000 0.500000 162 | vt 0.000000 0.000000 163 | vt 0.000000 0.500000 164 | vt 0.500000 0.000000 165 | vt 1.000000 0.000000 166 | vt 1.000000 0.500000 167 | vt 0.500000 0.500000 168 | vt 0.437500 1.000000 169 | vt 0.437500 0.500000 170 | vt 0.500000 0.500000 171 | vt 0.500000 1.000000 172 | vt 0.000000 1.000000 173 | vt 0.000000 0.500000 174 | vt 0.062500 0.500000 175 | vt 0.062500 1.000000 176 | vt 0.437500 1.000000 177 | vt 0.437500 0.500000 178 | vt 0.500000 0.500000 179 | vt 0.500000 1.000000 180 | vt 0.000000 1.000000 181 | vt 0.000000 0.500000 182 | vt 0.062500 0.500000 183 | vt 0.062500 1.000000 184 | vt 0.000000 0.937500 185 | vt 0.062500 0.937500 186 | vt 0.062500 1.000000 187 | vt 0.000000 1.000000 188 | vt 0.000000 0.937500 189 | vt 0.062500 0.937500 190 | vt 0.062500 1.000000 191 | vt 0.000000 1.000000 192 | vt 0.437500 1.000000 193 | vt 0.437500 0.500000 194 | vt 0.500000 0.500000 195 | vt 0.500000 1.000000 196 | vt 0.000000 1.000000 197 | vt 0.000000 0.500000 198 | vt 0.062500 0.500000 199 | vt 0.062500 1.000000 200 | vt 0.437500 1.000000 201 | vt 0.437500 0.500000 202 | vt 0.500000 0.500000 203 | vt 0.500000 1.000000 204 | vt 0.000000 1.000000 205 | vt 0.000000 0.500000 206 | vt 0.062500 0.500000 207 | vt 0.062500 1.000000 208 | vt 0.000000 0.937500 209 | vt 0.062500 0.937500 210 | vt 0.062500 1.000000 211 | vt 0.000000 1.000000 212 | vt 0.437500 1.000000 213 | vt 0.437500 0.500000 214 | vt 0.500000 0.500000 215 | vt 0.500000 1.000000 216 | vt 0.000000 1.000000 217 | vt 0.000000 0.500000 218 | vt 0.062500 0.500000 219 | vt 0.062500 1.000000 220 | vt 0.437500 1.000000 221 | vt 0.437500 0.500000 222 | vt 0.500000 0.500000 223 | vt 0.500000 1.000000 224 | vt 0.000000 1.000000 225 | vt 0.000000 0.500000 226 | vt 0.062500 0.500000 227 | vt 0.062500 1.000000 228 | vt 0.437500 1.000000 229 | vt 0.437500 0.500000 230 | vt 0.500000 0.500000 231 | vt 0.500000 1.000000 232 | vt 0.000000 1.000000 233 | vt 0.000000 0.500000 234 | vt 0.062500 0.500000 235 | vt 0.062500 1.000000 236 | vt 0.437500 1.000000 237 | vt 0.437500 0.500000 238 | vt 0.500000 0.500000 239 | vt 0.500000 1.000000 240 | vt 0.000000 1.000000 241 | vt 0.000000 0.500000 242 | vt 0.062500 0.500000 243 | vt 0.062500 1.000000 244 | vt 0.000000 0.937500 245 | vt 0.062500 0.937500 246 | vt 0.062500 1.000000 247 | vt 0.000000 1.000000 248 | vt 0.437500 1.000000 249 | vt 0.437500 0.500000 250 | vt 0.500000 0.500000 251 | vt 0.500000 1.000000 252 | vt 0.000000 1.000000 253 | vt 0.000000 0.500000 254 | vt 0.062500 0.500000 255 | vt 0.062500 1.000000 256 | vt 0.000000 1.000000 257 | vt 0.000000 0.500000 258 | vt 0.062500 0.500000 259 | vt 0.062500 1.000000 260 | vt 0.437500 1.000000 261 | vt 0.437500 0.500000 262 | vt 0.500000 0.500000 263 | vt 0.500000 1.000000 264 | vt 0.437500 1.000000 265 | vt 0.437500 0.500000 266 | vt 0.500000 0.500000 267 | vt 0.500000 1.000000 268 | vt 0.000000 1.000000 269 | vt 0.000000 0.500000 270 | vt 0.062500 0.500000 271 | vt 0.062500 1.000000 272 | vt 0.000000 1.000000 273 | vt 0.000000 0.500000 274 | vt 0.062500 0.500000 275 | vt 0.062500 1.000000 276 | vt 0.437500 1.000000 277 | vt 0.437500 0.500000 278 | vt 0.500000 0.500000 279 | vt 0.500000 1.000000 280 | vt 0.437500 1.000000 281 | vt 0.437500 0.500000 282 | vt 0.500000 0.500000 283 | vt 0.500000 1.000000 284 | vt 0.437500 1.000000 285 | vt 0.437500 0.500000 286 | vt 0.500000 0.500000 287 | vt 0.500000 1.000000 288 | vt 0.000000 1.000000 289 | vt 0.000000 0.500000 290 | vt 0.062500 0.500000 291 | vt 0.062500 1.000000 292 | vt 0.000000 1.000000 293 | vt 0.000000 0.500000 294 | vt 0.062500 0.500000 295 | vt 0.062500 1.000000 296 | vt 0.437500 1.000000 297 | vt 0.437500 0.500000 298 | vt 0.500000 0.500000 299 | vt 0.500000 1.000000 300 | vt 0.437500 1.000000 301 | vt 0.437500 0.500000 302 | vt 0.500000 0.500000 303 | vt 0.500000 1.000000 304 | vt 0.000000 1.000000 305 | vt 0.000000 0.500000 306 | vt 0.062500 0.500000 307 | vt 0.062500 1.000000 308 | vt 0.000000 1.000000 309 | vt 0.000000 0.500000 310 | vt 0.062500 0.500000 311 | vt 0.062500 1.000000 312 | vt 0.437500 1.000000 313 | vt 0.437500 0.500000 314 | vt 0.500000 0.500000 315 | vt 0.500000 1.000000 316 | vt 0.437500 1.000000 317 | vt 0.437500 0.500000 318 | vt 0.500000 0.500000 319 | vt 0.500000 1.000000 320 | vt 0.000000 1.000000 321 | vt 0.000000 0.500000 322 | vt 0.062500 0.500000 323 | vt 0.062500 1.000000 324 | vt 0.000000 1.000000 325 | vt 0.000000 0.500000 326 | vt 0.062500 0.500000 327 | vt 0.062500 1.000000 328 | vt 0.437500 1.000000 329 | vt 0.437500 0.500000 330 | vt 0.500000 0.500000 331 | vt 0.500000 1.000000 332 | vt 0.437500 1.000000 333 | vt 0.437500 0.500000 334 | vt 0.500000 0.500000 335 | vt 0.500000 1.000000 336 | vt 0.000000 1.000000 337 | vt 0.000000 0.500000 338 | vt 0.062500 0.500000 339 | vt 0.062500 1.000000 340 | vt 0.000000 1.000000 341 | vt 0.000000 0.500000 342 | vt 0.062500 0.500000 343 | vt 0.062500 1.000000 344 | vt 0.437500 1.000000 345 | vt 0.437500 0.500000 346 | vt 0.500000 0.500000 347 | vt 0.500000 1.000000 348 | vt 0.000000 1.000000 349 | vt 0.000000 0.500000 350 | vt 0.062500 0.500000 351 | vt 0.062500 1.000000 352 | vt 0.000000 1.000000 353 | vt 0.000000 0.500000 354 | vt 0.062500 0.500000 355 | vt 0.062500 1.000000 356 | vt 0.437500 1.000000 357 | vt 0.437500 0.500000 358 | vt 0.500000 0.500000 359 | vt 0.500000 1.000000 360 | vt 0.437500 1.000000 361 | vt 0.437500 0.500000 362 | vt 0.500000 0.500000 363 | vt 0.500000 1.000000 364 | vt 0.000000 1.000000 365 | vt 0.000000 0.500000 366 | vt 0.062500 0.500000 367 | vt 0.062500 1.000000 368 | vt 0.000000 1.000000 369 | vt 0.000000 0.500000 370 | vt 0.062500 0.500000 371 | vt 0.062500 1.000000 372 | vt 0.437500 1.000000 373 | vt 0.437500 0.500000 374 | vt 0.500000 0.500000 375 | vt 0.500000 1.000000 376 | vn 0.0000 0.0000 -1.0000 377 | vn 1.0000 0.0000 0.0000 378 | vn 0.0000 0.0000 1.0000 379 | vn -1.0000 0.0000 0.0000 380 | vn 0.0000 1.0000 0.0000 381 | vn -0.7071 0.0000 0.7071 382 | vn 0.7071 0.0000 0.7071 383 | vn 0.0000 -1.0000 0.0000 384 | s off 385 | f 1/1/1 2/2/1 4/3/1 3/4/1 386 | f 3/4/2 4/3/2 8/5/2 7/6/2 387 | f 7/7/3 8/8/3 6/9/3 5/10/3 388 | f 5/11/4 6/12/4 2/13/4 1/14/4 389 | f 8/15/5 4/16/5 2/17/5 6/18/5 390 | f 9/19/1 10/20/1 12/21/1 11/22/1 391 | f 11/23/2 12/24/2 16/25/2 15/26/2 392 | f 15/27/3 16/28/3 14/29/3 13/30/3 393 | f 13/31/4 14/32/4 10/33/4 9/34/4 394 | f 17/35/6 18/36/6 20/37/6 19/38/6 395 | f 16/39/5 12/24/5 10/33/5 14/40/5 396 | f 21/41/7 22/42/7 24/43/7 23/44/7 397 | f 28/45/1 27/46/1 25/47/1 26/48/1 398 | f 26/49/2 25/50/2 32/51/2 31/52/2 399 | f 31/53/3 32/54/3 30/55/3 29/56/3 400 | f 29/57/4 30/58/4 27/59/4 28/60/4 401 | f 32/61/5 25/62/5 27/63/5 30/64/5 402 | f 33/65/5 40/66/5 38/67/5 35/68/5 403 | f 36/69/4 35/70/4 38/71/4 37/72/4 404 | f 34/73/3 33/74/3 35/75/3 36/76/3 405 | f 39/77/2 40/78/2 33/79/2 34/80/2 406 | f 37/81/1 38/82/1 40/83/1 39/84/1 407 | f 41/85/5 48/86/5 46/87/5 43/88/5 408 | f 44/89/4 43/90/4 46/91/4 45/92/4 409 | f 42/93/3 41/94/3 43/95/3 44/96/3 410 | f 47/97/2 48/98/2 41/99/2 42/100/2 411 | f 45/101/1 46/102/1 48/103/1 47/104/1 412 | f 52/105/1 51/106/1 49/107/1 50/108/1 413 | f 50/109/2 49/110/2 56/111/2 55/112/2 414 | f 55/113/3 56/114/3 54/115/3 53/116/3 415 | f 53/117/4 54/118/4 51/119/4 52/120/4 416 | f 56/121/5 49/122/5 51/123/5 54/124/5 417 | f 60/125/8 59/126/8 62/127/8 61/128/8 418 | f 58/129/3 57/130/3 59/131/3 60/132/3 419 | f 63/133/5 64/134/5 57/135/5 58/136/5 420 | f 61/137/1 62/138/1 64/139/1 63/140/1 421 | f 68/141/8 67/142/8 70/143/8 69/144/8 422 | f 66/145/3 65/146/3 67/147/3 68/148/3 423 | f 71/149/5 72/150/5 65/151/5 66/152/5 424 | f 69/153/1 70/154/1 72/155/1 71/156/1 425 | f 76/157/8 75/158/8 78/159/8 77/160/8 426 | f 74/161/3 73/162/3 75/163/3 76/164/3 427 | f 79/165/5 80/166/5 73/167/5 74/168/5 428 | f 77/169/1 78/170/1 80/171/1 79/172/1 429 | f 84/173/8 83/174/8 86/175/8 85/176/8 430 | f 82/177/3 81/178/3 83/179/3 84/180/3 431 | f 87/181/5 88/182/5 81/183/5 82/184/5 432 | f 85/185/1 86/186/1 88/187/1 87/188/1 433 | f 92/189/8 91/190/8 94/191/8 93/192/8 434 | f 90/193/2 89/194/2 91/195/2 92/196/2 435 | f 95/197/5 96/198/5 89/199/5 90/200/5 436 | f 93/201/4 94/202/4 96/203/4 95/204/4 437 | f 100/205/8 99/206/8 102/207/8 101/208/8 438 | f 98/209/2 97/210/2 99/211/2 100/212/2 439 | f 103/213/5 104/214/5 97/215/5 98/216/5 440 | f 101/217/4 102/218/4 104/219/4 103/220/4 441 | f 108/221/8 107/222/8 110/223/8 109/224/8 442 | f 106/225/2 105/226/2 107/227/2 108/228/2 443 | f 111/229/5 112/230/5 105/231/5 106/232/5 444 | f 109/233/4 110/234/4 112/235/4 111/236/4 445 | f 116/237/8 115/238/8 118/239/8 117/240/8 446 | f 114/241/2 113/242/2 115/243/2 116/244/2 447 | f 119/245/5 120/246/5 113/247/5 114/248/5 448 | f 117/249/4 118/250/4 120/251/4 119/252/4 449 | --------------------------------------------------------------------------------