interiors

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package interiors keeps the rooms of the board's cells and who stands in each: it tells the rules as one comes in and goes out, and has whoever is in a room drawn in the light that gets into it.

NewPlugin takes the world and the board. Run its RunPlan after the board's.

A room

A room is a thing standing in pieces (world.Whole): its pieces are the floors with a room of its cells (cell.Floor with Clear, dug or Standing), its handle marked Room, its floor as high as the handle's world.Z. What of the sky's light gets into it is the handle's light.Shelter, laid by whoever builds the room: the sun by its openings, windows and doors on its walls, a share of the sky's light and of the sun's thrown round, and its lamp. A house's room is the buildings plugin's, a tunnel's and a chamber's the underground's.

Who is in it

An entity on the board stands in the room whose floor its feet are on: it carries Inside while it does, the rules hosted on Entered and Left told once as it comes in and goes out, and is light.Sheltered under its handle's shelter, where it has one: drawn in the light that gets in there, worked out on the GPU pixel by pixel, casting no shadow. Read says which room lies on a cell's storey, whether an entity drawn uncovered stands in it (for whoever draws what covers the room) and its lamp's light.

Vocabulary

Moments, for a role's rules: Entered, Left. Components: Room (marking a room's handle), Inside (on whoever stands in one).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entered

type Entered struct {
	ID, Room uid.UID64
}

Entered is an entity coming into a room, told once as it does: Room is the room's whole.

func (Entered) Who

func (e Entered) Who() uid.UID64

Who is the entity coming in.

type Inside

type Inside struct{ Room uid.UID64 }

Inside is the room an entity on the board stands in, its whole; none where it is in none.

type Left

type Left struct {
	ID, Room uid.UID64
}

Left is an entity going out of a room, told once as it does: Room is the room's whole.

func (Left) Who

func (l Left) Who() uid.UID64

Who is the entity going out.

type Plugin

type Plugin struct {
	*world.Self
	// contains filtered or unexported fields
}

Plugin keeps the rooms of the board's cells and who stands in each, and tells the rules as one comes in and goes out.

func NewPlugin

func NewPlugin(w *world.Plugin, brd *board.Plugin) *Plugin

NewPlugin builds the plugin of the rooms of the board brd's cells in the world w.

func (*Plugin) EventHandler

func (p *Plugin) EventHandler() control.EventHandler

func (*Plugin) Install

func (p *Plugin) Install(ctx plugin.Installer) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Read

func (p *Plugin) Read(int) *Read

Read reads the rooms on the game's goroutine.

func (*Plugin) RunPlan

func (p *Plugin) RunPlan(ctx goke.RunCtx, d time.Duration)

RunPlan finds who stands in which room in the simulation; call it after the board's.

func (*Plugin) Serializable

func (p *Plugin) Serializable() plugin.Serializable

Serializable is nil: the rooms and who is in them are entities, saved as any.

func (*Plugin) String

func (p *Plugin) String() string

type Read

type Read struct {
	// contains filtered or unexported fields
}

Read reads the rooms on the game's goroutine.

func (*Read) At

func (r *Read) At(c cell.ID, storey uint8) (uid.UID64, bool)

At is the room whose floor lies on the storey of c, its whole, as the last step found.

func (*Read) Bared

func (r *Read) Bared(room uid.UID64) bool

Bared reports whether an entity drawn uncovered stands in the room whose whole is room, as the last step found.

func (*Read) Lamp

func (r *Read) Lamp(room uid.UID64) [3]float32

Lamp is the light of the lamp of the room whose whole is room, its light.Shelter's, as the last step found; zero, it has none.

type Room

type Room struct{}

Room marks a room's whole (world.Whole), whose pieces are the floors with a room of its cells (cell.Floor), its floor as high as the whole's world.Z: the plugin keeps who stands in it. What of the sky's light gets into it is the whole's light.Shelter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL