Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
BiomeProfile Class Reference
Inheritance diagram for BiomeProfile:
EScriptable

Classes

class  BaseTile
 
class  Cluster
 
class  ClusterObj
 
class  Clusters
 
class  ClusterThing
 
class  SpawnList
 
class  SpawnListChara
 
class  SpawnListThing
 
class  Spawns
 
class  Style
 
class  Tile
 
class  TileBlock
 
class  TileFloor
 
class  TileGroup
 

Public Types

enum  DoorStyle {
  simpleWood , FirmWood , Stone , Jail ,
  Rune
}
 
enum  StairsStyle { Soil , Wood , Stone , Rock }
 

Public Member Functions

void Populate (Point point, bool interior=false)
 
void Reset ()
 

Static Public Member Functions

static void Init ()
 
- Static Public Member Functions inherited from EScriptable
static int rnd (int a)
 

Public Attributes

NoiseLayer layerBlock
 
BiomeID id
 
Color color
 
FowProfile fowProfile
 
TileGroup _exterior
 
TileGroup _interior
 
Style style
 
Spawns spawn
 
Clusters cluster
 
string tags
 
int floor_height
 

Static Public Attributes

static bool forceInitialize
 

Properties

TileGroup exterior [get]
 
TileGroup interior [get]
 
SourceMaterial.Row MatFloor [get]
 
SourceMaterial.Row MatSub [get]
 

Private Attributes

SourceMaterial.Row _mat
 
SourceMaterial.Row _matSub
 

Detailed Description

Definition at line 7 of file BiomeProfile.cs.

Member Enumeration Documentation

◆ DoorStyle

Enumerator
simpleWood 
FirmWood 
Stone 
Jail 
Rune 

Definition at line 9 of file BiomeProfile.cs.

◆ StairsStyle

Enumerator
Soil 
Wood 
Stone 
Rock 

Definition at line 18 of file BiomeProfile.cs.

Member Function Documentation

◆ Init()

static void BiomeProfile.Init ( )
inlinestatic

Definition at line 718 of file BiomeProfile.cs.

719 {
720 if (!forceInitialize)
721 {
722 return;
723 }
724 Debug.Log("Initializing Clusters");
725 foreach (BiomeProfile value in EClass.core.refs.biomes.dict.Values)
726 {
727 value.Reset();
728 }
729 forceInitialize = false;
730 }
static bool forceInitialize
UD_Biome dict
Definition: CoreRef.cs:142
Biomes biomes
Definition: CoreRef.cs:325
CoreRef refs
Definition: Core.cs:51
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
ICollection< TValue > Values
Definition: UDictionary.cs:29

References CoreRef.biomes, EClass.core, Debug, CoreRef.Biomes.dict, forceInitialize, Core.refs, Reset(), and UDictionary< TKey, TValue >.Values.

Referenced by BaseMapGen.Generate().

◆ Populate()

void BiomeProfile.Populate ( Point  point,
bool  interior = false 
)
inline

Definition at line 665 of file BiomeProfile.cs.

666 {
667 Cell cell = point.cell;
668 if (cell.obj != 0 || cell.Things.Count > 0)
669 {
670 return;
671 }
672 int count = this.cluster.obj.Count;
673 for (int i = 0; i < count + this.cluster.thing.Count; i++)
674 {
675 Cluster cluster = ((i >= count) ? ((Cluster)this.cluster.thing[i - count]) : ((Cluster)this.cluster.obj[i]));
676 if (cluster.density == 0f)
677 {
678 break;
679 }
680 if (Rand.Range(0f, 1f) > cluster.density)
681 {
682 continue;
683 }
684 switch (cluster.type)
685 {
686 case Cluster.Type.ScatterExterior:
687 if (interior)
688 {
689 continue;
690 }
691 break;
692 case Cluster.Type.ScatterInterior:
693 if (!interior)
694 {
695 continue;
696 }
697 break;
698 case Cluster.Type.ScatterNonObstacle:
699 if ((cell.Left.HasObstacle() ? 1 : 0) + (cell.Right.HasObstacle() ? 1 : 0) + (cell.Front.HasObstacle() ? 1 : 0) + (cell.Back.HasObstacle() ? 1 : 0) > 0)
700 {
701 continue;
702 }
703 break;
704 case Cluster.Type.ByWall:
705 if (cell.Left.hasDoor || cell.Right.hasDoor || cell.Front.hasDoor || cell.Back.hasDoor || (!cell.Left.HasBlock && !cell.Right.HasBlock && !cell.Front.HasBlock && !cell.Back.HasBlock))
706 {
707 continue;
708 }
709 break;
710 }
711 if (cluster.TryCreate(point))
712 {
713 break;
714 }
715 }
716 }
List< ClusterObj > obj
List< ClusterThing > thing
TileGroup interior
Clusters cluster
Definition: Cell.cs:7
bool HasBlock
Definition: Cell.cs:643
Cell Back
Definition: Cell.cs:153
Cell Front
Definition: Cell.cs:129
List< Thing > Things
Definition: Cell.cs:986
bool HasObstacle()
Definition: Cell.cs:1130
Cell Left
Definition: Cell.cs:165
byte obj
Definition: Cell.cs:38
Cell Right
Definition: Cell.cs:141
bool hasDoor
Definition: Cell.cs:258
Cell cell
Definition: Point.cs:51
Definition: Rand.cs:4
static int Range(int min, int max)
Definition: Rand.cs:42

