Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpacks: rotatable, soil needs a shovel #2608

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 8 additions & 4 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
Loading