Skip to content

Commit

Permalink
Flatpacks: rotatable, soil needs a shovel (#2608)
Browse files Browse the repository at this point in the history
* Rotatable flatpacks

* soil crates need to be dug

* Directional sprites for docking airlock flatpacks
  • Loading branch information
whatston3 authored Dec 26, 2024
1 parent c149663 commit bef5317
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Content.Shared/Construction/SharedFlatpackSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ private void OnFlatpackInteractUsing(Entity<FlatpackComponent> ent, ref Interact
if (_net.IsServer)
{
var spawn = Spawn(comp.Entity, _map.GridTileToLocal(grid, gridComp, buildPos));
if (TryComp(spawn, out TransformComponent? spawnXform)) // Frontier: rotatable flatpacks
spawnXform.LocalRotation = xform.LocalRotation.GetCardinalDir().ToAngle(); // Frontier: rotatable flatpacks
_adminLogger.Add(LogType.Construction,
LogImpact.Low,
$"{ToPrettyString(args.User):player} unpacked {ToPrettyString(spawn):entity} at {xform.Coordinates} from {ToPrettyString(uid):entity}");
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Objects/Devices/flatpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
cpu_supply: "#A46106"
- type: StaticPrice
price: 250
- type: Rotatable # Frontier

- type: entity
parent: BaseFlatpack
Expand Down
17 changes: 12 additions & 5 deletions Resources/Prototypes/_NF/Entities/Objects/Devices/flatpacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,23 +370,27 @@
- type: entity
parent: UniformPrinterFlatpack
id: HydroponicsSoilNutritionFlatpack
name: crate with fertile soil
description: A crate with fertile soil used for constructing a soil bed for growing.
name: crate of fertile soil
description: A crate of fertile soil used for constructing a soil bed for growing. Spread it around with a shovel.
components:
- type: Flatpack
entity: HydroponicsSoilNutrition
qualityNeeded: Digging
unpackSound: /Audio/Items/shovel_dig.ogg
- type: Sprite
layers:
- state: soil

- type: entity
parent: UniformPrinterFlatpack
id: HydroponicsSoilEmptyFlatpack
name: crate with soil
description: A crate with soil used for constructing a soil bed for growing.
name: crate of soil
description: A crate of soil used for constructing a soil bed for growing. Spread it around with a shovel.
components:
- type: Flatpack
entity: HydroponicsSoilEmpty
qualityNeeded: Digging
unpackSound: /Audio/Items/shovel_dig.ogg
- type: Sprite
layers:
- state: soil
Expand Down Expand Up @@ -669,9 +673,12 @@
components:
- type: Flatpack
entity: AirlockShuttle
- type: Sprite
layers:
- state: command_airlock_directional

- type: entity
parent: AirlockFlatpack
parent: AirlockShuttleFlatpack
id: AirlockGlassShuttleFlatpack
name: docking glass airlock flatpack
description: A flatpack used for constructing a glass docking airlock.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Resources/Textures/_NF/Objects/Devices/flatpack.rsi/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
{
"name": "command_airlock"
},
{
"name": "command_airlock_directional"
},
{
"name": "command_server"
},
Expand Down

0 comments on commit bef5317

Please sign in to comment.