Skip to content

Commit

Permalink
GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jos-Modding authored Nov 12, 2024
0 parents commit 60ccc4f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
Binary file added icon_CropManager.dds
Binary file not shown.
23 changes: 23 additions & 0 deletions modDesc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="92">
<author>Jos</author>
<translators>Noraf, Miguel, Darindul</translators>
<version>1.0.0.0</version>
<title>
<en>Extended Straw Crops</en>
<de>Erweiterte Strohkulturen</de>
</title>
<description>
<en><![CDATA[Canola, Corn, Sorghum, Soybean, Sunflower, and Long Grain Rice give straw when harvesting.]]></en>
<de><![CDATA[Raps, Mais, Sorghum, Sojabohnen, Sonnenblumen, und Long Grain Rice liefern bei der Ernte Stroh.]]></de>
<nl><![CDATA[Koolzaad, Maïs, Sorghum, Sojabonen, Zonnenbloemen en Langkorrelige Rijst geven nu stro bij het oogsten.]]></nl>
<es><![CDATA[La Canola, Maiz, Sorgo, Soja, el Girasol y el Arroz de Grano Largo dan paja durante la cosecha.]]></es>
<no><![CDATA[Raps, Mais, Durra, Soyabønner, Solsikker og Langkornet ris gir halm når de blir høstet.]]></no>
<pl><![CDATA[Rzepak, kukurydza, sorgo, soja, słoneczniki i ryż długoziarnisty będą produkować słomę podczas zbiorów.]]></pl>
</description>
<iconFilename>icon_CropManager.dds</iconFilename>
<multiplayer supported="true" />
<extraSourceFiles>
<sourceFile filename="src/main.lua" />
</extraSourceFiles>
</modDesc>
32 changes: 32 additions & 0 deletions src/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ExtendedStrawCrops = {
CATEGORIES = "GRAINHEADER MAIZEHEADER"
}

-- To be reworked to a menu to toggle crops and add more crop features.
function ExtendedStrawCrops:loadMap(filename)
local fruitTypes = g_fruitTypeManager:getFruitTypesByCategoryNames(ExtendedStrawCrops.CATEGORIES)

for _, fruitType in pairs(fruitTypes) do
if fruitType.hasWindrow == nil then
g_fruitTypeManager.fruitTypes[fruitType.index].hasWindrow = true
g_fruitTypeManager.fruitTypes[fruitType.index].windrowName = "STRAW"
g_fruitTypeManager.fruitTypes[fruitType.index].windrowLiterPerSqm = 3.68
g_fruitTypeManager.fillTypeIndexToFruitTypeIndex[g_fillTypeManager:getFillTypeIndexByName("STRAW")] = fruitType.index
g_fruitTypeManager.fruitTypeIndexToWindrowFillTypeIndex[fruitType.index] = g_fillTypeManager:getFillTypeIndexByName("STRAW")
end
end
end

function ExtendedStrawCrops:mouseEvent(posX, posY, isDown, isUp, button)
end

function ExtendedStrawCrops:keyEvent(unicode, sym, modifier, isDown)
end

function ExtendedStrawCrops:update(dt)
end

function ExtendedStrawCrops:draw()
end

addModEventListener(ExtendedStrawCrops)

1 comment on commit 60ccc4f

@CreativeAR308
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey is it possible to add the actual straw dds files for each of the crops, not so much wheat, but sorghum, sorbeans, corn, canola, rice, and oat

Please sign in to comment.