1 ;; Keys are a bit unusual in that each unique key must be a unique object
2 ;; type. This is because player inventory consists only of object types, not
3 ;; instances, and to use a key it must be in player inventory.
5 (define (mk-key-type tag name sprite)
9 (let ((ktarg (ui-target (kern-obj-get-location kuser)
11 (mk-ifc-query 'use-key))))
15 (ifccall ktarg 'use-key ktype)
21 ;; List all the key types. This doesn't *need* to be done here, but like any
22 ;; type, it must be done in a file that is kern-loaded, which means it can't be
23 ;; done in a place file. So by convention let's list them here.
24 (mk-key-type 't_brundegardt_tower_4_key "weathered key" s_picklock)
25 (mk-key-type 't_stewardess_chest_key "shiny key" s_picklock)