Skip to content

SensorLenses

Vanilla game class representing the sensor-lens visor equipment item. Derives from PowerTool, so it reaches Item through PowerTool, Tool and ItemRenamable rather than directly. Vanilla ships with 2 Sensor Processing Unit (SPU) slots but only one active Sensor field.

Inheritance

SensorLenses : PowerTool : Tool : ItemRenamable : Item : DynamicThing : Thing. The first four are in namespace Assets.Scripts.Objects.Items, the last three in Assets.Scripts.Objects. Declarations in the 0.2.6428.27798 decompile:

  • public class SensorLenses : PowerTool (360753)
  • public class PowerTool : Tool, IBatteryPowered, IPowered, IDensePoolable, IReferencable, IEvaluable, ILogicable (359621)
  • public class Tool : ItemRenamable, IShowBuildStateTooltip (362823)
  • public class ItemRenamable : Item, IRepairable (346217)
  • public class Item : DynamicThing, IPerishable, IDensePoolable, ITradable, IEvaluable (310851)
  • public class DynamicThing : Thing, IComparable<DynamicThing>, IPhysical, IProfile, IDensePoolable, IWeatherDamagable, ILodRequester, IReferencable, IEvaluable, IThreadable (304205)

None of SensorLenses, PowerTool, Tool or ItemRenamable declares or overrides BuildUpdate, ProcessUpdate, SerializeOnJoin or DeserializeOnJoin. The nearest declarations are the public override methods on Item: BuildUpdate (311486), ProcessUpdate (311495), SerializeOnJoin (311504) and DeserializeOnJoin (311510).

SensorLenses overrides none of the save methods either. The nearest are PowerTool.InitialiseSaveData (359686) and PowerTool.DeserializeSave (359755), which call the base method and then only reset the Activate interactable state, and DynamicThing.SerializeSave (305490).

A Harmony patch that resolves one of these methods through typeof(SensorLenses) therefore lands on the base-class method body named above, which other classes share; see HarmonyInheritedMethods.

Fields

Source: F0113, re-checked against the 0.2.6428.27798 decompile (class body 360753-360866).

  • Sensor field ([ReadOnly] public SensorProcessingUnit Sensor;, 360755-360756): the currently-active SensorProcessingUnit. Set in OnChildEnterInventory to whatever chip enters (360833-360841). Cleared in OnChildExitInventory only when the chip leaving is the current Sensor (360843-360851). Not networked (no delta update, no join payload, no save): the network and save methods it inherits are listed under Inheritance, and none of them is overridden below Item to carry it.
  • OnOff: power toggle. Networked through Interactable.State. Thing.OnOff (324183) reads InteractOnOff.State == 1 when the Thing has an on/off state and no base animator (otherwise the base animator's OnOffState integer), and Thing.BuildUpdate writes dirty interactable states through BuildInteractableUpdate (328292, 328330).
  • Vanilla ships with 2 SPU slots. Only one chip is expected; the Sensor field has no cycling logic. The slot count is prefab data, which the decompile does not show, so it was not re-checked at 0.2.6428.27798; the absence of cycling logic was.

Verification history

  • 2026-04-20: page created from the Research migration; verbatim content lifted from F0113. No conflicts.
  • 2026-09-22: conflict on "base-class chain and the kind of Sensor member". Previous claim: SensorLenses "Inherits from Item (via DynamicThing)" and Sensor is a property (F0113, Plans/EquipmentPlus/RESEARCH.md:162-166, a file since removed and readable with git show ee6d798e:Plans/EquipmentPlus/RESEARCH.md). New finding: SensorLenses : PowerTool (360753), PowerTool : Tool (359621), Tool : ItemRenamable (362823), ItemRenamable : Item (346217); none of the four overrides BuildUpdate or ProcessUpdate; Sensor is a public field. Fresh validator verdict: B is correct on all three parts (the previous source made no claim on the second), checked against the 0.2.6428.27798 decompile and the installed DLL's metadata. Result: intro corrected; new "Inheritance" section; "Fields" re-checked against the 0.2.6428.27798 decompile and restamped, with the inheritance bullet moved to the new section, "property" corrected to "field", line citations and the OnChildExitInventory behavior added, and the SPU slot count marked as prefab data the decompile does not show.

Open questions

None at creation.