It is a matter of style but I'd personally favour one of three approaches
- Put EVERYTHING in on_command {} block. All examine logic for objects AND general location logic goes in here, nowhere else.
- Add a : gosub "examine_messages" ; to the on_command{} block and put everything in a new subroutine called "examine_messages". All examine logic for objects AND general location logic goes in here, nowhere else.
- Put all examine per-object examine logic in the objects definitions themselves, and put all per-location examine logic in the locations themselves.
lamp : object "a lamp" {
start_at = my_location
on_examine {
: print "Hello" ;
: done ;
}
}