Add Eris microwave RSI.
Cleaned up the Microwave component code.
@@ -101,26 +101,21 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
{
|
{
|
||||||
if(_contents.ReagentList.Count > 0)
|
if(_contents.ReagentList.Count > 0)
|
||||||
{
|
{
|
||||||
DetermineRecipe();
|
foreach (var r in _allRecipes)
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DetermineRecipe()
|
|
||||||
{
|
|
||||||
foreach (var r in _allRecipes)
|
|
||||||
{
|
|
||||||
if(CheckReagents(r))
|
|
||||||
{
|
{
|
||||||
var outputFromRecipe = r.OutPutPrototype;
|
if (CanSatisfyRecipe(r))
|
||||||
_entityManager.SpawnEntity(outputFromRecipe, Owner.Transform.GridPosition);
|
{
|
||||||
return;
|
var outputFromRecipe = r.OutPutPrototype;
|
||||||
}
|
_entityManager.SpawnEntity(outputFromRecipe, Owner.Transform.GridPosition);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CheckReagents(MicrowaveMealRecipePrototype recipe)
|
private bool CanSatisfyRecipe(MicrowaveMealRecipePrototype recipe)
|
||||||
{
|
{
|
||||||
foreach(var ingredient in recipe.Ingredients)
|
foreach(var ingredient in recipe.Ingredients)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,13 +18,9 @@
|
|||||||
IsScrapingFloor: true
|
IsScrapingFloor: true
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
sprite: Buildings/medical_scanner.rsi
|
sprite: Objects/Kitchen/microwave.rsi
|
||||||
layers:
|
state: mw0
|
||||||
- state: scanner_open
|
|
||||||
map: ["enum.MedicalScannerVisualLayers.Machine"]
|
|
||||||
- state: scanner_terminal_blue
|
|
||||||
map: ["enum.MedicalScannerVisualLayers.Terminal"]
|
|
||||||
- type: PowerDevice
|
- type: PowerDevice
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Buildings/medical_scanner.rsi
|
sprite: Objects/Kitchen/microwave.rsi
|
||||||
state: scanner_open
|
state: mw0
|
||||||
|
|||||||
BIN
Resources/Textures/Objects/Kitchen/microwave.dmi
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "license": "AGPL v3", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris", "states": [{"name": "mw", "directions": 1, "delays": [[1.0]]}, {"name": "mw0", "directions": 1, "delays": [[1.0]]}, {"name": "mw1", "directions": 1, "delays": [[0.1, 0.1]]}, {"name": "mwb", "directions": 1, "delays": [[1.0]]}, {"name": "mwbloody", "directions": 1, "delays": [[1.0]]}, {"name": "mwbloody0", "directions": 1, "delays": [[1.0]]}, {"name": "mwbloody1", "directions": 1, "delays": [[0.1, 0.1]]}, {"name": "mwbloodyo", "directions": 1, "delays": [[0.1, 0.1]]}, {"name": "mwo", "directions": 1, "delays": [[0.1, 0.1]]}]}
|
||||||
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mw.png
Normal file
|
After Width: | Height: | Size: 636 B |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mw0.png
Normal file
|
After Width: | Height: | Size: 614 B |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mw1.png
Normal file
|
After Width: | Height: | Size: 825 B |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwb.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwbloody.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwbloody0.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwbloody1.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwbloodyo.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Resources/Textures/Objects/Kitchen/microwave.rsi/mwo.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |