Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Herbicide likes for alternate crops? #68

Open
sootysax opened this issue Sep 16, 2015 · 4 comments
Open

Herbicide likes for alternate crops? #68

sootysax opened this issue Sep 16, 2015 · 4 comments
Labels

Comments

@sootysax
Copy link

Wondering if additional undefined crops have a default like/dislike set for herbicides?

The Lakeside Farm map I am playing has Sorghum in addition to Rye, and Oats and am not sure what to spray Sorghum with.

@DeckerMMIV
Copy link
Owner

Check the documentation for the map, if the map-author bothered to make one.

Or, after having the map loaded, check your LOG.TXT and look for the lines:

...
SoilMod: Herbicide avoidance: 'maize' dislikes 'herbicide2' (B)
SoilMod: Herbicide avoidance: 'sugarBeet' dislikes 'herbicide3' (C)
SoilMod: Herbicide avoidance: 'grass' dislikes 'n/a' (-)
SoilMod: Herbicide avoidance: 'dryGrass' dislikes 'n/a' (-)
...

which will tell you, if the map-author has added this to his SampleModMap.LUA script, in the LoadFinished method:

    -- Check that SoilMod v2.x is available...
    if modSoilMod2 ~= nil then
        -- Add/change fruit-type's dislike regarding herbicide-type...
        modSoilMod2.setFruitTypeHerbicideAvoidance("alfalfa", "B")  -- make 'alfalfa' dislike herbicide-B
        modSoilMod2.setFruitTypeHerbicideAvoidance("clover",  "C")  -- make 'clover' dislike herbicide-C
        modSoilMod2.setFruitTypeHerbicideAvoidance("klee",    "-")  -- change 'klee' to not be affected by any of the herbicide types.
    end

@Gonimy-Vetrom
Copy link
Contributor

It should be added before the line self:finishLoadingTask(); as in the version 1.x?

@DeckerMMIV
Copy link
Owner

It can be added after, like so:

function SampleModMap:loadCareerMap01Finished(node, arguments)
[...code omitted...]
    trcScreenFlip();

    if startedRepeat then
        endFrameRepeatMode();
    end
    self:finishLoadingTask();

    -- Check that SoilMod v2.x is available...
    if modSoilMod2 ~= nil then
        -- Add/change fruit-type's dislike regarding herbicide-type...
        modSoilMod2.setFruitTypeHerbicideAvoidance("alfalfa", "B")  -- make 'alfalfa' dislike herbicide-B
        modSoilMod2.setFruitTypeHerbicideAvoidance("clover",  "C")  -- make 'clover' dislike herbicide-C
        modSoilMod2.setFruitTypeHerbicideAvoidance("klee",    "-")  -- change 'klee' to not be affected by any of the herbicide types.
        --modSoilMod2.setFruitTypeHerbicideAvoidance("rape",    "-")
    end
end;

@Gonimy-Vetrom
Copy link
Contributor

Thank you. I added the hops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants