@@ -17,17 +17,17 @@ public abstract class ExaminableObject : Examinable {
17
17
* Provides a callback for handling examination of this object.
18
18
*/
19
19
public var examination: Examination = {
20
- var description = it.description.getDescription()
20
+ var description = it.examinable. description.getDescription()
21
21
22
- if (it.commands.any()) {
22
+ if (it.examinable. commands.any()) {
23
23
if (description != " " ) {
24
24
description + = " "
25
25
}
26
26
27
27
val newline = NEWLINE
28
- description + = " $newline$newline${it.identifier.name} provides the following commands: "
28
+ description + = " $newline$newline${it.examinable. identifier.name} provides the following commands: "
29
29
30
- it.commands.forEach { command ->
30
+ it.examinable. commands.forEach { command ->
31
31
description + = " $newline \" ${command.commandHelp.command} \" - " +
32
32
" ${command.commandHelp.description.removeSentenceEnd()} , "
33
33
}
@@ -39,15 +39,15 @@ public abstract class ExaminableObject : Examinable {
39
39
}
40
40
41
41
if (description == " " ) {
42
- description = it.identifier.name
42
+ description = it.examinable. identifier.name
43
43
}
44
44
45
45
if (description == " " ) {
46
- description = it::class .simpleName.toString()
46
+ description = it.examinable ::class .simpleName.toString()
47
47
}
48
48
49
49
if (attributes.count > 0 ) {
50
- description + = " \n\n " + StringUtilities .getAttributesAsString(it.attributes.toMap())
50
+ description + = " \n\n " + StringUtilities .getAttributesAsString(it.examinable. attributes.toMap())
51
51
}
52
52
53
53
ExaminationResult (description)
@@ -66,8 +66,8 @@ public abstract class ExaminableObject : Examinable {
66
66
67
67
override var commands: List <CustomCommand > = emptyList()
68
68
69
- override fun examine (): ExaminationResult {
70
- return examination(this )
69
+ override fun examine (scene : ExaminationScene ): ExaminationResult {
70
+ return examination(ExaminationRequest ( this , scene) )
71
71
}
72
72
73
73
override var isPlayerVisible: Boolean = true
0 commit comments