References Cell.Back, Point.cell, cluster, Cell.Front, Cell.HasBlock, Cell.hasDoor, Cell.HasObstacle(), interior, Cell.Left, BiomeProfile.Clusters.obj, Cell.obj, Rand.Range(), Cell.Right, BiomeProfile.Clusters.thing, and Cell.Things.

Referenced by Crawler.Crawl(), MapGenDungen.OnGenerateTerrain(), GenRoom.Populate(), and MapGen.Populate().

◆ Reset()

void BiomeProfile.Reset ( )
inline

Definition at line 732 of file BiomeProfile.cs.

733 {
734 _mat = null;
735 _matSub = null;
736 }
SourceMaterial.Row _mat
SourceMaterial.Row _matSub

References _mat, and _matSub.

Referenced by Init().

Member Data Documentation

◆ _exterior

TileGroup BiomeProfile._exterior

Definition at line 627 of file BiomeProfile.cs.

◆ _interior

TileGroup BiomeProfile._interior

Definition at line 629 of file BiomeProfile.cs.

◆ _mat

SourceMaterial.Row BiomeProfile._mat
private

Definition at line 642 of file BiomeProfile.cs.

Referenced by Reset().

◆ _matSub

SourceMaterial.Row BiomeProfile._matSub
private

Definition at line 645 of file BiomeProfile.cs.

Referenced by Reset().

◆ cluster

Clusters BiomeProfile.cluster

Definition at line 635 of file BiomeProfile.cs.

Referenced by Populate().

◆ color

Color BiomeProfile.color

Definition at line 623 of file BiomeProfile.cs.

◆ floor_height

int BiomeProfile.floor_height

Definition at line 639 of file BiomeProfile.cs.

Referenced by MapGen.OnGenerateTerrain().

◆ forceInitialize

bool BiomeProfile.forceInitialize
static

Definition at line 617 of file BiomeProfile.cs.

Referenced by Init().

◆ fowProfile

FowProfile BiomeProfile.fowProfile

Definition at line 625 of file BiomeProfile.cs.

Referenced by BaseGameScreen.UpdateShaders().

◆ id

BiomeID BiomeProfile.id

Definition at line 621 of file BiomeProfile.cs.

Referenced by Critter.Create().

◆ layerBlock

NoiseLayer BiomeProfile.layerBlock

Definition at line 619 of file BiomeProfile.cs.

Referenced by MapGen.OnGenerateTerrain().

◆ spawn

Spawns BiomeProfile.spawn

Definition at line 633 of file BiomeProfile.cs.

Referenced by Region.OnAdvanceHour(), and SerializedCards.Restore().

◆ style

◆ tags

string BiomeProfile.tags

Definition at line 637 of file BiomeProfile.cs.

Referenced by GenBounds.TryAddMapPiece().

Property Documentation

◆ exterior

TileGroup BiomeProfile.exterior
get

◆ interior

TileGroup BiomeProfile.interior
get

Definition at line 649 of file BiomeProfile.cs.

650 {
651 get
652 {
653 if (_interior.floor.id != 0)
654 {
655 return _interior;
656 }
657 return exterior;
658 }
659 }
TileGroup exterior
TileGroup _interior

Referenced by PartialMap.Apply(), ZonePreEnterDigStairs.Execute(), and Populate().

◆ MatFloor

SourceMaterial.Row BiomeProfile.MatFloor
get

Definition at line 661 of file BiomeProfile.cs.

Referenced by MapGen.OnGenerateTerrain().

◆ MatSub

SourceMaterial.Row BiomeProfile.MatSub
get

Definition at line 663 of file BiomeProfile.cs.


The documentation for this class was generated from the following file: