2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Lathe;
|
|
|
|
|
using Content.Shared.Research.Prototypes;
|
2020-03-15 17:55:20 +01:00
|
|
|
using Robust.Server.GameObjects;
|
2022-04-17 03:34:14 -04:00
|
|
|
using Content.Shared.Sound;
|
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 Content.Shared.Whitelist;
|
2019-04-26 15:51:05 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Lathe.Components
|
2019-04-26 15:51:05 +02:00
|
|
|
{
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2022-04-17 03:34:14 -04:00
|
|
|
public sealed class LatheComponent : SharedLatheComponent
|
2019-04-26 15:51:05 +02:00
|
|
|
{
|
2022-04-17 03:34:14 -04:00
|
|
|
/// <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
|
|
|
/// Whitelist for specifying the kind of materials that can be insert into the lathe
|
2022-04-17 03:34:14 -04:00
|
|
|
/// </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]
|
|
|
|
|
[DataField("whitelist")]
|
|
|
|
|
public EntityWhitelist? LatheWhitelist;
|
2022-04-17 03:34:14 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The lathe's construction queue
|
|
|
|
|
/// </summary>
|
2019-04-26 15:51:05 +02:00
|
|
|
[ViewVariables]
|
2020-11-27 11:00:49 +01:00
|
|
|
public Queue<LatheRecipePrototype> Queue { get; } = new();
|
2022-04-17 03:34:14 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// The recipe the lathe is currently producing
|
|
|
|
|
/// </summary>
|
2019-04-26 15:51:05 +02:00
|
|
|
[ViewVariables]
|
2022-04-17 03:34:14 -04:00
|
|
|
public LatheRecipePrototype? ProducingRecipe;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long the inserting animation will play
|
|
|
|
|
/// </summary>
|
2020-09-08 13:30:22 +02:00
|
|
|
[ViewVariables]
|
2022-04-17 03:34:14 -04:00
|
|
|
public float InsertionTime = 0.79f; // 0.01 off for animation timing
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Update accumulator for the insertion time
|
|
|
|
|
/// </suummary>
|
2022-04-23 22:27:19 -04:00
|
|
|
[DataField("insertionAccumulator")]
|
2022-04-17 03:34:14 -04:00
|
|
|
public float InsertionAccumulator = 0f;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Production accumulator for the production time.
|
|
|
|
|
/// </summary>
|
2020-09-14 00:04:00 +12:00
|
|
|
[ViewVariables]
|
2022-04-23 22:27:19 -04:00
|
|
|
[DataField("producingAccumulator")]
|
2022-04-17 03:34:14 -04:00
|
|
|
public float ProducingAccumulator = 0f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The sound that plays when the lathe is producing an item, if any
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("producingSound")]
|
|
|
|
|
public SoundSpecifier? ProducingSound;
|
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>
|
|
|
|
|
/// The sound that plays when inserting an item into the lathe, if any
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("insertingSound")]
|
|
|
|
|
public SoundSpecifier? InsertingSound;
|
2022-04-17 03:34:14 -04:00
|
|
|
|
|
|
|
|
/// <summmary>
|
|
|
|
|
/// The lathe's UI.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables] public BoundUserInterface? UserInterface;
|
2019-04-26 15:51:05 +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
|
|
|
}
|