Vision 5e doesn't use the DetectionModeBasicSight and DetectionModeLightPerception classes as base for Darkvision and Light Perception. So it's necessary for compatibility to patch CONFIG.Canvas.detectionsModes.basicSight and CONFIG.Canvas.detectionsModes.lightPerception instead. Patching paths starting with "CONFIG." needs to occur after all init hooks have run considering any module might extend the CONFIG classes. Doing it in a setup hook would work with the exception of document class patches like CONFIG.Actor.documentClass: it would be too later for those. This way should work for "CONFIG." document class patches too:
Partially related to #83.
Vision 5e doesn't use the
DetectionModeBasicSight
andDetectionModeLightPerception
classes as base for Darkvision and Light Perception. So it's necessary for compatibility to patchCONFIG.Canvas.detectionsModes.basicSight
andCONFIG.Canvas.detectionsModes.lightPerception
instead. Patching paths starting with "CONFIG." needs to occur after allinit
hooks have run considering any module might extend the CONFIG classes. Doing it in asetup
hook would work with the exception of document class patches likeCONFIG.Actor.documentClass
: it would be too later for those. This way should work for "CONFIG." document class patches too: