# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2021 Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
# SPDX-FileCopyrightText: 2021 Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Profane McBane <profanedbane+github@gmail.com>
# SPDX-FileCopyrightText: 2022 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
#
# SPDX-License-Identifier: MIT

- type: entity
  id: BaseStructure
  abstract: true
  placement:
    mode: SnapgridCenter
  components:
  - type: Transform
    anchored: true
  - type: Clickable
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
        density: 60
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: Pullable
  - type: Tag
    tags:
      - Structure
  - type: Penetratable # Goobstation - Better snipers
    penetrateDamage: 25
    damagePenalty: 0.1
  - type: Structure # WD EDIT. TODO: Kill me pls

- type: entity
  # This means that it's not anchored on spawn.
  id: BaseStructureDynamic
  parent: BaseStructure
  abstract: true
  components:
# These might/might not be a good idea
  #  - type: MovedByPressure
  #  - type: DamageOnHighSpeedImpact
  #  - type: TileFrictionModifier
  #    modifier: 0.5
  - type: Transform
    anchored: false
  - type: Clickable
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
        density: 60
        mask:
        - MachineMask
        layer:
        - MidImpassable
        - LowImpassable
  - type: Anchorable

# For use with yaml composition, so that all wheeled structures can easily be changed.
- type: entity
  id: StructureWheeled
  abstract: true
  components:
    - type: TileFrictionModifier
      modifier: 0.4

- type: Tag
  id: Structure
