Jump to content

destroyed plants in custom maps [40.43]

Recommended Posts

Well, making a mod update i discover a basegame bug.
When a custom map have a destroyed plant tile, gives error.
The way to solve that comes from MOFarming.lua located in media\lua\server\Map\MapObjects
Function "NewDestroyed(isoObject)":
There is a line (42) that called:
ISPlant.initModData(modData) - this line needs to be changed to SPlantGlobalObject.initModData(modData)
and in the end of the function needs to add
modData.typeOfSeed = typeOfSeed to set properly the icon when players open the farminginfo window.

Also there is the same "ISPlant.initModData(modData)" inside of function NewPlow(isoObject) - (Line 33)
Needs to be changed also to SPlantGlobalObject.initModData(modData).

I patched it in my mod to see if it works.
Image that proves that patch working:


Edited by Snakeman

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...