JakobTischler / MoreRealisticDLCs

A lua/xml project that adds MoreRealistic to the Farming Simulator DLCs
8 stars 0 forks source link

movingTools vs. movingParts #82

Open JakobTischler opened 9 years ago

JakobTischler commented 9 years ago

@quadural: I'm sure you remember how you updated my RealisticMovingTool script to use the Cylindered.updateMovingPart function. My question here is: why the hell does this work with movingTools? I've looked into the Cylindered.lua, and Cylindered.updateMovingPart is only called for movingParts. MovingTools on the other hand call Cylindered.updateComponentJoints directly.

Since updateComponentJoints() is called for both movingParts and movingTools, couldn't we attach our stuff to that function, in order to handle both types?

quadural commented 9 years ago

@JakobTischler

  1. i think most of the time, movingtools have dependant movingPart (or the contrary ?) anyway, when updating a movingTool, there is a high chance a "movingPart" is also updated. I think this is the reason why it works in our case.
  2. why not ? just try it and see if this is ok for our stuff (ursus loader only ?) we have to make sure the "powerConsumption" script is not triggered if not needed (example : trailer support)