Jump to content

destroyed plants in custom maps [40.43]


Snakeman

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:

screenshot_04-05-2019_18-43-02.png

Edited by Snakeman
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...