static void Postfix(StringBuilder sb, TechType techType, GameObject obj) { if (!techType.isGravTrap()) { return; } var objectsType = GravTrapObjectsType.getFrom(obj); objectsType.techTypeListIndex += TypeListSwitcher.getChangeListDir(); TooltipFactory.WriteDescription(sb, objectsType.techTypeListName); }
static void Postfix(StringBuilder sb, TechType techType, GameObject obj) { if (!techType.isGravTrap()) { return; } if (Main.config.useWheelScroll && InputHelper.getMouseWheelValue() != 0f) // not exactly right to do it here, but I didn't find a better way { GravTrapObjectsType.getFrom(obj).techTypeListIndex += Math.Sign(InputHelper.getMouseWheelValue()); } TooltipFactory.WriteDescription(sb, GravTrapObjectsType.getFrom(obj).techTypeListName); }