Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
using System.Threading;
|
2022-01-11 19:12:08 -07:00
|
|
|
using Content.Shared.Damage;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2019-08-21 22:50:15 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Mining.Components
|
2019-08-21 22:50:15 +02:00
|
|
|
{
|
Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// When interacting with an <see cref="MineableComponent"/> allows it to spawn entities.
|
|
|
|
|
/// </summary>
|
2022-02-08 00:42:49 -08:00
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class PickaxeComponent : Component
|
2019-08-21 22:50:15 +02:00
|
|
|
{
|
Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-01-11 19:12:08 -07:00
|
|
|
[DataField("sound")]
|
2021-07-10 17:35:33 +02:00
|
|
|
public SoundSpecifier MiningSound { get; set; } = new SoundPathSpecifier("/Audio/Items/Mining/pickaxe.ogg");
|
|
|
|
|
|
Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-01-11 19:12:08 -07:00
|
|
|
[DataField("timeMultiplier")]
|
|
|
|
|
public float MiningTimeMultiplier { get; set; } = 1f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// What damage should be given to objects when
|
|
|
|
|
/// mined using a pickaxe?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("damage", required: true)]
|
|
|
|
|
public DamageSpecifier Damage { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many entities can this pickaxe mine at once?
|
|
|
|
|
/// </summary>
|
Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-01-11 19:12:08 -07:00
|
|
|
[DataField("maxEntities")]
|
|
|
|
|
public int MaxMiningEntities = 1;
|
|
|
|
|
|
Salvage mining, ore processing, and material clean-up (#7406)
* adding stuff cuz new computer
* removed unused materials
* remove unused materials and such, lathe things
* material volume no longer hardcoded
* fixed mining system
* add 5 stacks of materials, and add them to the ore processor
* fix copyright for ores and handdrill
* comma momma
* whyyyyy
* more fixes to make the yaml linter happy
* i should get my eyes checked
* silver proper
* more cleanup
* leftovers
* remove more references to material doors
* couldn't bear to be without bearhide
* added uranium, added more lathe recipes
* copyright fix, stack fix
* ore processor sprite and such
* ore processing some binches
* MaterialCotton removal
* 1 uranium ore means 1 sheet
* fix merge conflict? idk
* time to ketchup
* lathe recognizes material volume again
* yaml cleanup
* forgot to remove adamantine lol
* re-added diamond for now
* diamond stacks
* functional ore processor
* added ignoreColor to lathe visuals
* ore processor machine board
* add board to industrial tech and circuit printer
* provided lathes their whitelists
* fix wonky ore spawning, added insert sound to lathe, adjusted ore chance
* re-added ore processor
* typos and cleanup
* Update Content.Client/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Lathe/LatheSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* revert mapchange
* VV ignorecolor, pass entitymanager, move canceltoken to pickaxe, removed foreach from orespawn
* actually null canceltoken
* remove five-stacks, ore processor produces full stacks or single sheets/ingots
* VV proper
* adjust ore chances
* readd Cotton
* Update Content.Server/Mining/MineableSystem.cs
* tweaks
* Material is now dict (material, volume)
* removed unused property
* Space crystal -> space quartz
* forgor asteroid space quartz
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-04-28 03:41:04 -07:00
|
|
|
[ViewVariables]
|
|
|
|
|
public readonly Dictionary<EntityUid, CancellationTokenSource> MiningEntities = new();
|
2019-08-21 22:50:15 +02:00
|
|
|
}
|
|
|
|
|
}
|