LUADOC - Farming Simulator 17

Printable Version

FSUtils

Functions

Utils.cutFruitArea

Description
Cut fruit area
Definition
Utils.cutFruitArea(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean destroySpray, boolean destroySeedingWidth, boolean useMinForageState)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleandestroySpraydestroy spray
booleandestroySeedingWidthdestroy seeding width
booleanuseMinForageStateuse min forange state
Return Values
integerharvestPixelsSumharvest of pixels sum
integerharvestNumPixelsharvest number of pixels
floatsprayFactorspray factor
floatploughFactorplough factor
integergrowthStategrowth state
floatmaxAreamax area

Utils.switchFruitTypeArea

Description
Switch fruit type area
Definition
Utils.switchFruitTypeArea(integer newFruitId, integer maskFruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, integer newValue)
Arguments
integernewFruitIdnew fruit id
integermaskFruitIdmask fruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
integernewValuenew value

Utils.destroyOtherFruit

Description
Destroy other fruit
Definition
Utils.destroyOtherFruit(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z

Utils.getFruitArea

Description
Get fruit area
Definition
Utils.getFruitArea(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean allowPreparing, boolean useMinForageState)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleanallowPreparingallow preparing
booleanuseMinForageStateuse min forage state
Return Values
integerretret
integertotaltotal

Utils.updateRollerArea

Description
Update roller area
Definition
Utils.updateRollerArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
Return Values
integerchangedValuechanged value

Utils.updateCultivatorArea

Description
Update cultivator area
Definition
Utils.updateCultivatorArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean forced, boolean commonForced, float angle)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleanforcedforced
booleancommonForcedcommon forced
floatangleangle
Return Values
integerrealAreareal area changed
integerareaarea changed

Utils.updatePloughArea

Description
Update plough area
Definition
Utils.updatePloughArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean forced, boolean commonForced, float angle)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleanforcedforced
booleancommonForcedcommon forced
floatangleangle
Return Values
integerrealAreareal area changed
integerareaarea changed

Utils.updateDestroyCommonArea

Description
Update destroy common area
Definition
Utils.updateDestroyCommonArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean limitToField)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleanlimitToFieldlimit to field

Utils.updateSprayArea

Description
Update spray area
Definition
Utils.updateSprayArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
Return Values
integernumPixelsnumber of pixels
integertotalNumPixelstotal number of pixels

Utils.updateWeederArea

Description
Update weeder area
Definition
Utils.updateWeederArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
Return Values
integernumPixelsnumber of pixels

Utils.resetSprayArea

Description
Reset spray area
Definition
Utils.resetSprayArea(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, boolean force)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
booleanforceforce

Utils.updateSowingArea

Description
Update sowing area
Definition
Utils.updateSowingArea(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float angle, boolean useDirectPlanting, integer plantValue)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floatangleangle
booleanuseDirectPlantinguse direct planting
integerplantValueplant value
Return Values
integernumPixelsnumber of pixels
integernumDetailPixelsnumber of detail pixels

Utils.updateDirectSowingArea

Description
Update direct sowing area
Definition
Utils.updateDirectSowingArea(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float angle, integer plantValue)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floatangleangle
integerplantValueplant value
Return Values
integerrealAreanumber of pixels real changed
integerareanumber of total pixels

Utils.updateFruitPreparerArea

Description
Update fruit preparer area
Definition
Utils.updateFruitPreparerArea(integer fruitId, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float startDropWorldX, float startDropWorldZ, float widthDropWorldX, float widthDropWorldZ, float heightDropWorldX, float heightDropWorldZ)
Arguments
integerfruitIdfruit id
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floatstartDropWorldXstart drop world X
floatstartDropWorldZstart drop world Z
floatwidthDropWorldXwidth drop world X
floatwidthDropWorldZwidth drop world Z
floatheightDropWorldXheight drop world X
floatheightDropWorldZheight drop world Z
Return Values
integernumChangedPixelsnumber of changed pixels

Utils.removeGroundValueArea

Description
Remove ground value area
Definition
Utils.removeGroundValueArea(integer id, integer firstChannel, integer numChannels, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float valueToLeave)
Arguments
integeridid
integerfirstChannelfirst channel
integernumChannelsnumber of channels
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floatvalueToLeavevalue to leave
Return Values
integervalueRemovedvalue removed
integernumPixelsnumber of pixels

Utils.addGroundValueArea

Description
Add ground value area
Definition
Utils.addGroundValueArea(integer id, integer firstChannel, integer numChannels, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float totalAmount)
Arguments
integeridid
integerfirstChannelfirst channel
integernumChannelsnumber of channels
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floattotalAmounttotal amount
Return Values
integernumAddednumber of added
integernumPixelsnumber of pixels
floatamountPerPixelamount per pixel
floatroundingErrorrounding error

Utils.addGroundValueAreaPerPixel

Description
Add ground value area
Definition
Utils.addGroundValueAreaPerPixel(integer id, integer firstChannel, integer numChannels, float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ, float amountPerPixel)
Arguments
integeridid
integerfirstChannelfirst channel
integernumChannelsnumber of channels
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z
floatamountPerPixelamount per pixel
Return Values
integernumAddednumber of added

Utils.getTireTrackColorFromDensityBits

Description
Returns tire track color from given density bits
Definition
Utils.getTireTrackColorFromDensityBits(integer densityBits)
Arguments
integerdensityBitsdensity bits
Return Values
tablecolortire track color

Utils.eraseTireTrack

Description
Erase tire track on given parallelogram
Definition
Utils.eraseTireTrack(float startWorldX, float startWorldZ, float widthWorldX, float widthWorldZ, float heightWorldX, float heightWorldZ)
Arguments
floatstartWorldXstart world X
floatstartWorldZstart world Z
floatwidthWorldXwidth world X
floatwidthWorldZwidth world Z
floatheightWorldXheight world X
floatheightWorldZheight world Z