<commit_before>function GetPluginSettings() {
    return {
        "name": "Cocoon Ads",
        "id": "ATPAds",
        "version": "1.0",
        "description": "Cocoon plugin for Ads",
        "author": "Ludei",
        "help url": "http://cocoon.io",
        "category": "Platform specific",
        "type": "object", // not in layout
        "rotatable": false,
        "flags": pf_singleglobal
    };
};

/**
 * Conditions
 */

// Banners
AddCondition(0, cf_trigger, "On banner shown", "Banners", "On banner shown", "Triggered when a banner is shown.", "onBannerShown");

// AddCondition(1, cf_none, "Is showing banner", "Banners", "Is showing banner", "True if currently showing a banner ad.", "isShowingBanner");

AddCondition(2, cf_trigger, "On banner clicked", "Banners", "On banner clicked", "Triggered when a banner is clicked.", "onBannerClicked");

AddCondition(3, cf_trigger, "On banner loaded", "Banners", "On banner loaded", "Triggered when a new banner ad is cached.", "onBannerLoaded");

AddCondition(4, cf_trigger, "On banner failed", "Banners", "On banner failed", "Triggered when a banner fails to load.", "onBannerFailed");

AddCondition(5, cf_trigger, "On banner dismissed", "Banners", "On banner dismissed", "Triggered when a new banner is collapsed after showing its modal content.", "onBannerDismissed");

// Interstitials
AddCondition(6, cf_trigger, "On interstitial shown", "Interstitials", "On interstitial shown", "Triggered when an interstitial is shown.", "onInterstitialShown");

AddCondition(7, cf_trigger, "On interstitial clicked", "Interstitials", "On interstitial clicked", "Triggered when an interstitial is clicked.", "onInterstitialClicked");

AddCondition(8, cf_trigger, "On interstitial loaded", "Interstitials", "On interstitial loaded", "Triggered when an new interstitial ad is cached.", "onInterstitialLoaded");

AddCondition(9, cf_trigger, "On interstitial failed", "Interstitials", "On interstitial failed", "Triggered when an interstitial fails to load.", "onInterstitialFailed");

AddCondition(10, cf_trigger, "On interstitial dismissed", "Interstitials", "On interstitial dismissed", "Triggered when an new interstitial is dismissed.", "onInterstitialDismissed");

AddCondition(11, cf_none, "Is showing interstitial", "Interstitials", "Is showing interstitial", "True if currently showing a interstitial.", "isShowingInterstitial");

/**
 * Actions
 */

// Banners

// Layout 
AddComboParamOption("TOP_CENTER");
AddComboParamOption("BOTTOM_CENTER");
AddComboParamOption("CUSTOM");
AddComboParam("Layout", "Choose where the banner ad will appear.");
AddAction(4, af_none, "Set banner layout", "Banners", "Set banner layout", "Set banner layout. If CUSTOM, 'set banner position' can be called afterwards.", "SetLayout");

// Position 
AddNumberParam("x", "The top lef x coordinate of the banner.");
AddNumberParam("y", "The top lef y coordinate of the banner.");
AddAction(5, af_none, "Set banner position", "Banners", "Set banner position", "Set banner position given the x{0} and y{1} coordinates. It requires the CUSTOM layout (see 'set banner layout')", "SetPosition");

// Show
AddAction(6, af_none, "Show banner", "Banners", "Show the banner ad", "Show a banner ad on the screen while the game is running.", "ShowBanner");

// Hide
AddAction(7, af_none, "Hide banner", "Banners", "Hide the banner ad", "Hide any currently showing banner ad.", "HideBanner");

// Load 
AddAction(8, af_none, "Load banner", "Banners", "Load a banner ad", "Start loading a banner ad in the background.", "LoadBanner");

// Interstitials

// Show
AddAction(12, af_none, "Show interstitial", "Interstitials", "Show the interstitial", "Show an interstitial on the screen while the game is running.", "ShowInterstitial");

// Load 
AddAction(13, af_none, "Load interstitial", "Interstitials", "Load an interstitial", "Start loading an interstitial in the background.", "LoadInterstitial");

ACESDone();

/**
 * Plugin properties
 */

