Chargement du reste de cette comparaison.

Untitled diff

Créé Le diff n'expire jamais
68 suppressions
549 lignes
77 ajouts
556 lignes
// #define DEBUG
// #define DEBUG


using Rust;
using Rust;
using System;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Text;
using System.Text;
using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine;
using Oxide.Core.Plugins;
using Oxide.Core.Plugins;
using Random = System.Random;
using Random = System.Random;


namespace Oxide.Plugins
namespace Oxide.Plugins
{
{
[Info("BetterLoot", "playrust.io / dcode", "1.9.7", ResourceId = 828)]
[Info("BetterLoot", "playrust.io / dcode", "1.9.7", ResourceId = 828)]
public class BetterLoot : RustPlugin
public class BetterLoot : RustPlugin
{
{
// To configure, use config/BetterLoot.json instead
// To configure, use config/BetterLoot.json instead
#region Configuration
#region Configuration


private double defaultBlueprintProbability = 0.11;
private double defaultBlueprintProbability = 0.11;
private int defaultMinItemsPerBarrel = 1;
private int defaultMinItemsPerBarrel = 1;
private int defaultMaxItemsPerBarrel = 3;
private int defaultMaxItemsPerBarrel = 3;
private int defaultMinItemsPerCrate = 3;
private int defaultMinItemsPerCrate = 3;
private int defaultMaxItemsPerCrate = 6;
private int defaultMaxItemsPerCrate = 6;
private double defaultBaseItemRarity = 2;
private double defaultBaseItemRarity = 2;
private double defaultBaseBlueprintRarity = 2;
private double defaultBaseBlueprintRarity = 2;
private int defaultRefreshMinutes = 15;
private int defaultRefreshMinutes = 15;
private bool defaultEnforceBlacklist = false;
private bool defaultEnforceBlacklist = false;
private bool defaultDropWeaponsWithAmmo = true;
private bool defaultDropWeaponsWithAmmo = true;
private Dictionary<string, int> defaultDropLimits = new Dictionary<string, int>() {
private Dictionary<string, int> defaultDropLimits = new Dictionary<string, int>() {
// Blueprint items
// Blueprint items
{ "blueprint_fragment", 1 },
{ "blueprint_fragment", 60 },
{ "blueprint_library", 1 },
{ "blueprint_library", 1 },
{ "blueprint_page", 1 },
{ "blueprint_page", 1 },
{ "blueprint_book", 1 },
{ "blueprint_book", 1 },
// Ammunition
// Ammunition
{ "ammo.handmade.shell", 32 },
{ "ammo.handmade.shell", 32 },
{ "ammo.pistol", 32 },
{ "ammo.pistol", 32 },
{ "ammo.pistol.fire", 8 },
{ "ammo.pistol.fire", 8 },
{ "ammo.pistol.hv", 8 },
{ "ammo.pistol.hv", 8 },
{ "ammo.rifle", 32 },
{ "ammo.rifle", 32 },
{ "ammo.rifle.explosive", 8 },
{ "ammo.rifle.explosive", 8 },
{ "ammo.rifle.hv", 8 },
{ "ammo.rifle.hv", 8 },
{ "ammo.rifle.incendiary", 8 },
{ "ammo.rifle.incendiary", 8 },
{ "ammo.rocket.basic", 3 },
{ "ammo.rocket.basic", 3 },
{ "ammo.rocket.fire", 1 },
{ "ammo.rocket.fire", 1 },
{ "ammo.rocket.hv", 1 },
{ "ammo.rocket.hv", 1 },
{ "ammo.shotgun", 32 },
{ "ammo.shotgun", 32 },
{ "ammo.shotgun.slug", 16 },
{ "ammo.shotgun.slug", 16 },
{ "arrow.hv", 8 },
{ "arrow.hv", 8 },
{ "arrow.wooden", 16 },
{ "arrow.wooden", 16 },
{ "gunpowder", 200 },
{ "gunpowder", 200 },
// Explosives
// Explosives
{ "explosive.timed", 2 },
{ "explosive.timed", 2 },
{ "explosives", 50 },
{ "explosives", 50 },
// Animal parts
// Animal parts
{ "bone.fragments", 200 },
{ "bone.fragments", 200 },
{ "cloth", 200 },
{ "cloth", 200 },
{ "fat.animal", 200 },
{ "fat.animal", 200 },
{ "lowgradefuel", 200 },
{ "lowgradefuel", 200 },
// Medical
// Medical
{ "antiradpills", 5 },
{ "antiradpills", 5 },
{ "bandage", 5 },
{ "bandage", 5 },
{ "blood", 200 },
{ "blood", 200 },
{ "largemedkit", 2 },
{ "largemedkit", 2 },
// Resources
// Resources
{ "hq.metal.ore", 500 },
{ "hq.metal.ore", 500 },
{ "metal.fragments", 1000 },
{ "metal.fragments", 1000 },
{ "metal.ore", 1000 },
{ "metal.ore", 1000 },
{ "stones", 1000 },
{ "stones", 1000 },
{ "sulfur", 1000 },
{ "sulfur", 1000 },
{ "sulfur.ore", 1000 },
{ "sulfur.ore", 1000 },
{ "wood", 1000 },
{ "wood", 1000 },
// Food
// Food
{ "apple", 10 },
{ "apple", 10 },
{ "black.raspberries", 10 },
{ "black.raspberries", 10 },
{ "blueberries", 10 },
{ "blueberries", 10 },
{ "can.beans", 5 },
{ "can.beans", 5 },
{ "can.tuna", 5 },
{ "can.tuna", 5 },
{ "chicken.cooked", 5 },
{ "chicken.cooked", 5 },
{ "chocholate", 5 },
{ "chocholate", 5 },
{ "granolabar", 5 },
{ "granolabar", 5 },
{ "smallwaterbottle", 5},
{ "smallwaterbottle", 5},
{ "wolfmeat.cooked", 5 }
{ "wolfmeat.cooked", 5 }
};
};
private Dictionary<string, int> defaultRarityOverrides = new Dictionary<string, int>() {
// Put DEBUG = true to log the complete list to Log.Warning file

// ammo.rocket.smoke
// autoturret
// lmg.m249
// mining.pumpjack
// mining.quarry
// pookie.bear
// xmas.present.large
// xmas.present.medium
// xmas.present.small
// rock
// santahat