Fixes lathe stuff (#3383)

This commit is contained in:
Swept
2021-02-23 07:53:14 +00:00
committed by GitHub
parent e05698c027
commit 1e13c3b265
17 changed files with 99 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Shared.GameObjects.Components.Power;
using JetBrains.Annotations;
using Robust.Client.Animations;
@@ -18,6 +18,7 @@ namespace Content.Client.GameObjects.Components.Power
private Animation _insertingGlassAnimation;
private Animation _insertingGoldAnimation;
private Animation _insertingPlasmaAnimation;
private Animation _insertingPlasticAnimation;
public override void LoadData(YamlMappingNode node)
{
@@ -28,6 +29,7 @@ namespace Content.Client.GameObjects.Components.Power
_insertingGlassAnimation = PopulateAnimation("autolathe_inserting_glass_plate", "autolathe_inserting_unlit", 0.9f);
_insertingGoldAnimation = PopulateAnimation("autolathe_inserting_gold_plate", "autolathe_inserting_unlit", 0.9f);
_insertingPlasmaAnimation = PopulateAnimation("autolathe_inserting_plasma_sheet", "autolathe_inserting_unlit", 0.9f);
_insertingPlasticAnimation = PopulateAnimation("autolathe_inserting_plastic_sheet", "autolathe_inserting_unlit", 0.9f);
}
private Animation PopulateAnimation(string sprite, string spriteUnlit, float length)
@@ -107,6 +109,12 @@ namespace Content.Client.GameObjects.Components.Power
animPlayer.Play(_insertingPlasmaAnimation, AnimationKey);
}
break;
case LatheVisualState.InsertingPlastic:
if (!animPlayer.HasRunningAnimation(AnimationKey))
{
animPlayer.Play(_insertingPlasticAnimation, AnimationKey);
}
break;
default:
throw new ArgumentOutOfRangeException();
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Shared.GameObjects.Components.Power;
using JetBrains.Annotations;
using Robust.Client.Animations;
@@ -18,6 +18,7 @@ namespace Content.Client.GameObjects.Components.Power
private Animation _insertingGlassAnimation;
private Animation _insertingGoldAnimation;
private Animation _insertingPlasmaAnimation;
private Animation _insertingPlasticAnimation;
public override void LoadData(YamlMappingNode node)
{
@@ -28,6 +29,7 @@ namespace Content.Client.GameObjects.Components.Power
_insertingGlassAnimation = PopulateAnimation("protolathe_glass", 0.9f);
_insertingGoldAnimation = PopulateAnimation("protolathe_gold", 0.9f);
_insertingPlasmaAnimation = PopulateAnimation("protolathe_plasma", 0.9f);
_insertingPlasticAnimation = PopulateAnimation("protolathe_plastic", 0.9f);
}
private Animation PopulateAnimation(string sprite, float length)
@@ -103,6 +105,12 @@ namespace Content.Client.GameObjects.Components.Power
animPlayer.Play(_insertingPlasmaAnimation, AnimationKey);
}
break;
case LatheVisualState.InsertingPlastic:
if (!animPlayer.HasRunningAnimation(AnimationKey))
{
animPlayer.Play(_insertingPlasticAnimation, AnimationKey);
}
break;
default:
throw new ArgumentOutOfRangeException();
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Power
@@ -11,6 +11,7 @@ namespace Content.Shared.GameObjects.Components.Power
InsertingMetal,
InsertingGlass,
InsertingGold,
InsertingPlasma
InsertingPlasma,
InsertingPlastic
}
}

View File

@@ -41510,7 +41510,7 @@ entities:
- supplyRate: 6000
type: PowerSupplier
- uid: 4717
type: Spade
type: HydroponicsToolSpade
components:
- parent: 853
pos: -20.5,-1.5

View File

@@ -3,7 +3,7 @@
icon:
sprite: Objects/Tools/Hydroponics/hoe.rsi
state: icon
result: MiniHoe
result: HydroponicsToolMiniHoe
completetime: 500
materials:
steel: 30
@@ -13,7 +13,7 @@
icon:
sprite: Objects/Tools/Hydroponics/scythe.rsi
state: icon
result: Scythe
result: HydroponicsToolScythe
completetime: 500
materials:
steel: 40
@@ -24,7 +24,7 @@
icon:
sprite: Objects/Tools/Hydroponics/hatchet.rsi
state: icon
result: Hatchet
result: HydroponicsToolHatchet
completetime: 500
materials:
steel: 60
@@ -34,7 +34,7 @@
icon:
sprite: Objects/Tools/Hydroponics/spade.rsi
state: icon
result: Spade
result: HydroponicsToolSpade
completetime: 500
materials:
steel: 40

View File

@@ -242,10 +242,10 @@
- type: Stack
stacktype: enum.StackType.Plastic
- type: Sprite
sprite: Objects/Materials/sheets.rsi/plastic.png
sprite: Objects/Materials/sheets.rsi
state: plastic
- type: Item
sprite: Objects/Materials/sheets.rsi/plastic.png
sprite: Objects/Materials/sheets.rsi
HeldPrefix: plastic
- type: entity

View File

@@ -52,7 +52,7 @@
- type: entity
name: spade
parent: BaseItem
id: Spade
id: HydroponicsToolSpade
description: A small tool for digging and moving dirt.
components:
- type: Tag

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -125,6 +125,22 @@
]
]
},
{
"name": "autolathe_inserting_plastic_sheet",
"delays": [
[
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
]
]
},
{
"name": "autolathe_inserting_unlit",
"delays": [

View File

@@ -127,6 +127,22 @@
]
]
},
{
"name": "protolathe_plastic",
"delays": [
[
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088,
0.088
]
]
},
{
"name": "protolathe_building",
"delays": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

View File

@@ -32,7 +32,7 @@
"name": "uranium"
},
{
"name": "wood_plank"
"name": "wood"
},
{
"name": "wool"
@@ -75,9 +75,6 @@
},
{
"name": "rods"
},
{
"name": "plastic"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 335 B

View File

@@ -68,6 +68,17 @@
},
{
"name": "researchicon"
},
{
"name": "plastic"
},
{
"name": "plastic-inhand-left",
"directions": 4
},
{
"name": "plastic-inhand-right",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B