Rewrite portcullis mechanics again, fixes #4