;; props by default only have a 'get-prop read-only action handler;
;; any coordination of setting a prop between actors must be
;; added to that actor, to keep things from getting out of control.
;; props by default only have a 'get-prop read-only action handler;
;; any coordination of setting a prop between actors must be
;; added to that actor, to keep things from getting out of control.
;; gameobjs may inherit an initial list of these via the
;; initial-props slot, which must always have its
;; gameobjs may inherit an initial list of these via the
;; initial-props slot, which must always have its
;; The vanilla gameobj has no props, on purpose.
(initial-props #:allocation #:each-subclass
;; The vanilla gameobj has no props, on purpose.
(initial-props #:allocation #:each-subclass
(define props (slot-ref gameobj 'props))
(maybe-build-rmeta-slot-cache! class 'initial-props
eq? hashq-set! hashq-ref)
(define props (slot-ref gameobj 'props))
(maybe-build-rmeta-slot-cache! class 'initial-props
eq? hashq-set! hashq-ref)
- (hashq-set! props key value))
- (rmeta-slot-table (class-slot-ref class 'initial-props))))
+ (when (not (hashq-ref props key value)) ; don't override init'ed instance values
+ (hashq-set! props key value)))
+ (rmeta-slot-cache (class-slot-ref class 'initial-props))))