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

add map and grid prototypes #31665

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
48 changes: 48 additions & 0 deletions Resources/Prototypes/Entities/Maps/atmos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 20C air mix planet atmosphere
- type: entity
parent: Map
id: MapAtmos
components:
- type: MapAtmosphere
space: False
mixture:
volume: 2500
immutable: True
temperature: 293.15
moles:
- 21.824879
- 82.10312
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0

# -25C air mix planet atmosphere
- type: entity
parent: MapAtmos
id: MapAtmosCold
components:
- type: MapAtmosphere
mixture:
volume: 2500
immutable: True
temperature: 248.15
moles:
- 21.824879
- 82.10312
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
42 changes: 42 additions & 0 deletions Resources/Prototypes/Entities/Maps/grid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Prototype for a map's grid entity
# The parent should be the Map entity
# For the station's main grid you add BecomesStation with the station ID.
# You must set GridAtmosphere yourself, it doesn't like composition.
- type: entity
parent: BaseMapEntity
id: MapGrid
name: grid
components:
- type: MapGrid
- type: Physics
bodyStatus: InAir
angularDamping: 0.05
linearDamping: 0.05
fixedRotation: False
bodyType: Dynamic
- type: Fixtures
fixtures: {}
- type: Shuttle
angularDamping: 0.05
linearDamping: 0.05
- type: SpreaderGrid
- type: Gravity
gravityShakeSound: !type:SoundPathSpecifier
path: /Audio/Effects/alert.ogg
- type: DecalGrid
- type: GasTileOverlay
- type: RadiationGridResistance
- type: GridPathfinding
- type: NavMap # Required for nav maps to work on this grid, even for mapped shuttles you shouldn't prevent players building navmaps just because

# A grid that has extremely high dampening, so it can't be moved
- type: entity
parent: MapGrid
id: MapGridAnchored
components:
- type: Physics
angularDamping: 10000
linearDamping: 10000
- type: Shuttle
angularDamping: 10000
linearDamping: 10000
24 changes: 24 additions & 0 deletions Resources/Prototypes/Entities/Maps/map.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Components the map itself and grids have in common
- type: entity
abstract: true
categories: [ HideSpawnMenu ]
id: BaseMapEntity
components:
- type: Broadphase
- type: OccluderTree

# Prototype for a station's map entity
# Set the station's name with MetaData, this is visible on a shuttle console when FTLing
# Add your map's custom parallax to this entity with Parallax
- type: entity
parent: BaseMapEntity
id: Map
name: station
components:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: LoadedMap
Loading