@@ -85,7 +85,7 @@ def __init__(self, xplaneFile) -> None:
8585
8686 self .reseters = {
8787 "ATTR_light_level" : "ATTR_light_level_reset" ,
88- "ATTR_cockpit|ATTR_cockpit_region " : "ATTR_no_cockpit" ,
88+ "ATTR_cockpit(_lit_only|_region)? " : "ATTR_no_cockpit" ,
8989 "ATTR_manip_(?!none)(?!wheel)(.*)" : "ATTR_manip_none" ,
9090 "ATTR_no_shadow" : "ATTR_shadow" ,
9191 "ATTR_draw_disable" : "ATTR_draw_enable" ,
@@ -329,6 +329,7 @@ def writeReseters(self, xplaneObject: xplane_object.XPlaneObject) -> str:
329329 "ATTR_light_level" ,
330330 "ATTR_light_level_reset" ,
331331 "ATTR_cockpit" ,
332+ "ATTR_cockpit_lit_only" ,
332333 "ATTR_cockpit_region" ,
333334 "ATTR_no_cockpit" ,
334335 "ATTR_draw_disable" ,
@@ -357,20 +358,12 @@ def writeReseters(self, xplaneObject: xplane_object.XPlaneObject) -> str:
357358 # manips) to the attributes.
358359 #
359360 # This way the resetter thinks it doesn't have to reset
360- # because the next object "has" it already.
361+ # because the next XPlaneObject passed in "has" it already.
362+ #
363+ # *
361364 for attr in WHITE_LIST :
362365 attributes .add (xplane_attribute .XPlaneAttribute (attr ))
363366
364- # This is the attributes that the next object will have.
365- #
366- # Comment about the comment: Remember "next object",
367- # can mean self if that is what you passed in. Don't confuse
368- # the comment's sense of tense with how this is currently used in
369- # the exporter. Just remember who xplaneObject is and you'll be fine.
370- #
371- # Comment about the comment about the comment:
372- # The resetter system is so confusing its
373- # good comments also need good comments. Ugh.
374367 attributeNames = sorted (attributes .keys ())
375368
376369 # This is the attributes we have already stated that MIGHT need to be reset.
@@ -384,7 +377,7 @@ def writeReseters(self, xplaneObject: xplane_object.XPlaneObject) -> str:
384377
385378 # Now that the added white list trick is in place,
386379 # we'll nearly always have 2 matching attributes
387- if len (matchingAttribute ) > 2 :
380+ if len (matchingAttribute ) > 3 :
388381 print (
389382 "WARNING: multiple incoming attributes matched %s" % setterPattern
390383 )
0 commit comments