Pet Carrier (Zookeeper gameplay?) (#21545)
* add visual * fix item + entityStorage problem, add generation in maints * make pet carrier two-handed * added to cargo * add resistlocker component
@@ -1,4 +1,4 @@
|
|||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Whitelist;
|
using Content.Shared.Whitelist;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
@@ -64,6 +64,12 @@ public abstract partial class SharedEntityStorageComponent : Component
|
|||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float EnteringRange = 0.18f;
|
public float EnteringRange = 0.18f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If true, there may be mobs inside the container, even if the container is an Item
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public bool ItemCanStoreMobs = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not to show the contents when the storage is closed
|
/// Whether or not to show the contents when the storage is closed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Content.Shared.Body.Components;
|
using Content.Shared.Body.Components;
|
||||||
@@ -413,6 +413,9 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
|||||||
var storeEv = new StoreMobInItemContainerAttemptEvent();
|
var storeEv = new StoreMobInItemContainerAttemptEvent();
|
||||||
RaiseLocalEvent(container, ref storeEv);
|
RaiseLocalEvent(container, ref storeEv);
|
||||||
allowedToEat = storeEv is { Handled: true, Cancelled: false };
|
allowedToEat = storeEv is { Handled: true, Cancelled: false };
|
||||||
|
|
||||||
|
if (component.ItemCanStoreMobs)
|
||||||
|
allowedToEat = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,3 +137,13 @@
|
|||||||
cost: 2000
|
cost: 2000
|
||||||
category: Service
|
category: Service
|
||||||
group: market
|
group: market
|
||||||
|
|
||||||
|
- type: cargoProduct
|
||||||
|
id: ServiceAnimalCarrier
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Storage/petcarrier.rsi
|
||||||
|
state: icon
|
||||||
|
product: PetCarrier
|
||||||
|
cost: 500
|
||||||
|
category: Service
|
||||||
|
group: market
|
||||||
@@ -184,6 +184,7 @@
|
|||||||
- CableHVStack10
|
- CableHVStack10
|
||||||
- CableMVStack10
|
- CableMVStack10
|
||||||
- CableApcStack10
|
- CableApcStack10
|
||||||
|
- PetCarrier
|
||||||
chance: 0.6
|
chance: 0.6
|
||||||
offset: 0.0
|
offset: 0.0
|
||||||
|
|
||||||
|
|||||||
66
Resources/Prototypes/Entities/Objects/Misc/pet_carrier.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
- type: entity
|
||||||
|
id: PetCarrier
|
||||||
|
name: big pet carrier
|
||||||
|
description: Allows large animals to be carried comfortably.
|
||||||
|
parent: BaseStructureDynamic
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
noRot: true
|
||||||
|
drawdepth: Objects
|
||||||
|
sprite: Objects/Storage/petcarrier.rsi
|
||||||
|
layers:
|
||||||
|
- state: pet_carrier_base
|
||||||
|
map: ["enum.StorageVisualLayers.Base"]
|
||||||
|
- state: pet_carrier_door
|
||||||
|
map: ["enum.StorageVisualLayers.Door"]
|
||||||
|
- state: welded
|
||||||
|
visible: false
|
||||||
|
map: ["enum.WeldableLayers.BaseWelded"]
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Storage/petcarrier.rsi
|
||||||
|
state: icon
|
||||||
|
- type: InteractionOutline
|
||||||
|
- type: Physics
|
||||||
|
- type: MultiHandedItem
|
||||||
|
- type: Fixtures
|
||||||
|
fixtures:
|
||||||
|
fix1:
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeCircle
|
||||||
|
radius: 0.45
|
||||||
|
density: 25
|
||||||
|
mask:
|
||||||
|
- SmallMobMask
|
||||||
|
layer:
|
||||||
|
- MachineLayer
|
||||||
|
- type: EntityStorage
|
||||||
|
capacity: 1
|
||||||
|
airtight: false
|
||||||
|
itemCanStoreMobs: true
|
||||||
|
- type: Weldable
|
||||||
|
- type: ResistLocker
|
||||||
|
- type: PlaceableSurface
|
||||||
|
isPlaceable: false
|
||||||
|
- type: Damageable
|
||||||
|
damageContainer: Inorganic
|
||||||
|
damageModifierSet: Wood
|
||||||
|
- type: Destructible
|
||||||
|
thresholds:
|
||||||
|
- trigger:
|
||||||
|
!type:DamageTrigger
|
||||||
|
damage: 50
|
||||||
|
behaviors:
|
||||||
|
- !type:DoActsBehavior
|
||||||
|
acts: ["Destruction"]
|
||||||
|
- type: Appearance
|
||||||
|
- type: EntityStorageVisuals
|
||||||
|
stateDoorOpen: pet_carrier_open
|
||||||
|
stateDoorClosed: pet_carrier_door
|
||||||
|
- type: ContainerContainer
|
||||||
|
containers:
|
||||||
|
entity_storage: !type:Container
|
||||||
|
paper_label: !type:ContainerSlot
|
||||||
|
- type: ItemSlots
|
||||||
|
- type: Item
|
||||||
|
size: Ginormous
|
||||||
|
sprite: Objects/Storage/petcarrier.rsi
|
||||||
BIN
Resources/Textures/Objects/Storage/petcarrier.rsi/icon.png
Normal file
|
After Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 659 B |
|
After Width: | Height: | Size: 659 B |
34
Resources/Textures/Objects/Storage/petcarrier.rsi/meta.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC0-1.0",
|
||||||
|
"copyright": "Taken from TGstation at https://github.com/tgstation/tgstation/commit/8b1ffd1e49a2d30a0aab63264106a3ec0e07f415 and edited by TheShuEd",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "inhand-left",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inhand-right",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pet_carrier_base"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pet_carrier_door"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pet_carrier_open"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "welded"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 279 B |
BIN
Resources/Textures/Objects/Storage/petcarrier.rsi/welded.png
Normal file
|
After Width: | Height: | Size: 331 B |