@@ -15,17 +15,18 @@ namespace SER.Code.MethodSystem.Methods.RoomMethods;
1515public class RoomInfoMethod : LiteralValueReturningMethod , IReferenceResolvingMethod
1616{
1717 public Type ReferenceType => typeof ( Room ) ;
18+
1819 public override Type [ ] LiteralReturnTypes => [ typeof ( TextValue ) , typeof ( NumberValue ) ] ;
1920
20- public override string Description => null ! ;
21+ public override string Description => IReferenceResolvingMethod . Desc . Get ( this ) ;
2122
2223 public override Argument [ ] ExpectedArguments { get ; } =
2324 [
2425 new ReferenceArgument < Room > ( "room" ) ,
2526 new OptionsArgument ( "property" ,
26- Option . Enum < RoomShape > ( ) ,
27- Option . Enum < RoomName > ( ) ,
28- Option . Enum < FacilityZone > ( ) ,
27+ Option . Enum < RoomShape > ( "shape" ) ,
28+ Option . Enum < RoomName > ( "name" ) ,
29+ Option . Enum < FacilityZone > ( "zone" ) ,
2930 "xPos" ,
3031 "yPos" ,
3132 "zPos"
@@ -37,9 +38,9 @@ public override void Execute()
3738 var room = Args . GetReference < Room > ( "room" ) ;
3839 ReturnValue = Args . GetOption ( "property" ) switch
3940 {
40- "roomshape " => new TextValue ( room . Shape . ToString ( ) ) ,
41- "roomname " => new TextValue ( room . Name . ToString ( ) ) ,
42- "facilityzone " => new TextValue ( room . Zone . ToString ( ) ) ,
41+ "shape " => new TextValue ( room . Shape . ToString ( ) ) ,
42+ "name " => new TextValue ( room . Name . ToString ( ) ) ,
43+ "zone " => new TextValue ( room . Zone . ToString ( ) ) ,
4344 "xpos" => new NumberValue ( ( decimal ) room . Position . x ) ,
4445 "ypos" => new NumberValue ( ( decimal ) room . Position . y ) ,
4546 "zpos" => new NumberValue ( ( decimal ) room . Position . z ) ,
0 commit comments