Medkits are now a container plus filled version (#457)
This commit is contained in:
committed by
Pieter-Jan Briers
parent
0cf34d2d26
commit
4198b6dc4e
@@ -0,0 +1,35 @@
|
|||||||
|
using Robust.Server.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.Random;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.Components.Items.Storage.Fill
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
internal sealed class MedkitFillComponent : Component, IMapInit
|
||||||
|
{
|
||||||
|
public override string Name => "MedkitFill";
|
||||||
|
|
||||||
|
#pragma warning disable 649
|
||||||
|
[Dependency] private readonly IEntityManager _entityManager;
|
||||||
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
void IMapInit.MapInit()
|
||||||
|
{
|
||||||
|
var storage = Owner.GetComponent<IStorageComponent>();
|
||||||
|
|
||||||
|
void Spawn(string prototype)
|
||||||
|
{
|
||||||
|
storage.Insert(_entityManager.SpawnEntity(prototype));
|
||||||
|
}
|
||||||
|
|
||||||
|
Spawn("Brutepack");
|
||||||
|
Spawn("Brutepack");
|
||||||
|
Spawn("Brutepack");
|
||||||
|
Spawn("Ointment");
|
||||||
|
Spawn("Ointment");
|
||||||
|
Spawn("Ointment");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1756,7 +1756,7 @@ entities:
|
|||||||
entities: []
|
entities: []
|
||||||
type: Robust.Server.GameObjects.Components.Container.Container
|
type: Robust.Server.GameObjects.Components.Container.Container
|
||||||
type: ContainerContainer
|
type: ContainerContainer
|
||||||
- type: Medkit
|
- type: MedkitFilled
|
||||||
uid: 147
|
uid: 147
|
||||||
components:
|
components:
|
||||||
- grid: 0
|
- grid: 0
|
||||||
@@ -1769,7 +1769,7 @@ entities:
|
|||||||
mask: 5
|
mask: 5
|
||||||
bounds: -0.25,-0.25,0.25,0.25
|
bounds: -0.25,-0.25,0.25,0.25
|
||||||
type: Collidable
|
type: Collidable
|
||||||
- type: Medkit
|
- type: MedkitFilled
|
||||||
uid: 148
|
uid: 148
|
||||||
components:
|
components:
|
||||||
- grid: 0
|
- grid: 0
|
||||||
@@ -8414,7 +8414,7 @@ entities:
|
|||||||
mask: 19
|
mask: 19
|
||||||
bounds: -0.5,-0.25,0.5,0.25
|
bounds: -0.5,-0.25,0.5,0.25
|
||||||
type: Collidable
|
type: Collidable
|
||||||
- type: Medkit
|
- type: MedkitFilled
|
||||||
uid: 718
|
uid: 718
|
||||||
components:
|
components:
|
||||||
- grid: 0
|
- grid: 0
|
||||||
@@ -8427,7 +8427,7 @@ entities:
|
|||||||
mask: 5
|
mask: 5
|
||||||
bounds: -0.25,-0.25,0.25,0.25
|
bounds: -0.25,-0.25,0.25,0.25
|
||||||
type: Collidable
|
type: Collidable
|
||||||
- type: Medkit
|
- type: MedkitFilled
|
||||||
uid: 719
|
uid: 719
|
||||||
components:
|
components:
|
||||||
- grid: 0
|
- grid: 0
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
name: Medkit
|
name: Emergency Medical Kit
|
||||||
|
description: An emergency medical kit for those serious boo-boos.
|
||||||
parent: BaseItem
|
parent: BaseItem
|
||||||
id: Medkit
|
id: Medkit
|
||||||
components:
|
components:
|
||||||
@@ -7,11 +8,16 @@
|
|||||||
texture: Objects/Medical/medkit_r.png
|
texture: Objects/Medical/medkit_r.png
|
||||||
- type: Icon
|
- type: Icon
|
||||||
texture: Objects/Medical/medkit_r.png
|
texture: Objects/Medical/medkit_r.png
|
||||||
- type: Healing
|
- type: Storage
|
||||||
heal: 100
|
Capacity: 60
|
||||||
damage: Brute
|
|
||||||
- type: Item
|
- type: Item
|
||||||
Size: 24
|
Size: 9999
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: MedkitFilled
|
||||||
|
parent: Medkit
|
||||||
|
components:
|
||||||
|
- type: MedkitFill # 3 Ointment, 3 Roll of Gauze. TODO 1 Health Analyzer once it exists
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: Medical Stack
|
name: Medical Stack
|
||||||
@@ -22,7 +28,6 @@
|
|||||||
- type: Item
|
- type: Item
|
||||||
- type: Healing
|
- type: Healing
|
||||||
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: Ointment
|
name: Ointment
|
||||||
description: Used to treat those nasty burns.
|
description: Used to treat those nasty burns.
|
||||||
@@ -41,9 +46,8 @@
|
|||||||
count: 5
|
count: 5
|
||||||
stacktype: enum.StackType.Ointment
|
stacktype: enum.StackType.Ointment
|
||||||
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: Brutepack
|
name: Roll of Gauze
|
||||||
description: Some sterile gauze to wrap around bloody stumps.
|
description: Some sterile gauze to wrap around bloody stumps.
|
||||||
parent: MedicalStack
|
parent: MedicalStack
|
||||||
id: Brutepack
|
id: Brutepack
|
||||||
|
|||||||
Reference in New Issue
Block a user