Salvage magnet revamp (#23119)

* Generic offering window

* More work

* weh

* Parity

* Progression meter

* magnet

* rona

* PG asteroid work

* code red

* Asteroid spawnings

* clams

* a

* Marker fixes

* More fixes

* Workings of biome asteroids

* A

* Fix this loading code

* a

* Fix masking

* weh

* Fixes

* Magnet claiming

* toe

* petogue

* magnet

* Bunch of fixes

* Fix default

* Fixes

* asteroids

* Fix offerings

* Localisation and a bunch of fixes

* a

* Fixes

* Preliminary draft

* Announcement fixes

* Fixes and bump spawn rate

* Fix asteroid spawns and UI

* More fixes

* Expeditions fix

* fix

* Gravity

* Fix announcement rounding

* a

* Offset tweak

* sus

* jankass

* Fix merge
This commit is contained in:
metalgearsloth
2024-01-04 14:25:32 +11:00
committed by GitHub
parent 98f5f47355
commit bf79acd127
66 changed files with 2257 additions and 1252 deletions

View File

@@ -73,6 +73,12 @@
components:
- type: SalvageExpeditionData
- type: entity
id: BaseStationMagnet
abstract: true
components:
- type: SalvageMagnetData
- type: entity
id: BaseStationSiliconLawCrewsimov
abstract: true

View File

@@ -19,6 +19,7 @@
- BaseStationCentcomm
- BaseStationEvacuation
- BaseStationAlertLevels
- BaseStationMagnet
- BaseStationExpeditions
- BaseStationSiliconLawCrewsimov
- BaseStationAllEventsEligible

View File

@@ -23,36 +23,17 @@
- state: salvage-magnet-o4
map: ["chargeState"]
shader: unshaded
- type: Appearance
- type: GenericVisualizer
visuals:
enum.SalvageMagnetVisuals.ChargeState:
chargeState:
0: { state: salvage-magnet-o0, shader: "unshaded", visible: false }
1: { state: salvage-magnet-o0, shader: "unshaded", visible: true }
2: { state: salvage-magnet-o1, shader: "unshaded", visible: true }
3: { state: salvage-magnet-o2, shader: "unshaded", visible: true }
4: { state: salvage-magnet-o3, shader: "unshaded", visible: true }
5: { state: salvage-magnet-o4, shader: "unshaded", visible: true }
enum.SalvageMagnetVisuals.Ready:
ready:
False: { state: salvage-magnet-ready, visible: false, shader: "unshaded" }
True: { state: salvage-magnet-ready, visible: true, shader: "unshaded" }
enum.SalvageMagnetVisuals.ReadyBlinking:
readyBlinking:
False: { state: salvage-magnet-ready-blinking, visible: false, shader: "unshaded" }
True: { state: salvage-magnet-ready-blinking, visible: true, shader: "unshaded" }
enum.SalvageMagnetVisuals.Unready:
unready:
False: { state: salvage-magnet-unready, visible: false, shader: "unshaded" }
True: { state: salvage-magnet-unready, visible: true, shader: "unshaded" }
enum.SalvageMagnetVisuals.UnreadyBlinking:
unreadyBlinking:
False: { state: salvage-magnet-unready-blinking, visible: false, shader: "unshaded" }
True: { state: salvage-magnet-unready-blinking, visible: true, shader: "unshaded" }
- type: Rotatable
- type: ActivatableUI
key: enum.SalvageMagnetUiKey.Key
- type: ActivatableUIRequiresPower
- type: UserInterface
interfaces:
- key: enum.SalvageMagnetUiKey.Key
type: SalvageMagnetBoundUserInterface
- type: Transform
noRot: false
- type: Appearance
- type: Rotatable
- type: IntrinsicRadioReceiver
- type: ActiveRadio
channels:

View File

@@ -56,12 +56,210 @@
- FullTileMask
layer:
- WallLayer
- type: OreVein
oreChance: 0.2
oreRarityPrototypeId: RandomOreDistributionStandard
- type: RadiationBlocker
resistance: 2
# Ore veins
- type: entity
id: AsteroidRockCoal
parent: AsteroidRock
description: An ore vein rich with coal.
suffix: Coal
components:
- type: OreVein
oreChance: 1.0
currentOre: OreCoal
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_coal
- type: entity
id: AsteroidRockGold
parent: AsteroidRock
description: An ore vein rich with gold.
suffix: Gold
components:
- type: OreVein
oreChance: 1.0
currentOre: OreGold
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_gold
- type: entity
id: AsteroidRockPlasma
parent: AsteroidRock
description: An ore vein rich with plasma.
suffix: Plasma
components:
- type: OreVein
oreChance: 1.0
currentOre: OrePlasma
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_phoron
- type: entity
id: AsteroidRockQuartz
parent: AsteroidRock
description: An ore vein rich with quartz.
suffix: Quartz
components:
- type: OreVein
oreChance: 1.0
currentOre: OreSpaceQuartz
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_quartz
- type: entity
id: AsteroidRockSilver
parent: AsteroidRock
description: An ore vein rich with silver.
suffix: Silver
components:
- type: OreVein
oreChance: 1.0
currentOre: OreSilver
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_silver
# Yes I know it drops steel but we may get smelting at some point
- type: entity
id: AsteroidRockTin
parent: AsteroidRock
description: An ore vein rich with steel.
suffix: Steel
components:
- type: OreVein
oreChance: 1.0
currentOre: OreSteel
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_tin
- type: entity
id: AsteroidRockUranium
parent: AsteroidRock
description: An ore vein rich with uranium.
suffix: Uranium
components:
- type: OreVein
oreChance: 1.0
currentOre: OreUranium
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_uranium
- type: entity
id: AsteroidRockBananium
parent: AsteroidRock
description: An ore vein rich with bananium.
suffix: Bananium
components:
- type: OreVein
oreChance: 1.0
currentOre: OreBananium
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_bananium
- type: entity
id: AsteroidRockArtifactFragment
parent: AsteroidRock
description: A rock wall. What's that sticking out of it?
suffix: Artifact Fragment
components:
- type: OreVein
oreChance: 1.0
currentOre: OreArtifactFragment
- type: Sprite
layers:
- state: rock_asteroid
- map: [ "enum.EdgeLayer.South" ]
state: rock_asteroid_south
- map: [ "enum.EdgeLayer.East" ]
state: rock_asteroid_east
- map: [ "enum.EdgeLayer.North" ]
state: rock_asteroid_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_asteroid_west
- state: rock_artifact_fragment
- type: entity
id: AsteroidRockMining
parent: AsteroidRock

View File

@@ -1,137 +1,109 @@
# So the way things are done as of now is that Salvages are measured by world AABBs in their maps.
# Remember, first two coordinates should be the minimum X/Y, second two should be maximum.
# You can also use the salvageruler command to get these, once you're sure the transform's been reset.
# Ultimately, you should still be keeping the maps centred.
# Dear god please stop adding ones with thousands of entities, learn how procgen works.
# "Small"-class maps - Max size square: 7x7, indicated size: 3.5
- type: salvageMap
id: Small1
name: "Small / Engineering Storage 1"
mapPath: /Maps/Salvage/small-1.yml
- type: salvageMap
id: Small2
name: "Small / Gaming Nook 1"
mapPath: /Maps/Salvage/small-2.yml
- type: salvageMap
id: Small-ship-1
name: "Small / Ship 1 (Pill)"
id: SmallShip1
mapPath: /Maps/Salvage/small-ship-1.yml
- type: salvageMap
id: Small3
name: "Small / Laundromat 1"
mapPath: /Maps/Salvage/small-3.yml
- type: salvageMap
id: SmallAISurveyDrone
name: "Small / AI Survey Drone"
mapPath: /Maps/Salvage/small-ai-survey-drone.yml
- type: salvageMap
id: Small4
name: "Small / Bar Salvage"
mapPath: /Maps/Salvage/small-4.yml
# Small - Asteroids
- type: salvageMap
id: SmallA1
name: "Small / Asteroid 1 Plasmafire"
mapPath: /Maps/Salvage/small-a-1.yml
# "Medium"-class maps - Max size square: 15x15, indicated size: 7.5
- type: salvageMap
id: Medium1
name: "Medium / Plasma-Trapped Cache 1"
mapPath: /Maps/Salvage/medium-1.yml
- type: salvageMap
id: MediumVault1
name: "Medium / Vault 1"
mapPath: /Maps/Salvage/medium-vault-1.yml
- type: salvageMap
id: MediumOrchestra
name: "Medium / Silent Orchestra"
mapPath: /Maps/Salvage/medium-silent-orchestra.yml
- type: salvageMap
id: MediumLibraryWreck
name: "Medium / Abandoned Library"
mapPath: /Maps/Salvage/medium-library.yml
- type: salvageMap
id: MediumCargoWreck
name: "Medium / Cargo Department Wreck"
mapPath: /Maps/Salvage/cargo-1.yml
- type: salvageMap
id: MediumPirateWreck
name: "Medium / Pirate Barge Fragment"
mapPath: /Maps/Salvage/medium-pirate.yml
- type: salvageMap
id: TickColony
name: "Space Tick colony"
mapPath: /Maps/Salvage/tick-colony.yml
- type: salvageMap
id: CargoDock
name: "Asteroid Cargo Dock"
mapPath: /Maps/Salvage/medium-dock.yml
- type: salvageMap
id: SpaceWaffleHome
name: "Waffle Home"
mapPath: /Maps/Salvage/wh-salvage.yml
- type: salvageMap
id: MediumShuttleWreck
name: "Medium / Ruined Emergency Shuttle"
mapPath: /Maps/Salvage/medium-ruined-emergency-shuttle.yml
- type: salvageMap
id: mediumPetHospital
name: "Medium / Pet and Bear Hospital"
id: MediumPetHospital
mapPath: /Maps/Salvage/medium-pet-hospital.yml
- type: salvageMap
id: MediumCrashedShuttle
name: "Crashed Shuttle"
mapPath: /Maps/Salvage/medium-crashed-shuttle.yml
- type: salvageMap
id: Meatball
name: "Meatball"
mapPath: /Maps/Salvage/meatball.yml
# """Large""" maps
- type: salvageMap
id: StationStation
name: "StationStation"
mapPath: /Maps/Salvage/stationstation.yml
- type: salvageMap
id: AsteroidBase
name: "Asteroid Base"
mapPath: /Maps/Salvage/asteroid-base.yml
- type: salvageMap
id: RuinCargoBase
name: "Ruined Cargo Storage"
mapPath: /Maps/Salvage/ruin-cargo-salvage.yml
- type: salvageMap
id: SecurityChunk
name: "Security Department Chunk"
mapPath: /Maps/Salvage/security-chunk.yml
- type: salvageMap
id: EngineeringChunk
name: "Engineering Department Chunk"
mapPath: /Maps/Salvage/engineering-chunk.yml

View File

@@ -0,0 +1,116 @@
- type: weightedRandom
id: AsteroidOre
weights:
OreTin: 1.0
OreQuartz: 1.0
OreCoal: 1.0
OreGold: 0.25
OreSilver: 0.25
OrePlasma: 0.15
OreUranium: 0.15
# Large asteroids, typically 1
- type: dungeonConfig
id: BlobAsteroid
# Floor generation
generator: !type:NoiseDunGen
tileCap: 1500
capStd: 32
iterations: 1
layers:
- tile: FloorAsteroidSand
threshold: 0.30
noise:
frequency: 0.020
noiseType: OpenSimplex2
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Multiple smaller asteroids
# This is a pain so we generate fewer tiles
- type: dungeonConfig
id: ClusterAsteroid
# Floor generation
generator: !type:NoiseDunGen
tileCap: 1000
capStd: 32
layers:
- tile: FloorAsteroidSand
threshold: 0.10
noise:
frequency: 0.130
noiseType: OpenSimplex2
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Long and spindly, less smooth than blob
- type: dungeonConfig
id: SpindlyAsteroid
# Floor generation
generator: !type:NoiseDunGen
tileCap: 1500
capStd: 32
layers:
- tile: FloorAsteroidSand
threshold: -0.50
noise:
frequency: 0.055
noiseType: Cellular
fractalType: FBm
octaves: 3
lacunarity: 2
cellularDistanceFunction: Euclidean
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Lots of holes in it
- type: dungeonConfig
id: SwissCheeseAsteroid
# Floor generation
generator: !type:NoiseDunGen
tileCap: 1500
capStd: 32
layers:
- tile: FloorAsteroidSand
threshold: -0.10
noise:
frequency: 0.155
noiseType: OpenSimplex2
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre

View File

@@ -2,6 +2,7 @@
- type: biomeMarkerLayer
id: OreTin
entityMask:
AsteroidRock: AsteroidRockTin
WallRock: WallRockTin
WallRockBasalt: WallRockBasaltTin
WallRockChromite: WallRockChromiteTin
@@ -15,6 +16,7 @@
- type: biomeMarkerLayer
id: OreQuartz
entityMask:
AsteroidRock: AsteroidRockQuartz
WallRock: WallRockQuartz
WallRockBasalt: WallRockBasaltQuartz
WallRockChromite: WallRockChromiteQuartz
@@ -27,6 +29,7 @@
- type: biomeMarkerLayer
id: OreCoal
entityMask:
AsteroidRock: AsteroidRockCoal
WallRock: WallRockCoal
WallRockBasalt: WallRockBasaltCoal
WallRockChromite: WallRockChromiteCoal
@@ -42,6 +45,7 @@
- type: biomeMarkerLayer
id: OreGold
entityMask:
AsteroidRock: AsteroidRockGold
WallRock: WallRockGold
WallRockBasalt: WallRockBasaltGold
WallRockChromite: WallRockChromiteGold
@@ -56,6 +60,7 @@
- type: biomeMarkerLayer
id: OreSilver
entityMask:
AsteroidRock: AsteroidRockSilver
WallRock: WallRockSilver
WallRockBasalt: WallRockBasaltSilver
WallRockChromite: WallRockChromiteSilver
@@ -71,6 +76,7 @@
- type: biomeMarkerLayer
id: OrePlasma
entityMask:
AsteroidRock: AsteroidRockPlasma
WallRock: WallRockPlasma
WallRockBasalt: WallRockBasaltPlasma
WallRockChromite: WallRockChromitePlasma
@@ -85,6 +91,7 @@
- type: biomeMarkerLayer
id: OreUranium
entityMask:
AsteroidRock: AsteroidRockUranium
WallRock: WallRockUranium
WallRockBasalt: WallRockBasaltUranium
WallRockChromite: WallRockChromiteUranium
@@ -98,6 +105,7 @@
- type: biomeMarkerLayer
id: OreBananium
entityMask:
AsteroidRock: AsteroidRockBananium
WallRock: WallRockBananium
WallRockBasalt: WallRockBasaltBananium
WallRockChromite: WallRockChromiteBananium
@@ -112,6 +120,7 @@
- type: biomeMarkerLayer
id: OreArtifactFragment
entityMask:
AsteroidRock: AsteroidRockArtifactFragment
WallRock: WallRockArtifactFragment
WallRockBasalt: WallRockBasaltArtifactFragment
WallRockChromite: WallRockChromiteArtifactFragment

View File

@@ -602,3 +602,63 @@
noiseType: OpenSimplex2
frequency: 2
tile: FloorAsteroidSand
# Asteroid
- type: biomeTemplate
id: Asteroid
layers:
- !type:BiomeEntityLayer
threshold: 0.85
noise:
seed: 2
noiseType: OpenSimplex2
fractalType: PingPong
allowedTiles:
- FloorAsteroidSand
entities:
- CrystalGreen
- CrystalPink
- CrystalOrange
- CrystalBlue
- CrystalCyan
- !type:BiomeEntityLayer
threshold: 0.95
noise:
seed: 1
noiseType: OpenSimplex2
frequency: 1
allowedTiles:
- FloorAsteroidSand
entities:
- FloraStalagmite1
- FloraStalagmite2
- FloraStalagmite3
- FloraStalagmite4
- FloraStalagmite5
- FloraStalagmite6
- !type:BiomeEntityLayer
threshold: -0.6
invert: true
noise:
seed: 0
noiseType: Perlin
fractalType: Ridged
octaves: 1
frequency: 0.1
gain: 0.5
allowedTiles:
- FloorAsteroidSand
entities:
- AsteroidRock
- !type:BiomeTileLayer
threshold: -1.0
tile: FloorAsteroidSand
variants:
- 0
- !type:BiomeTileLayer
threshold: 0.5
noise:
seed: 1
noiseType: OpenSimplex2
frequency: 2
tile: FloorAsteroidSand