minetest-mods / xdecor

A decoration mod for Minetest meant to be light, simple and well-featured
Other
29 stars 46 forks source link

Add nil check #126

Closed LizzyFleckenstein03 closed 4 years ago

LizzyFleckenstein03 commented 4 years ago

Add nil check to prevent errors xdecor causes with pkarcs_doors. Fixes #124

SmallJoker commented 4 years ago

I think it would be a better approach to implement the toggle function using the pkarcs_doors functions, so that they can be opened and closed using the xdecor API.

https://github.com/TumeniNodes/pkarcs/blob/cb850cb5c73842dd09a7bd35d16e7bbc42d05d70/pkarcs_doors/init.lua#L119-L136

EDIT: Never mind. xdecor expects all door-group nodes to be registered using the doors API, which is not guaranteed. Looks good :+1: