2015-05-01 18:04:03 +02:00
|
|
|
|
2015-05-01 18:10:43 +02:00
|
|
|
handle_schematics = {}
|
2015-05-01 18:04:03 +02:00
|
|
|
|
|
|
|
handle_schematics.modpath = minetest.get_modpath( "handle_schematics");
|
|
|
|
|
|
|
|
-- adds worldedit_file.* namespace
|
|
|
|
-- deserialize worldedit savefiles
|
|
|
|
dofile(handle_schematics.modpath.."/worldedit_file.lua")
|
|
|
|
|
|
|
|
-- uses handle_schematics.* namespace
|
|
|
|
-- reads and analyzes .mts files (minetest schematics)
|
|
|
|
dofile(handle_schematics.modpath.."/analyze_mts_file.lua")
|
|
|
|
-- reads and analyzes worldedit files
|
|
|
|
dofile(handle_schematics.modpath.."/analyze_we_file.lua")
|
|
|
|
-- handles rotation and mirroring
|
|
|
|
dofile(handle_schematics.modpath.."/rotate.lua")
|
|
|
|
-- count nodes, take param2 into account for rotation etc.
|
|
|
|
dofile(handle_schematics.modpath.."/handle_schematics_misc.lua")
|
|
|
|
|
|
|
|
-- uses replacements_group.* namespace
|
|
|
|
-- these functions are responsible for the optional dependencies; they check
|
|
|
|
-- which nodes are available and may be offered as possible replacements
|
|
|
|
replacements_group = {};
|
|
|
|
dofile(handle_schematics.modpath.."/replacements_wood.lua")
|
|
|
|
dofile(handle_schematics.modpath.."/replacements_realtest.lua")
|
|
|
|
dofile(handle_schematics.modpath.."/replacements_farming.lua")
|
|
|
|
dofile(handle_schematics.modpath.."/replacements_roof.lua")
|
|
|
|
|
|
|
|
-- transforms the replacement list into a table;
|
|
|
|
-- also creates a replacement if needed and replaces default:torch
|
|
|
|
dofile(handle_schematics.modpath.."/replacements_get_table.lua")
|
|
|
|
|
|
|
|
-- uses build_chest.* namespace
|
|
|
|
-- a chest for spawning buildings manually
|
|
|
|
dofile(handle_schematics.modpath.."/build_chest.lua")
|
|
|
|
-- makes the replacements from replacements_group.* available to the build chest
|
|
|
|
dofile(handle_schematics.modpath.."/build_chest_handle_replacements.lua");
|
|
|
|
-- creates 2d previews of the schematic from left/right/back/front/top
|
|
|
|
dofile(handle_schematics.modpath.."/build_chest_preview_image.lua");
|
|
|
|
-- reads a file and adds the files listed there as menu entries
|
|
|
|
dofile(handle_schematics.modpath.."/build_chest_add_schems_from_file.lua");
|
|
|
|
|
|
|
|
-- chooses traders and spawn positions for buildings
|
|
|
|
dofile(handle_schematics.modpath.."/village_traders.lua")
|
|
|
|
|
|
|
|
-- the main functionality of the mod;
|
|
|
|
-- provides the function handle_schematics.place_building_from_file
|
|
|
|
-- (and also place_buildings for mg_villages)
|
|
|
|
dofile(handle_schematics.modpath.."/place_buildings.lua")
|
|
|
|
|
|
|
|
-- dofile(handle_schematics.modpath.."/fill_chest.lua")
|