Spider
Based on game build 714014 | Last updated: 2026-02-27
Overview
This file defines three static room templates used during world generation to create spider-dominant areas. It does not implement a reusable Component class; instead, it registers three unique room configurations (SpiderCity, SpiderVillage, and SpiderVillageSwamp) using the AddRoom() API. Each template specifies visual appearance (via colour), terrain type (value), and content rules for placing prefabs (e.g., spiderden, goldnugget, and biome-specific vegetation).
Usage example
Room templates defined here are not instantiated manually. They are automatically applied by the world generator when room placement algorithms select them. Example of how a room generator might internally reference them:
-- Not directly usable, but used by worldgen tasksets like "forest.lua"
AddRoom("Forest", {
contents = {
rooms = {
"SpiderCity",
"SpiderVillage",
-- other rooms...
}
}
})
Dependencies & tags
Components used: None (this file does not define or interact with Entity Component System components). Tags: None identified.
Properties
No properties are defined, as this file only invokes AddRoom() with static configuration tables.
Main functions
AddRoom(name, roomdef)
- Description: Registers a new room template named
namefor use in procedural world generation. Theroomdeftable defines how the room is placed and what it contains. - Parameters:
name(string): Unique identifier for the room (e.g.,"SpiderCity").roomdef(table): Configuration table specifyingcolour,value, andcontents.
- Returns: None (calls internal registration logic).
- Error states: None documented; uses validated
AddRoomimplementation.
Events & listeners
No event handling is present in this file.