Add Eris microwave RSI.

Cleaned up  the Microwave component code.
This commit is contained in:
FL-OZ
2020-04-28 19:15:43 -05:00
parent 24842418c3
commit d0f18b2f66
13 changed files with 15 additions and 23 deletions

View File

@@ -100,17 +100,10 @@ namespace Content.Server.GameObjects.Components.Kitchen
void IActivate.Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if(_contents.ReagentList.Count > 0) if(_contents.ReagentList.Count > 0)
{
DetermineRecipe();
}
}
private void DetermineRecipe()
{ {
foreach (var r in _allRecipes) foreach (var r in _allRecipes)
{ {
if(CheckReagents(r)) if (CanSatisfyRecipe(r))
{ {
var outputFromRecipe = r.OutPutPrototype; var outputFromRecipe = r.OutPutPrototype;
_entityManager.SpawnEntity(outputFromRecipe, Owner.Transform.GridPosition); _entityManager.SpawnEntity(outputFromRecipe, Owner.Transform.GridPosition);
@@ -120,7 +113,9 @@ namespace Content.Server.GameObjects.Components.Kitchen
} }
} }
private bool CheckReagents(MicrowaveMealRecipePrototype recipe) }
private bool CanSatisfyRecipe(MicrowaveMealRecipePrototype recipe)
{ {
foreach(var ingredient in recipe.Ingredients) foreach(var ingredient in recipe.Ingredients)
{ {

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -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]]}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB