diff options
-rw-r--r-- | README | 54 | ||||
-rw-r--r-- | crafts.lua | 3 | ||||
-rw-r--r-- | docs/README | 2 | ||||
-rw-r--r-- | docs/celevator_controller_manual.pdf | bin | 2193128 -> 2192852 bytes | |||
-rw-r--r-- | laptop.lua | 24 | ||||
-rw-r--r-- | screenshot.png | bin | 0 -> 236634 bytes |
6 files changed, 81 insertions, 2 deletions
@@ -0,0 +1,54 @@ +celevator +Fully functional realistic elevators for Luanti/Minetest (5.7+) +=============================================================== + +Description +----------- + +Adds fully functional, realistic elevators capable of moving players between multiple floors in a building. + +Features include: + + 2 to 100 floors with customizable names + Travel speed adjustable for each elevator independently, up to 20m/s (more than 7.5m/s not recommended in multiplayer) + Can travel through loaded or unloaded mapblocks + Full selective-collective operation + Group dispatching with up to 16 cars in a group and true ETA dispatching + Optional destination-based dispatching + Swing car operation + Animated doors, hoist machine, and tapehead + Controller interface with diagnostic LEDs, display, and GUI configuration + Optional car call security settings (require area access to place a car call, or disallow car calls to a specific floor entirely) + Functional independent service and fire service phase I and II (approximately following ASME A17.1 codes) modes + Car top and machine room inspection operation with adjustable speed + Adjustable door dwell and nudging timers + mView remote monitoring software (optional, available if "laptop" mod is installed) + Mesecons input and output modules (optional, available if "mesecons" mod is installed) + Communication with Luacontrollers via digilines input/output modules (optional, available if "digilines" mod is installed) + +Documentation +------------- + +Documentation is located in the "docs" subdirectory. +See "docs/celevator_controller_manual.pdf" for full installation and setup instructions. + +Contributing +------------ + +If you would like to contribute code, the easiest way is to publish your changes somewhere and request that I pull them. +I can be reached on Libera.Chat in #luanti as "cheapie", or you can contact me via ContentDB or the Luanti forums (same username). +If you don't have anywhere to publish your changes, I can also accept patches. + +Reporting Issues +---------------- + +See the previous "Contributing" section for contact information. +You are encouraged to report any issues you have to me using any of those contact methods. +If you just have a question or you're not sure if something is a bug, IRC is probably the easiest method. + +License +------- + +This software is offered under The Unlicense. +See the LICENSE file for the full license text. +If you do use this code for something I'd love to hear what it is, but you're not required to tell me. @@ -29,6 +29,9 @@ if not xcompat_available then m.mese = "mesecons_torch:redstoneblock" -- mcla still carries this as an alias m.pick_steel = "mcl_core:pick_steel" m.torch = "mcl_torches:torch" + else + minetest.log("warning","[celevator] Unsupported game and xcompat not found, not registering craft recipes") + return end if minetest.get_modpath("dye") then m.dye_black = "dye:black" diff --git a/docs/README b/docs/README index 4928bef..a53637c 100644 --- a/docs/README +++ b/docs/README @@ -1,2 +1,4 @@ Source for celevator_controller_manual.pdf is not included in this repository due to its large size. If desired, the file can be downloaded from: https://cheapiesystems.com/media/celevator_controller_manual.odt + +This isn't the README for the whole project, go up one folder for that. diff --git a/docs/celevator_controller_manual.pdf b/docs/celevator_controller_manual.pdf Binary files differindex 2da5ca1..0bca94b 100644 --- a/docs/celevator_controller_manual.pdf +++ b/docs/celevator_controller_manual.pdf @@ -61,6 +61,10 @@ laptop.register_app("celevator",{ fs = fs..mtos.theme:get_label("0.5,1","Could not find a controller or dispatcher with the given ID.") fs = fs..mtos.theme:get_label("0.5,1.3","Please check the ID number and try again.") fs = fs..mtos.theme:get_button("0.5,3;2,1","major","ok","OK") + elseif ram.screenstate == "protected" then + fs = fs..mtos.theme:get_label("0.5,0.5","Error") + fs = fs..mtos.theme:get_label("0.5,1","Controller or dispatcher is protected.") + fs = fs..mtos.theme:get_button("0.5,3;2,1","major","ok","OK") elseif ram.screenstate == "dispatcherstatus" then local connection = mem.connections[mem.selectedconnection] local pos = connection.pos @@ -201,6 +205,7 @@ laptop.register_app("celevator",{ indep = "Independent Service", capture = "Captured", test = "Test Mode", + swing = "Swing Operation", } local doorstates = { open = "Open", @@ -331,10 +336,16 @@ laptop.register_app("celevator",{ mem.screenpage = 1 if exp.type == "DCL" then mem.selectedconnection = #mem.connections-exp.index+1 end local connection = mem.connections[mem.selectedconnection] - if connection.itemtype == "controller" and celevator.controller.iscontroller(connection.pos) then + local cpos = connection.pos + if minetest.is_protected(cpos,mtos.sysram.current_player) and not minetest.check_player_privs(mtos.sysram.current_player,{protection_bypass=true}) then + minetest.record_protection_violation(cpos,mtos.sysram.current_player) + ram.screenstate = "protected" + return + end + if connection.itemtype == "controller" and celevator.controller.iscontroller(cpos) then ram.screenstate = "controllerstatus" app:get_timer():start(0.2) - elseif connection.itemtype == "dispatcher" and celevator.dispatcher.isdispatcher(connection.pos) then + elseif connection.itemtype == "dispatcher" and celevator.dispatcher.isdispatcher(cpos) then ram.screenstate = "dispatcherstatus" app:get_timer():start(0.2) else @@ -365,6 +376,11 @@ laptop.register_app("celevator",{ ram.screenstate = "notfound" return end + if minetest.is_protected(pos,mtos.sysram.current_player) and not minetest.check_player_privs(mtos.sysram.current_player,{protection_bypass=true}) then + minetest.record_protection_violation(pos,mtos.sysram.current_player) + ram.screenstate = "protected" + return + end local connection = { name = fields.name, carid = carid, @@ -381,6 +397,10 @@ laptop.register_app("celevator",{ if fields.ok then ram.screenstate = "newconnection" end + elseif ram.screenstate == "protected" then + if fields.ok then + ram.screenstate = #mem.connections > 0 and "connections" or "newconnection" + end elseif ram.screenstate == "dispatcherstatus" then if fields.disconnect then ram.screenstate = "connections" diff --git a/screenshot.png b/screenshot.png Binary files differnew file mode 100644 index 0000000..907df06 --- /dev/null +++ b/screenshot.png |