maartenl / Land-of-Karchan

Where one can change into a hero with a single swipe of his sword.
http://www.karchan.org
GNU General Public License v3.0
7 stars 3 forks source link

Locking and Unlocking Rooms #216

Closed wastedshame closed 1 year ago

wastedshame commented 1 year ago

...is broken!

I wondered if this was something that needed to be corrected on our end, but then I noticed open and close cupboard in The Twisted Dwarf doesn't work either, so I came here to report the bug.

We desperately need this for locked rooms or rooms that are discoverable through adventuring. Also, the way we made ships in game operational was through the ability to lock and unlock rooms. Every ship in game is broken, along with certain rooms with features that require rooms to open or close for various purposes.

This is very important. :(

If it is an easy fix, I would appreciate some guidance on the matter. Not all of the new changes are obvious to us on how to fix/correct, so a little snippet here or there would be amazing and save us a lot of struggle.

Thank you.

maartenl commented 1 year ago

Hello, there.

Well, it would help if there'd be some explanation on the changes required, wouldn't it? :) Well, if you are in the "methods" section of the admin, there's a "help" menu option, showing you some info. I plan on expanding this help when needed. The main issue here is that getter and setter methods must be used nowadays, and properties are no longer directly accessible.

So, open cupboard and close cupboard stopped working, and I fixed it.

The following things I had to fix: close_cupboard: person.getRoom().description = mydescription; person.getRoom().picture = "/images/gif/herberg1.gif"; hiddenroom.getSouth() = null; SHOULD BE person.getRoom().setDescription(mydescription); person.getRoom().setPicture("/images/gif/herberg1.gif"); hiddenroom.setSouth(null);

Do look at the error message, it usually explains the property that is failing. But sometimes not. :(

maartenl commented 1 year ago

Closing this.