var property_list = [
    new cr.Property(ept_section, "Android", "", "Ad unit IDs for Android."),

    new cr.Property(ept_text, "App ID (Android)", "", "Application ID from admob or mopub for the banner ad."),
    new cr.Property(ept_text, "Banner ID (Android)", "", "Ad unit ID from admob or mopub for the banner ad."),
    new cr.Property(ept_combo, "Banner size (Android)", "SMART", "The size of the banner ad to display", "SMART|BANNER|MEDIUM_RECT|LEADERBOARD"),
    new cr.Property(ept_text, "Interstitial ID (Android)", "", "Ad unit ID from admob or mopub for the interstitials."),
    new cr.Property(ept_text, "Rewarded Video ID (Android)", "", "Ad unit ID from admob or mopub for the rewarded videos."),
    new cr.Property(ept_text, "Personalized Ads consent (Android)", "false", "Wether or not the user has given consent to show personalized Ads", "true|false"),

    new cr.Property(ept_section, "iOS", "", "Ad unit IDs for iOS."),
    new cr.Property(ept_text, "App ID (iOS)", "", "Application ID from admob or mopub for the banner ad."),
    new cr.Property(ept_text, "Banner ID (iOS)", "", "Ad unit ID admob or mopub for the banner ad."),
    new cr.Property(ept_combo, "Banner size (iOS)", "SMART", "The size of the banner ad to display", "SMART|BANNER|MEDIUM_RECT|LEADERBOARD"),<commit_msg>Added edit time parameters for rewarded videos<commit_after>function GetPluginSettings() {
    return {
        "name": "Cocoon Ads",
        "id": "ATPAds",
        "version": "1.0",
        "description": "Cocoon plugin for Ads",
        "author": "Ludei",
        "help url": "http://cocoon.io",
        "category": "Platform specific",
        "type": "object", // not in layout
        "rotatable": false,
        "flags": pf_singleglobal
    };
};

/**
 * Conditions
 */

// Banners
AddCondition(0, cf_trigger, "On banner shown", "Banners", "On banner shown", "Triggered when a banner is shown.", "onBannerShown");

// AddCondition(1, cf_none, "Is showing banner", "Banners", "Is showing banner", "True if currently showing a banner ad.", "isShowingBanner");

AddCondition(2, cf_trigger, "On banner clicked", "Banners", "On banner clicked", "Triggered when a banner is clicked.", "onBannerClicked");

AddCondition(3, cf_trigger, "On banner loaded", "Banners", "On banner loaded", "Triggered when a new banner ad is cached.", "onBannerLoaded");

AddCondition(4, cf_trigger, "On banner failed", "Banners", "On banner failed", "Triggered when a banner fails to load.", "onBannerFailed");

AddCondition(5, cf_trigger, "On banner dismissed", "Banners", "On banner dismissed", "Triggered when a new banner is collapsed after showing its modal content.", "onBannerDismissed");

// Interstitials
AddCondition(6, cf_trigger, "On interstitial shown", "Interstitials", "On interstitial shown", "Triggered when an interstitial is shown.", "onInterstitialShown");

AddCondition(7, cf_trigger, "On interstitial clicked", "Interstitials", "On interstitial clicked", "Triggered when an interstitial is clicked.", "onInterstitialClicked");

AddCondition(8, cf_trigger, "On interstitial loaded", "Interstitials", "On interstitial loaded", "Triggered when an new interstitial ad is cached.", "onInterstitialLoaded");

AddCondition(9, cf_trigger, "On interstitial failed", "Interstitials", "On interstitial failed", "Triggered when an interstitial fails to load.", "onInterstitialFailed");

AddCondition(10, cf_trigger, "On interstitial dismissed", "Interstitials", "On interstitial dismissed", "Triggered when an new interstitial is dismissed.", "onInterstitialDismissed");

AddCondition(11, cf_none, "Is showing interstitial", "Interstitials", "Is showing interstitial", "True if currently showing a interstitial.", "isShowingInterstitial");

// Rewarded
AddCondition(12, cf_trigger, "On rewarded shown", "Rewarded", "On rewarded shown", "Triggered when an rewarded is shown.", "onRewardedShown");

AddCondition(13, cf_trigger, "On rewarded reward", "Rewarded", "On rewarded reward", "Triggered when an rewarded is rewarding.", "onReward");

AddCondition(14, cf_trigger, "On rewarded loaded", "Rewarded", "On rewarded loaded", "Triggered when an new rewarded ad is cached.", "onRewardedLoaded");

AddCondition(15, cf_trigger, "On rewarded failed", "Rewarded", "On rewarded failed", "Triggered when an rewarded fails to load.", "onRewardedFailed");

AddCondition(16, cf_trigger, "On rewarded dismissed", "Rewarded", "On rewarded dismissed", "Triggered when an new rewarded is dismissed.", "onRewardedDismissed");

AddCondition(17, cf_none, "Is showing rewarded", "Rewarded", "Is showing rewarded", "True if currently showing a rewarded.", "isShowingRewarded");

/**
 * Actions
 */

// Banners

// Layout 
AddComboParamOption("TOP_CENTER");
AddComboParamOption("BOTTOM_CENTER");
AddComboParamOption("CUSTOM");
AddComboParam("Layout", "Choose where the banner ad will appear.");
AddAction(4, af_none, "Set banner layout", "Banners", "Set banner layout", "Set banner layout. If CUSTOM, 'set banner position' can be called afterwards.", "SetLayout");

// Position 
AddNumberParam("x", "The top lef x coordinate of the banner.");
AddNumberParam("y", "The top lef y coordinate of the banner.");
AddAction(5, af_none, "Set banner position", "Banners", "Set banner position", "Set banner position given the x{0} and y{1} coordinates. It requires the CUSTOM layout (see 'set banner layout')", "SetPosition");

// Show
AddAction(6, af_none, "Show banner", "Banners", "Show the banner ad", "Show a banner ad on the screen while the game is running.", "ShowBanner");

// Hide
AddAction(7, af_none, "Hide banner", "Banners", "Hide the banner ad", "Hide any currently showing banner ad.", "HideBanner");

// Load 
AddAction(8, af_none, "Load banner", "Banners", "Load a banner ad", "Start loading a banner ad in the background.", "LoadBanner");

// Interstitials

// Show
AddAction(12, af_none, "Show interstitial", "Interstitials", "Show the interstitial", "Show an interstitial on the screen while the game is running.", "ShowInterstitial");

// Load
AddAction(13, af_none, "Load interstitial", "Interstitials", "Load an interstitial", "Start loading an interstitial in the background.", "LoadInterstitial");

// Rewarded

// Show
AddAction(14, af_none, "Show rewarded", "Rewarded", "Show the rewarded", "Show a rewarded video on the screen while the game is running.", "ShowRewarded");

// Load
AddAction(15, af_none, "Load rewarded", "Rewarded", "Load a rewarded", "Start loading a rewarded video in the background.", "LoadRewarded");

ACESDone();

/**
 * Plugin properties
 */

var property_list = [
    new cr.Property(ept_section, "Android", "", "Ad unit IDs for Android."),

    new cr.Property(ept_text, "App ID (Android)", "", "Application ID from admob or mopub for the banner ad."),
    new cr.Property(ept_text, "Banner ID (Android)", "", "Ad unit ID from admob or mopub for the banner ad."),
    new cr.Property(ept_combo, "Banner size (Android)", "SMART", "The size of the banner ad to display", "SMART|BANNER|MEDIUM_RECT|LEADERBOARD"),
    new cr.Property(ept_text, "Interstitial ID (Android)", "", "Ad unit ID from admob or mopub for the interstitials."),
    new cr.Property(ept_text, "Rewarded Video ID (Android)", "", "Ad unit ID from admob or mopub for the rewarded videos."),
    new cr.Property(ept_text, "Personalized Ads consent (Android)", "false", "Wether or not the user has given consent to show personalized Ads", "true|false"),

    new cr.Property(ept_section, "iOS", "", "Ad unit IDs for iOS."),
    new cr.Property(ept_text, "App ID (iOS)", "", "Application ID from admob or mopub for the banner ad."),
    new cr.Property(ept_text, "Banner ID (iOS)", "", "Ad unit ID admob or mopub for the banner ad."),
    new cr.Property(ept_combo, "Banner size (iOS)", "SMART", "The size of the banner ad to display", "SMART|BANNER|MEDIUM_RECT|LEADERBOARD"),
{'fraction_non_alphanumeric': 0.1391613121406831, 'fraction_numerical': 0.005918160297598918, 'mean_word_length': 5.177023498694517, 'pattern_counts': {'":': 20, '<': 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': '6588699', 'n_tokens_mistral': 3818, 'n_tokens_neox': 3453, 'n_words': 1319}