Skip to content

Fissures

McArthur edited this page Oct 3, 2023 · 9 revisions

Fissure

Fissure is a subclass of PlaceableEntity. It is a special type of PlaceableEntity that cannot be unlocked, but is instead spawned as part of the level initialization (and can be initialized in the config files). These utilize the particle component to produce flashy effects indicating their produced resource.

Fissures are used to control the placement locations of extractors, and determine the resource produced by extractors based on their stored resource.

Initialization

A fissure entry can be added to fissures.json with a value like this:

    {
      class: com.csse3200.game.entities.configs.FissureConfig,
      "resource": "Durasteel",
      "position": {
        "x": 46,
        "y": 34
      }
    }

This will initialize a new fissure in the level, at the given location.

Interaction with StructurePlacementService

The fissure is an irremovable structure, and as such will block other structures. It does not block movement however, and has no collision. As such, it cannot be built on, however the ExtractorTool has a rejection function uniquely designed to allow placement, which calls remove manually on the fissure simultaneously.

Effects

Below are the currently available effects, based on the chosen resource:

Solstite Nebulite Durasteel

Diagram

The below UML diagram serves to highlight how the fissure connects components, and so does not contain the properties of other classes (except those relevant).

classDiagram
    class Entity {
    }
    class PlaceableEntity {
    }
    class Fissure {
        + irremovable : Boolean
        + update()
    }
    class TextureRenderComponent
    class ParticleEffectsConfig
    class ParticleComponent
    class FissureComponent {
        + produces : Resource
        + getProduces() : Resource
    }
    Entity <|-- PlaceableEntity
    PlaceableEntity <|-- Fissure
    TextureRenderComponent o-- Fissure
    ParticleComponent o-- Fissure
    ParticleEffectsConfig o-- Fissure
    FissureComponent o-- Fissure

Loading
Clone this wiki locally