Menu

#4510 [Stendhal] Can't set a reject message for doors

closed-out-of-date
nobody
None
5
2012-07-25
2010-03-28
No

<implementation
class-name="games.stendhal.server.entity.mapstuff.portal.KeyDestroyingDoor">
<parameter name="class">headstone</parameter>
<parameter name="key">carbuncle</parameter>
<parameter name="rejected">The tombstone needs a gem to unlock it.
</parameter>
</implementation>
But the rejected message is always 'The door is closed'

Please help me with Door:

games.stendhal.server.entity.mapstuff.portal.Door.
There are Doors which you can give a reject message to.

But using xml to set the rejected message does not work for Doors like the Key Destroying Door.

Lets look at two possible reasons please:
I have never understood, why, since Door extends AccessCheckingPortal, the relevant Factories don't extend in this way
(but for example LevelCheckingPortal which extends AccessCheckingPortal does have LevelCheckingPortalFactory extends AccessCheckingPortalFactory)

If I try to make DoorFactory extend AccessCheckingPortalFactory:
Just changing that line and making it extend doesn't change anything for me.
Adding in some kind of
@Override
protected AccessCheckingPortal createPortal(final ConfigurableFactoryContext ctx) {
return new Door(getClass(ctx));
}
at the end would make sense based on other files but Door cannot be instantiated...

Anyway moving on, lets not worry about all that, it might not even be the problem ..

Maybe it is that LockedDoor which extends Door doesn't respect the reject message at all? you can't tell a LockedDoor what the reject message is? (I guess I mean that no constructor for LockedDoor takes rejectMessage as parameter.)

So since all the Doors I am using, extend LockedDoor, not just Door, I can't set a reject message?

Discussion

  • Katie Russell

    Katie Russell - 2010-08-04

    *bump* - kymara, remember to check if this is closed

     
  • Kimmo Rundelin

    Kimmo Rundelin - 2012-07-25
    • status: open --> closed-out-of-date
     

Anonymous
Anonymous

Add attachments
Cancel