Skip to content

Commit

Permalink
refactor gun safe spawners to use entity tables (#1803)
Browse files Browse the repository at this point in the history
Co-authored-by: deltanedas <@deltanedas:kde.org>
  • Loading branch information
deltanedas authored Sep 11, 2024
1 parent eccbcfb commit 0b20628
Showing 1 changed file with 39 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
- type: entity
abstract: true
parent: MarkerBase
id: BaseGunSafeSpawner
name: random safe spawner
parent: MarkerBase
abstract: true
components:
- type: Sprite
layers:
- state: red
- sprite: Structures/Storage/closet.rsi
state: shotguncase
- type: RandomSpawner
offset: 0
- type: Sprite
layers:
- state: red
- sprite: Structures/Storage/closet.rsi
state: shotguncase
- type: EntityTableSpawner
offset: 0

- type: entity
suffix: Shotgun
id: ShotgunSafeSpawner
parent: BaseGunSafeSpawner
id: ShotgunSafeSpawner
suffix: Shotgun
components:
- type: RandomSpawner
prototypes:
- GunSafeShotgunEnforcer
- GunSafeShotgunKammerer
- GunSafeAdjutantShotgun
- type: EntityTableSpawner
table: !type:GroupSelector
children:
- id: GunSafeShotgunEnforcer
- id: GunSafeShotgunKammerer
- id: GunSafeAdjutantShotgun

- type: entity
suffix: Rifle
id: RifleSafeSpawner
parent: BaseGunSafeSpawner
id: RifleSafeSpawner
suffix: Rifle
components:
- type: RandomSpawner
prototypes:
- GunSafeVulcanRifle
- GunSafeSubMachineGunDrozd
- GunSafeRifleLecter
- GunSafeM90Rifle
- type: EntityTableSpawner
table: !type:GroupSelector
children:
- id: GunSafeVulcanRifle
- id: GunSafeSubMachineGunDrozd
- id: GunSafeRifleLecter
- id: GunSafeM90Rifle

- type: entity
suffix: Handgun
id: HandgunSafeSpawner
parent: BaseGunSafeSpawner
id: HandgunSafeSpawner
suffix: Handgun
components:
- type: RandomSpawner
prototypes:
- GunSafePistolMk58
rarePrototypes:
- GunSafeEnergyGunMini
- GunSafePistolUniversal
- GunSafeSubMachineGunWt550
rareChance: 0.15
- type: EntityTableSpawner
table: !type:GroupSelector
children:
- id: GunSafePistolMk58
weight: 0.85
- !type:GroupSelector
weight: 0.15
children:
- id: GunSafeEnergyGunMini
- id: GunSafePistolUniversal
- id: GunSafeSubMachineGunWt550

0 comments on commit 0b20628

Please sign in to comment.