assets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 1 Imported by: ? modules, 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 assets defines the boundary through which the otherwise-pure simulation obtains unit definitions and scripts. The native server build backs this with the virtual filesystem; the wasm build backs it with HTTP fetches against the studio asset endpoints (or a bundled pack). Keeping the interface here lets engine/sim and engine/session stay free of any I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpawnFunc

func SpawnFunc(p Provider) sim.SpawnFunc

SpawnFunc adapts a Provider into the sim.SpawnFunc the world calls when a Spawn order arrives.

Types

type Provider

type Provider interface {
	// Unit returns the stat block and (optional) COB script binding for a unit
	// type, or ok=false if the type is unknown.
	Unit(name string) (meta *sim.UnitMeta, binding sim.Binding, ok bool)
}

Provider resolves a unit type name into its simulation metadata and an optional script binding. Implementations live outside the engine core so the core never imports os, net or a filesystem.

Jump to

Keyboard shortcuts

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