Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/loot_generator

Vars

lootGridThe loot grid (inventory grid) this generator is using
populatedWhether loot weights have been generated yet.
spawned_instancesASsociative list of loot instances this generator created.
spawnersThe spawner associated with the X & Y Size. so spawners[1][2] is 1 wide, 2 tall
tagsList for passing information to spawners (for example, ammo spawners would need to know what guns this spawner made)
totalWeightsAssociative list, spawners to their childrens' total weight, as a number
weightsAssociative list, spawners to their childrens individual weight, as a list

Procs

add_loot_instancecreates a loot object and offset info
add_random_lootAdd multiple random loot objects, in random positions
add_random_loot_sequentialAdd multiple random loot objects. bottom left to top right. this looks gross in practise and prioritises just making large high-ticket items
choose_random_loot_sizeChooses the size of loot to spawn, given a max and min.
fill_remainingFills all remaining space with instances of random size
fill_remaining_with_instanceFills all remaining space with as many instances as possible of a loot object that's been created externally Ignores override, due to infinite loop.
pick_weighted_optionuse predefined weights pick a spawner of size xSize, ySize, in chosenTIer
place_loot_instanceplace a loot object that's been created externally
place_random_lootPlace a random loot instance at a specific position
place_random_loot_sizedPlace a random loot instance of a specific size at a specific position
populateInitialize spawners & weights for all random loot spawners
tag_listAdds an entry to a list in this spawner's tags.
tag_singleset the value of this spawner's tag.

Var Details

lootGrid

The loot grid (inventory grid) this generator is using

populated

Whether loot weights have been generated yet.

spawned_instances

ASsociative list of loot instances this generator created.

spawners

The spawner associated with the X & Y Size. so spawners[1][2] is 1 wide, 2 tall

tags

List for passing information to spawners (for example, ammo spawners would need to know what guns this spawner made)

totalWeights

Associative list, spawners to their childrens' total weight, as a number

weights

Associative list, spawners to their childrens individual weight, as a list

Proc Details

add_loot_instance

creates a loot object and offset info

add_random_loot

Add multiple random loot objects, in random positions

add_random_loot_sequential

Add multiple random loot objects. bottom left to top right. this looks gross in practise and prioritises just making large high-ticket items

choose_random_loot_size

Chooses the size of loot to spawn, given a max and min.

fill_remaining

Fills all remaining space with instances of random size

fill_remaining_with_instance

Fills all remaining space with as many instances as possible of a loot object that's been created externally Ignores override, due to infinite loop.

pick_weighted_option

use predefined weights pick a spawner of size xSize, ySize, in chosenTIer

place_loot_instance

place a loot object that's been created externally

place_random_loot

Place a random loot instance at a specific position

place_random_loot_sized

Place a random loot instance of a specific size at a specific position

populate

Initialize spawners & weights for all random loot spawners

tag_list

Adds an entry to a list in this spawner's tags.

tag_single

set the value of this spawner's tag.