Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New mesh door models, and extensive door API
This patch replaces the default door nodes with a new mesh model and nodes. Two new models were added that are 2 blocks high. One for left-hinge and one for right-hinge doors. This allows us to make a single texture fit on both models. The alternative would have been 1 model and 2 unmapped textures, which is more work for mod developers. Doors work exactly like the old doors, including ownership, breaking doors, opening and closing. Under the hood, we can prevent the top part of the door from being obstructed by placing an invisible node. This prevents liquids from flowing through doors or people placing sand or other blocks in the top half. The door code automatically places and removes these as needed. Metadata is used to store door state, just like the old version. A doors API is added, it allows mods to use the API to open/close or toggle door states without worrying about sounds, permissions and other details. This is intended for e.g. mesecons. This API allows mods to manipulate or inspect doors for players or for themselves. In-game old door nodes are automatically converted using an ABM and preserve ownership and orientation and state. TNT blows up all doors and trapdoors except for the steel ones, who can survive a blast. We return an itemstack in on_blast(), which requires a TNT API patch which is also pending. We enable backface culling for most of these doors, as this gives the identical visual appearance that the old doors had. In the case of the glass door, there's a slight twist. The texture files used by the new doors have new names that do not conflict with previous texture file names to avoid texture pack conflicts. Thanks to red-001 <red-001@users.noreply.github.com> for some of the conversion code, cleanups, and extra textures.
- Loading branch information
f600a9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a great update, only if it wouldn't break all other mods what are using doors, will be there some solution for it ? (protector, messecon door, mydoors) Messecon doors where complaining also about some textures missing/renamed.
2016-02-14 00:13:02: ERROR[main]: ========== ERROR FROM LUA =========== 2016-02-14 00:13:02: ERROR[main]: Failed to load and run script from 2016-02-14 00:13:02: ERROR[main]: /root/.minetest/mods/protector/init.lua: 2016-02-14 00:13:02: ERROR[main]: /root/.minetest/mods/protector/doors_chest.lua:45: attempt to call field 'register_door' (a nil value) 2016-02-14 00:13:02: ERROR[main]: stack traceback: 2016-02-14 00:13:02: ERROR[main]: /root/.minetest/mods/protector/doors_chest.lua:45: in main chunk 2016-02-14 00:13:02: ERROR[main]: [C]: in function 'dofile' 2016-02-14 00:13:02: ERROR[main]: /root/.minetest/mods/protector/init.lua:532: in main chunk 2016-02-14 00:13:02: ERROR[main]: ======= END OF ERROR FROM LUA ======== 2016-02-14 00:13:02: ERROR[main]: Server: Failed to load and run /root/.minetest/mods/protector/init.lua
f600a9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fixed mydoor mod and i found your commit in messecon mod - thanks a lot ;)