Skip to content

sim_person_eow

Source: base/tealdef/gui/entity_window/sim_person/sim_person_eow.d.tl

Notes

Plugin types of the resident (sim person) window (sim_person_eow.script.tl).

SimPersonEow

record global base/tealdef/gui/entity_window/sim_person/sim_person_eow.d.tl:3

global record SimPersonEow

Load: local sim_person_eow = ug_require "/gui/entity_window/sim_person/sim_person_eow.script.tl"

Notes

Plugin types of the resident (sim person) window.

Fields

Name Type Description
SimPersonEowExtensionPoint ExtensionPoint<SimPersonWidgetPluginParams> Extension point of the resident window; register plugins with a resource of type "react-plugin ::SimPersonEowExtensionPoint". used 1× in the base game
SimPersonLocationsPlugin Recipe<SimPersonWidgetPluginParams> "Locations" card with the home, shop and work destinations of the person; registered with order 20.
SimPersonHappinessPlugin Recipe<SimPersonWidgetPluginParams> "Happiness" card with the happiness bar and a collapsible happiness history; registered with order 30.
SimPersonRoutePlugin Recipe<SimPersonWidgetPluginParams> "Current Route" card with origin, move mode, line and target; registered with order 40.

SimPersonEow.SimPersonEowState

record base/tealdef/gui/entity_window/sim_person/sim_person_eow.d.tl:4

record SimPersonEowState

Notes

State of the resident window, recomputed every step and passed to the plugins.

Used in the base game: 1 time in 1 file

base/content/gui/gui/entity_window/sim_person/sim_person.tl:14

local makePersonState = function() : SimPersonEow.SimPersonEowState

Fields

Name Type Description
happiness number Happiness of the person (SIM_PERSON.happiness, up to 1).
changeTendency number Shown trend of the happiness, either 0.05 (rising, e.g. while at a building), -0.05 (falling, e.g. when late or waiting more than two minutes at a terminal) or 0.
isInCar boolean True if the person currently drives a car (has a LAND_VEHICLE component).
destinationTargetIndex integer Index of the destination the person is heading to or is at (0 home, 1 shop, 2 work).
moveMode MoveMode Move mode of the current trip (SIM_PERSON.lastMoveMode).
destinationOriginIndex integer Destination index the trip started from; for trips home it is the last non-residential destination type, otherwise 0.
lineId Engine.Entity Line of the vehicle the person is in or waiting for, or nil.
atBuilding boolean True while the person is at a building.

SimPersonEow.SimPersonWidgetPluginParams

record base/tealdef/gui/entity_window/sim_person/sim_person_eow.d.tl:15

record SimPersonWidgetPluginParams is EowExtensionUtil.IEowWidgetsExtensionParams

Notes

Parameters passed to the plugins of the resident window.

Used in the base game: 4 times in 2 files

base/content/gui/gui/entity_window/sim_person/sim_person_eow.script.tl:431

sim_person_eow.SimPersonLocationsPlugin = react.RegisterPluginRecipe(sim_person_eow.SimPersonEowExtensionPoint, "SimPersonLocationsPlugin", function(extensionPa
base/content/gui/gui/entity_window/sim_person/sim_person.tl:126
local extensionParams : SimPersonEow.SimPersonWidgetPluginParams = {

Fields

Name Type Description
state SimPersonEowState Window state.