-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I just almost lost an extension because of that mistake.
Code:
[PluginCustomItem]
public class SniperRifle : CustomItem // You could also use the toolgun as a example.
{
public override uint Id { get; set; } = 777;
public override string Name { get; set; } = "SniperRifle";
public override string Description { get; set; } = "Just a sniper rifle.";
public override ItemType Item { get; set; } = ItemType.GunE11SR;
public override CustomFlags? CustomFlags { get; set; } = UncomplicatedCustomItems.Enums.CustomFlags.WorkstationBan;
public override CustomItemType CustomItemType { get; set; } = CustomItemType.Weapon;
public override string BadgeName { get; set; } = "";
public override string BadgeColor { get; set; } = "";
public override IData CustomData { get; set; } = new WeaponData()
{
Damage = 300f,
Attachments = "ScopeSight, LightweightStock, Foregrip, RifleBody, MuzzleBrake",
MaxAmmo = 1,
MaxMagazineAmmo = 1
};
public override ISpawn Spawn { get; set; } = new Spawn()
{
DoSpawn = true,
Count = 1,
Coords = new(),
DynamicSpawn =
[
new()
{
Room = "HczArmory",
Chance = 100,
Coords = new Vector3(3f, 1f, -1.6f)
}
],
Zones = new(){FacilityZone.HeavyContainment},
};
}All copies E11SR weapons now do 300 damage.
Metadata
Metadata
Assignees
Labels
No labels