/* ** j###t ########## #### #### ** j###t ########## #### #### ** j###T "###L J###" ** ######P' ########## ######### ** ######k, ########## T######T ** ####~###L #### ** #### q###L ########## .##### ** #### \###L ########## #####" */ package key.talker.objects; import key.*; import java.util.Enumeration; import java.util.StringTokenizer; import java.util.Vector; import java.io.*; /** * Prop. * * A simple class that has no behaviour, only a particular appearance, * just like a stage prop. */ public class Prop extends Material implements Thing { public static final AtomicElement[] ELEMENTS = { AtomicElement.construct( Prop.class, Paragraph.class, "description", AtomicElement.PUBLIC_FIELD, "the message sent to a person who looks at the object" ), AtomicElement.construct( Prop.class, String.class, "fullPortrait", AtomicElement.PUBLIC_FIELD, "a short description of the object" ), }; public static final AtomicStructure STRUCTURE = new AtomicStructure( Atom.STRUCTURE, ELEMENTS ); public Paragraph description = new TextParagraph( "A tiny grain of sand" ); public String fullPortrait = "tiny grain of sand"; public Prop() { } public AtomicStructure getDeclaredStructure() { return( STRUCTURE ); } public Paragraph getDescription() { return( description ); } public void look( Player p, StringTokenizer args, InteractiveConnection ic, Flags flags, Atom item ) { ic.send( description ); } public String getFullPortrait( Player p ) { return( fullPortrait ); } }