clothing

package
v0.0.0-...-a30bc99 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package clothing provides methods and tools for generating fantasy clothing styles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Name           string `json:"name"`
	Type           string `json:"type"`
	MaterialType   string `json:"material_type"`
	PrefixModifier string `json:"prefix_modifier"`
	SuffixModifier string `json:"suffix_modifier"`
}

Item is a type of clothing item

func GenerateOutfit

func GenerateOutfit(temperature int, gender string) ([]Item, error)

GenerateOutfit generates a random outfit based on environment temperature and gender

func (Item) Describe

func (item Item) Describe() string

Describe creates a prose description for an item

type ItemTemplate

type ItemTemplate struct {
	Name            string   `json:"name"`
	Type            string   `json:"type"`
	MaterialType    string   `json:"material_type"`
	PrefixModifiers []string `json:"prefix_modifiers"`
	SuffixModifiers []string `json:"suffix_modifiers"`
}

ItemTemplate is a pattern for constructing an item

type SimplifiedStyle

type SimplifiedStyle struct {
	FemaleOutfit    []string `json:"female_outfit"`
	MaleOutfit      []string `json:"male_outfit"`
	CommonJewelry   []string `json:"common_jewelry"`
	CommonColors    []string `json:"common_colors"`
	DecorativeStyle string   `json:"decorative_style"`
}

SimplifiedStyle is a simplified version of clothing style for display

type Style

type Style struct {
	Description     string   `json:"description"`
	FemaleOutfit    []Item   `json:"female_outfit"`
	MaleOutfit      []Item   `json:"male_outfit"`
	CommonJewelry   []string `json:"common_jewelry"`
	CommonColors    []string `json:"common_colors"`
	DecorativeStyle string   `json:"decorative_style"`
}

Style describes what kind of clothing the culture wears

func GenerateStyle

func GenerateStyle(temperature int, resources []resource.Resource) (Style, error)

GenerateStyle generates a random clothing style based on a climate

func Random

func Random() (Style, error)

Random generates a completely random clothing style

func (Style) Describe

func (style Style) Describe() string

Describe creates a prose description for a clothing style

func (Style) Simplify

func (style Style) Simplify() SimplifiedStyle

Simplify returns a simplified style for display

Jump to

Keyboard shortcuts

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