<commit_before>require("base.common")

module("scheduled.gaia", package.seeall)

-- INSERT INTO scheduledscripts VALUES('scheduled.gaia', 10, 10, 'plantdrop');

function AddPlant(ItemID,Ground,Frequenz,Season,Datawert)
    table.insert(plnt,ItemID);
    table.insert(grnd,Ground);
    table.insert(freq,Frequenz);
    table.insert(seas,Season);
    table.insert(dataval,Datawert);
end

function Init()
    plnt = {};
    grnd = {};
    freq = {};
    seas = {};
    dataval= {};
    AddPlant(132,{4},1,{10,10,10,10},0);  -- Kirschsetzling
    AddPlant(139,{4},1,{10,10,10,10},0);  -- Apfelsetzling
	AddPlant(150,{2},1,{10,10,10,10},0);  -- Tannensetzling
	AddPlant(152,{4},1,{10,10,10,10},0);  -- Lebenswurzel
	AddPlant(588,{4},1,{10,10,10,10},0);  -- Cachdernsetzling
	AddPlant(589,{2,4},1,{10,10,10,10},0);  -- Eldan-Eichensetzling
	AddPlant(590,{2},1,{10,10,10,10},0);  -- Scandrel-Setzling
	AddPlant(591,{2,4},1,{10,10,10,10},0);  -- Naldorbaumsetzling
	AddPlant(752,{3},1,{10,10,10,10},0);  -- Alraune
	AddPlant(756,{2},1,{10,10,10,10},0);  -- Frommbeere
	AddPlant(757,{2},1,{10,10,10,10},0);  -- Gottesblume
	AddPlant(758,{2},1,{10,10,10,10},0);  -- Herzblut
	AddPlant(764,{3},1,{10,10,10,10},0);  -- Tagteufel
	AddPlant(765,{2},1,{10,10,10,10},0);  -- Tagtraum
	AddPlant(766,{4,7},1,{10,10,10,10},0);  -- Trugblte
	AddPlant(769,{3},1,{10,10,10,10},0);  -- Wstenbeere
    
       	
    -- 0 alle / 1 Acker / 2 Wald / 3 Sand / 4 Wiese / 5 Fels / 6 Wasser / 7 Dreck

    anz_pflanzen = table.getn(plnt);
    anz_voraussetzungen = table.getn(grnd);
end

function plantdrop()
    if ( plnt==nil ) then
        Init();
    end
	if (world:isCharacterOnField(position(0,15,0))) then
			--user = world:getCharacterOnField( position(0,15,0) );
		end

    local season=math.ceil( world:getTime("month") / 4 );
    season = base.common.Limit( season, 1, 4 );
    local spawn_amm = 15;
    if (season == 1) then --Frhling
        spawn_amm = 40;
    elseif (season == 2) then --Sommer
        spawn_amm = 40;
    elseif (season == 3) then --Herbst
        spawn_amm = 40;
    elseif (season == 4) then --Winter
        spawn_amm = 40;
    end<commit_msg>debugging<commit_after>require("base.common")

module("scheduled.gaia", package.seeall)

-- INSERT INTO scheduledscripts VALUES('scheduled.gaia', 10, 10, 'plantdrop');

function AddPlant(ItemID,Ground,Frequenz,Season,Datawert)
    table.insert(plnt,ItemID);
    table.insert(grnd,Ground);
    table.insert(freq,Frequenz);
    table.insert(seas,Season);
    table.insert(dataval,Datawert);
end

function Init()
    plnt = {};
    grnd = {};
    freq = {};
    seas = {};
    dataval= {};
    AddPlant(132,{4},1,{10,10,10,10},0);  -- Kirschsetzling
    AddPlant(139,{4},1,{10,10,10,10},0);  -- Apfelsetzling
	AddPlant(150,{2},1,{10,10,10,10},0);  -- Tannensetzling
	AddPlant(152,{4},1,{10,10,10,10},0);  -- Lebenswurzel
	AddPlant(588,{4},1,{10,10,10,10},0);  -- Cachdernsetzling
	AddPlant(589,{2,4},1,{10,10,10,10},0);  -- Eldan-Eichensetzling
	AddPlant(590,{2},1,{10,10,10,10},0);  -- Scandrel-Setzling
	AddPlant(591,{2,4},1,{10,10,10,10},0);  -- Naldorbaumsetzling
	AddPlant(752,{3},1,{10,10,10,10},0);  -- Alraune
	AddPlant(756,{2},1,{10,10,10,10},0);  -- Frommbeere
	AddPlant(757,{2},1,{10,10,10,10},0);  -- Gottesblume
	AddPlant(758,{2},1,{10,10,10,10},0);  -- Herzblut
	AddPlant(764,{3},1,{10,10,10,10},0);  -- Tagteufel
	AddPlant(765,{2},1,{10,10,10,10},0);  -- Tagtraum
	AddPlant(766,{4,7},1,{10,10,10,10},0);  -- Trugblte
	AddPlant(769,{3},1,{10,10,10,10},0);  -- Wstenbeere
    
       	
    -- 0 alle / 1 Acker / 2 Wald / 3 Sand / 4 Wiese / 5 Fels / 6 Wasser / 7 Dreck

    anz_pflanzen = table.getn(plnt);
    anz_voraussetzungen = table.getn(grnd);
end

function plantdrop()
    if ( plnt==nil ) then
        Init();
    end
	if (world:isCharacterOnField(position(0,15,0))) then
			user = world:getCharacterOnField( position(0,15,0) );
		end

    local season=math.ceil( world:getTime("month") / 4 );
    season = base.common.Limit( season, 1, 4 );
    local spawn_amm = 15;
    if (season == 1) then --Frhling
        spawn_amm = 40;
    elseif (season == 2) then --Sommer
        spawn_amm = 40;
    elseif (season == 3) then --Herbst
        spawn_amm = 40;
    elseif (season == 4) then --Winter
        spawn_amm = 40;
    end
{'fraction_non_alphanumeric': 0.20606060606060606, 'fraction_numerical': 0.12307692307692308, 'mean_word_length': 3.751937984496124, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3992813', 'n_tokens_mistral': 2157, 'n_tokens_neox': 1836, 'n_words': 265}