Make entity storage lookup range positive (#9735)
This commit is contained in:
@@ -28,11 +28,11 @@ public sealed class EntityStorageComponent : Component
|
||||
public int RemovedMasks;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("Capacity")]
|
||||
public int StorageCapacityMax = 30;
|
||||
[DataField("capacity")]
|
||||
public int Capacity = 30;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("IsCollidableWhenOpen")]
|
||||
[DataField("isCollidableWhenOpen")]
|
||||
public bool IsCollidableWhenOpen;
|
||||
|
||||
//The offset for where items are emptied/vacuumed for the EntityStorage.
|
||||
@@ -44,8 +44,8 @@ public sealed class EntityStorageComponent : Component
|
||||
public readonly CollisionGroup EnteringOffsetCollisionFlags = CollisionGroup.Impassable | CollisionGroup.MidImpassable;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("EnteringRange")]
|
||||
public float EnteringRange = -0.18f;
|
||||
[DataField("enteringRange")]
|
||||
public float EnteringRange = 0.18f;
|
||||
|
||||
[DataField("showContents")]
|
||||
public bool ShowContents;
|
||||
|
||||
@@ -162,7 +162,7 @@ public sealed class EntityStorageSystem : EntitySystem
|
||||
continue;
|
||||
|
||||
count++;
|
||||
if (count >= component.StorageCapacityMax)
|
||||
if (count >= component.Capacity)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public sealed class EntityStorageSystem : EntitySystem
|
||||
if (component.Open)
|
||||
return true;
|
||||
|
||||
if (component.Contents.ContainedEntities.Count >= component.StorageCapacityMax)
|
||||
if (component.Contents.ContainedEntities.Count >= component.Capacity)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
mask:
|
||||
- Impassable
|
||||
- type: EntityStorage
|
||||
Capacity: 1
|
||||
IsCollidableWhenOpen: true
|
||||
capacity: 1
|
||||
isCollidableWhenOpen: true
|
||||
closeSound:
|
||||
path: /Audio/Misc/zip.ogg
|
||||
openSound:
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
sprite: Structures/Storage/Crates/artifact.rsi
|
||||
state: artifact_container_icon
|
||||
- type: EntityStorage
|
||||
Capacity: 1
|
||||
capacity: 1
|
||||
whitelist:
|
||||
components:
|
||||
- Artifact
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
layer:
|
||||
- MachineLayer
|
||||
- type: EntityStorage
|
||||
Capacity: 500
|
||||
capacity: 500
|
||||
- type: Weldable
|
||||
- type: PlaceableSurface
|
||||
- type: Damageable
|
||||
@@ -94,7 +94,7 @@
|
||||
layer:
|
||||
- MachineLayer
|
||||
- type: EntityStorage
|
||||
Capacity: 500
|
||||
capacity: 500
|
||||
- type: Weldable
|
||||
- type: PlaceableSurface
|
||||
- type: Damageable
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
parent: CrateGeneric
|
||||
components:
|
||||
- type: EntityStorage
|
||||
Capacity: 500
|
||||
capacity: 500
|
||||
- type: Sprite
|
||||
sprite: Structures/Storage/Crates/livestock.rsi
|
||||
layers:
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
layer:
|
||||
- WallLayer
|
||||
- type: EntityStorage
|
||||
IsCollidableWhenOpen: true
|
||||
isCollidableWhenOpen: true
|
||||
showContents: false
|
||||
Capacity: 1
|
||||
capacity: 1
|
||||
enteringOffset: 0, -1
|
||||
closeSound:
|
||||
path: /Audio/Items/deconstruct.ogg
|
||||
@@ -124,9 +124,9 @@
|
||||
layer:
|
||||
- MachineLayer
|
||||
- type: EntityStorage
|
||||
IsCollidableWhenOpen: true
|
||||
isCollidableWhenOpen: true
|
||||
showContents: false
|
||||
Capacity: 1
|
||||
capacity: 1
|
||||
enteringOffset: 0, -1
|
||||
closeSound:
|
||||
path: /Audio/Items/deconstruct.ogg
|
||||
|
||||
Reference in New Issue
Block a user