mission_task_build_construction_util¶
Quelle: base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl
Hinweise
Prüfungen von Bauvorschlägen für die Bauaufgabe und für andere Aufgaben, die filtern, was der Spieler bauen darf.
Globale Namen¶
Typen
| Name | Definition | Beschreibung |
|---|---|---|
MissionInterface |
hier deklariert, definiert in MissionInterface |
Namensraum der Kerntypen des Missions-Frameworks. Eine Mission ist eine Liste von Aufgaben. Jede Aufgabe läuft über ein TaskScript und wird durch statische Daten beschrieben. |
BuildConstructionUtil¶
record global base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:5
global record BuildConstructionUtil
Laden: local build_construction_util = ug_require "::/mission/tasks/build_construction/mission_task_build_construction_util.tl" as BuildConstructionUtil
Hinweise
Prüfungen von Bauvorschlägen für Missionsaufgaben. Jedes checkX testet eine Eigenschaft eines Bauvorschlags, jedes makeCheckX gibt diese Prüfung als Funktion für ein Feld von HandleProposalEventConfig zurück.
Details
Eine Prüfung gibt true zurück, wenn der Vorschlag sie besteht. Sonst gibt sie das ihr
übergebene failureResult zurück (der Spieler sieht es) oder false/nil; dann ignoriert
der Handler den Vorschlag. Der Handler führt die Prüfungen in dieser Reihenfolge aus:
checkBuilderId, checkSignal, checkSignalLocation, checkSignalDirection, checkStop,
checkStopLocation, checkConstruction, checkLocation, checkRestrictedArea,
checkSnapping. Es entscheidet die erste Prüfung, die nicht besteht.
Funktionen
makeProposalHandlerFilterApply(filterApply : BuildConstructionUtil.HandleProposalEventConfig<any>, whitelist : boolean) : ProposalHandlerConfig base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:13
Aufruf: build_construction_util.makeProposalHandlerFilterApply(…)
Hinweise
Verwendet dieselben Prüfungen für Vorschauen und für angewendete Vorschläge.
| Parameter | Typ | Beschreibung |
|---|---|---|
filterApply |
BuildConstructionUtil.HandleProposalEventConfig<any> |
Die zu verwendenden Prüfungen. |
whitelist |
boolean |
Markiert bestandene Ergebnisse als Whitelist-Ergebnisse. |
Rückgabe ProposalHandlerConfig: Konfiguration des Proposal-Handlers.
Im Basisspiel verwendet: 13-mal in 6 Dateien
base/content/mission/mission/tutorial/tutorial_story.tl:442
base/content/mission/mission/tutorial/tutorial_story_util.tl:161
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:775
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story_cutscenes_only.tl:55
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:214
mods/release/urbangames_campaign_mission_04/content/mission/mission/mission_story.tl:395
checkStreetTerminalBuilderId<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>, failureResult : MissionInterface.ProposalHandlerResult) : boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:38
Aufruf: build_construction_util.checkStreetTerminalBuilderId(…)
Hinweise
Lässt Vorschläge des Werkzeugs für Straßenhaltestellen (streetTerminalBuilder) durch.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für andere Werkzeuge. |
Rückgabe boolean: true oder failureResult (false, wenn nicht gesetzt).
makeCheckStreetTerminalBuilderId(failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:39
Aufruf: build_construction_util.makeCheckStreetTerminalBuilderId(…)
Hinweise
Gibt checkStreetTerminalBuilderId mit fest gebundenem Fehlerergebnis zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für andere Werkzeuge. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : boolean: Prüffunktion.
Im Basisspiel verwendet: 3-mal in 3 Dateien
base/content/mission/mission/tutorial/tutorial_story_util.tl:162
checkBuilderId = build_construction_util.makeCheckStreetTerminalBuilderId({ error = _("Not a Stop!") }),
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story_cutscenes_only.tl:56
checkBuilderId = build_construction_util.makeCheckStreetTerminalBuilderId({ error = _("Not a Stop!") }),
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:215
checkConstructionBuilderId<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>, failureResult : MissionInterface.ProposalHandlerResult) : boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:41
Aufruf: build_construction_util.checkConstructionBuilderId(…)
Hinweise
Lässt Vorschläge des Bauwerkzeugs für Konstruktionen (constructionBuilder) durch.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für andere Werkzeuge. |
Rückgabe boolean: true oder failureResult (false, wenn nicht gesetzt).
makeCheckConstructionBuilderId(failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:42
Aufruf: build_construction_util.makeCheckConstructionBuilderId(…)
Hinweise
Gibt checkConstructionBuilderId mit fest gebundenem Fehlerergebnis zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für andere Werkzeuge. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : boolean: Prüffunktion.
Im Basisspiel verwendet: 7-mal in 3 Dateien
base/content/mission/mission/tutorial/tutorial_story.tl:443
checkBuilderId = build_construction_util.makeCheckConstructionBuilderId({ error = _("Pick the Headquarters!") }),
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:776
checkBuilderId = build_construction_util.makeCheckConstructionBuilderId({ error = _("MISSION_PROPOSAL_FEEDBACK_NOT_A_ROAD_DEPOT") }),
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:753
checkSignal<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:45
Aufruf: build_construction_util.checkSignal(…)
Hinweise
Lässt einen Vorschlag durch, der ein Segment ersetzt und genau ein Kantenobjekt hinzufügt, nämlich ein Signal.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult.
makeCheckSignal(failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:46
Aufruf: build_construction_util.makeCheckSignal(…)
Hinweise
Gibt checkSignal mit fest gebundenem Fehlerergebnis zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
checkSignalLocation<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, baseEdgeEntities : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:48
Aufruf: build_construction_util.checkSignalLocation(…)
Hinweise
Lässt einen Vorschlag durch, der ein Signal auf einer der angegebenen Kanten hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
baseEdgeEntities |
{Engine.Entity} |
Erlaubte Kanten. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult.
makeCheckSignalLocation(baseEdgeEntities : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:49
Aufruf: build_construction_util.makeCheckSignalLocation(…)
Hinweise
Gibt checkSignalLocation mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
baseEdgeEntities |
{Engine.Entity} |
Erlaubte Kanten. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
checkSignalDirection<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, baseEdgeEntitiesAndLeft : {Engine.Entity : boolean}, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:51
Aufruf: build_construction_util.checkSignalDirection(…)
Hinweise
Lässt einen Vorschlag durch, der ein Signal auf einer der angegebenen Kanten auf der geforderten Seite hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
baseEdgeEntitiesAndLeft |
{Engine.Entity : boolean} |
Erlaubte Kante -> geforderter Wert des Flags left des Signals. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult.
makeCheckSignalDirection(baseEdgeEntitiesAndLeft : {Engine.Entity : boolean}, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:52
Aufruf: build_construction_util.makeCheckSignalDirection(…)
Hinweise
Gibt checkSignalDirection mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
baseEdgeEntitiesAndLeft |
{Engine.Entity : boolean} |
Erlaubte Kante -> geforderter Wert des Flags left. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
checkStop<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:54
Aufruf: build_construction_util.checkStop(…)
Hinweise
Lässt einen Vorschlag durch, der ein Segment ersetzt und eine oder zwei Straßenhaltestellen hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult.
makeCheckStop(failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:55
Aufruf: build_construction_util.makeCheckStop(…)
Hinweise
Gibt checkStop mit fest gebundenem Fehlerergebnis zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
Im Basisspiel verwendet: 2-mal in 2 Dateien
base/content/mission/mission/tutorial/tutorial_story_util.tl:163
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story_cutscenes_only.tl:57
checkStopLocation<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, baseEdgeEntities : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:57
Aufruf: build_construction_util.checkStopLocation(…)
Hinweise
Lässt einen Vorschlag durch, der eine oder zwei Straßenhaltestellen auf einer der angegebenen Kanten hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
baseEdgeEntities |
{Engine.Entity} |
Erlaubte Kanten. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult.
makeCheckStopLocation(baseEdgeEntities : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:58
Aufruf: build_construction_util.makeCheckStopLocation(…)
Hinweise
Gibt checkStopLocation mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
baseEdgeEntities |
{Engine.Entity} |
Erlaubte Kanten. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
Im Basisspiel verwendet: 2-mal in 2 Dateien
base/content/mission/mission/tutorial/tutorial_story_util.tl:164
checkStopLocation = build_construction_util.makeCheckStopLocation(edges, { error = _("MISSION_PROPOSAL_FEEDBACK_NOT_IN_OUTLINED_AREA") }),
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story_cutscenes_only.tl:58
{ error = _("MISSION_PROPOSAL_FEEDBACK_NOT_A_CARGO_ROAD_STATION") }
checkConstruction<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, conFileName : string, hasCargoPlatform : boolean, failureResult : MissionInterface.ProposalHandlerResult, customCheck? : function(Proposal.ConstructionEntity) : boolean) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:62
Aufruf: build_construction_util.checkConstruction(…)
Hinweise
Lässt einen Vorschlag durch, dessen erste neue Konstruktion die angegebene Datei hat, customCheck besteht und, wenn hasCargoPlatform nicht nil ist, diesen Wert des Frachtbahnsteig-Flags hat.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
conFileName |
string |
Geforderte Konstruktionsdatei. |
hasCargoPlatform |
boolean |
Geforderter Wert des Frachtbahnsteig-Flags; nil akzeptiert beides. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
customCheck? |
function(Proposal.ConstructionEntity) : boolean |
Zusätzlicher Test der vorgeschlagenen Konstruktion. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult (false, wenn nicht gesetzt).
makeCheckConstruction(conFileName : string, hasCargoPlatform : boolean, failureResult : MissionInterface.ProposalHandlerResult, customCheck? : function(Proposal.ConstructionEntity) : boolean) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:63
Aufruf: build_construction_util.makeCheckConstruction(…)
Hinweise
Gibt checkConstruction mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
conFileName |
string |
Geforderte Konstruktionsdatei. |
hasCargoPlatform |
boolean |
Geforderter Wert des Frachtbahnsteig-Flags; nil akzeptiert beides. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
customCheck? |
function(Proposal.ConstructionEntity) : boolean |
Zusätzlicher Test der vorgeschlagenen Konstruktion. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
Im Basisspiel verwendet: 8-mal in 4 Dateien
base/content/mission/mission/tutorial/tutorial_story.tl:444
checkConstruction = build_construction_util.makeCheckConstruction("::/landmarks/hq/headquarter.con", nil, { error = _("Pick the Headquarters!") }),
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:777
checkConstruction = build_construction_util.makeCheckConstruction("::/depots/road/road_depot/road_depot.con", nil, { error = _("MISSION_PROPOSAL_FEEDBACK_NOT_A_
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:754
checkConstruction = build_construction_util.makeCheckConstruction("::/depots/road/road_depot/road_depot.con", nil, { error = _("MISSION_PROPOSAL_FEEDBACK_NOT_A_
mods/release/urbangames_campaign_mission_04/content/mission/mission/mission_story.tl:396
{ error = _("MISSION_PROPOSAL_FEEDBACK_NOT_CONNECTED_TO_CROSSING") }
checkSnapping<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, snapAnyOf : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:66
Aufruf: build_construction_util.checkSnapping(…)
Hinweise
Lässt einen Vorschlag durch, dessen neue Segmente einen der angegebenen vorhandenen Knoten verwenden, bei leerer Liste irgendeinen vorhandenen Knoten.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
snapAnyOf |
{Engine.Entity} |
Knoten, von denen einer verwendet werden muss. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult (false, wenn nicht gesetzt).
makeCheckSnapping(snapAnyOf : {Engine.Entity}, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:67
Aufruf: build_construction_util.makeCheckSnapping(…)
Hinweise
Gibt checkSnapping mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
snapAnyOf |
{Engine.Entity} |
Knoten, von denen einer verwendet werden muss; leer oder nil akzeptiert jeden vorhandenen Knoten. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
Im Basisspiel verwendet: 4-mal in 3 Dateien
base/content/mission/mission/tutorial/tutorial_story.tl:852
checkSnapping = build_construction_util.makeCheckSnapping({}, { error = _("MISSION_PROPOSAL_FEEDBACK_NOT_CONNECTED_TO_STREET") }),
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:779
checkSnapping = build_construction_util.makeCheckSnapping({}, { error = _("MISSION_PROPOSAL_FEEDBACK_NOT_CONNECTED_TO_STREET") }),
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:756
{ error = _("MISSION_PROPOSAL_FEEDBACK_NOT_IN_OUTLINED_AREA") }
checkLocation<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, targetPosX : number, targetPosY : number, targetMaxDist : number, failureResult : MissionInterface.ProposalHandlerResult) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:71
Aufruf: build_construction_util.checkLocation(…)
Hinweise
Lässt einen Vorschlag durch, dessen erste neue Konstruktion höchstens targetMaxDist Meter von der Zielposition entfernt ist.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
targetPosX |
number |
X-Koordinate des Ziels. |
targetPosY |
number |
Y-Koordinate des Ziels. |
targetMaxDist |
number |
Höchster Abstand in Metern. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true oder failureResult (false, wenn nicht gesetzt).
makeCheckLocation(targetPosX : number, targetPosY : number, targetMaxDist : number, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:72
Aufruf: build_construction_util.makeCheckLocation(…)
Hinweise
Gibt checkLocation mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
targetPosX |
number |
X-Koordinate des Ziels. |
targetPosY |
number |
Y-Koordinate des Ziels. |
targetMaxDist |
number |
Höchster Abstand in Metern. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
Im Basisspiel verwendet: 6-mal in 3 Dateien
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story.tl:778
checkLocation = build_construction_util.makeCheckLocation(params.streetDepotZone.pos[1], params.streetDepotZone.pos[2], 20, { error = _("MISSION_PROPOSAL_FEEDBA
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:755
checkLocation = build_construction_util.makeCheckLocation(params.streetDepotZone.pos[1], params.streetDepotZone.pos[2], 20, { error = _("MISSION_PROPOSAL_FEEDBA
mods/release/urbangames_campaign_mission_04/content/mission/mission/mission_story.tl:397
makeCheckLocations(tagetPositions : {{number, number}}, targetMaxDist : number, failureResult : MissionInterface.ProposalHandlerResult) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:73
Aufruf: build_construction_util.makeCheckLocations(…)
Hinweise
Gibt eine Prüfung zurück, die besteht, wenn die Konstruktion in der Nähe einer von mehreren Positionen liegt.
| Parameter | Typ | Beschreibung |
|---|---|---|
tagetPositions |
{{number, number}} |
Zielpositionen {x, y}. |
targetMaxDist |
number |
Höchster Abstand in Metern. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis im anderen Fall. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
checkRestrictedArea<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams, areas : {PolygonUtil.Polygon}, failureResult : MissionInterface.ProposalHandlerResult, allowStreetTerminalBuilder? : boolean) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:75
Aufruf: build_construction_util.checkRestrictedArea(…)
Hinweise
Blockiert Vorschläge, die in den Bereichen bauen, abreißen oder Knoten hinzufügen, und jedes Werkzeug außer dem Bauwerkzeug für Konstruktionen, dem Bulldozer und den Werkzeugen für Gleis- und Straßenbau.
| Parameter | Typ | Beschreibung |
|---|---|---|
event |
BuildConstructionUtil.HandleProposalEventParams |
Event des Bauvorschlags. |
areas |
{PolygonUtil.Polygon} |
Gesperrte Polygone. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für Änderungen innerhalb der Bereiche. |
allowStreetTerminalBuilder? |
boolean |
Erlaubt zusätzlich das Werkzeug für Straßenhaltestellen. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, failureResult oder ein Fehlerergebnis für andere Werkzeuge.
makeRestrictedArea(areas : {PolygonUtil.Polygon}, failureResult : MissionInterface.ProposalHandlerResult, allowStreetTerminalBuilder? : boolean) : function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:76
Aufruf: build_construction_util.makeRestrictedArea(…)
Hinweise
Gibt checkRestrictedArea mit fest gebundenen Argumenten zurück.
| Parameter | Typ | Beschreibung |
|---|---|---|
areas |
{PolygonUtil.Polygon} |
Gesperrte Polygone. |
failureResult |
MissionInterface.ProposalHandlerResult |
Ergebnis für Änderungen innerhalb der Bereiche. |
allowStreetTerminalBuilder? |
boolean |
Erlaubt zusätzlich das Werkzeug für Straßenhaltestellen. |
Rückgabe function<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean: Prüffunktion.
handleConstructionProposal<TaskContext>(event : BuildConstructionUtil.HandleProposalEventParams<TaskContext>, config : HandleProposalEventConfig<TaskContext>, taskApi : MissionInterface.DeferredTaskApi, isWhitelist : boolean) : MissionInterface.ProposalHandlerResult base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:80
Aufruf: build_construction_util.handleConstructionProposal(…)
this is the 'master' function for 'builder.proposalCreate'
BuildConstructionUtil.ProposalHandlerConfig¶
record base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:7
record ProposalHandlerConfig
Hinweise
Prüfungen für Vorschauen von Bauvorschlägen (Filter) und für angewendete Vorschläge (Erfolg).
Im Basisspiel verwendet: 6-mal in 5 Dateien
base/content/mission/mission/tasks/build_construction/build_construction.tl:27
base/content/mission/mission/tasks/build_construction/mission_task_build_construction_util.tl:399
function build_construction_util.makeProposalHandlerFilterApply(filterApply : BuildConstructionUtil.HandleProposalEventConfig<any>, whitelist : boolean) : Build
base/content/mission/mission/tutorial/tutorial_story_util.tl:160
tutorial_story_util.makeStopConfig = function(edges : {Engine.Entity}) : BuildConstructionUtil.ProposalHandlerConfig
mods/release/urbangames_campaign_mission_01/content/mission/mission/mission_story_cutscenes_only.tl:54
local makeStopConfig = function(edges : {Engine.Entity}) : BuildConstructionUtil.ProposalHandlerConfig
mods/release/urbangames_campaign_mission_02/content/mission/mission/mission_story.tl:208
Felder
| Name | Typ | Beschreibung |
|---|---|---|
proposalApply |
BuildConstructionUtil.HandleProposalEventConfig<any> |
to detect success |
proposalFilter |
BuildConstructionUtil.HandleProposalEventConfig<any> |
to disallow stuff |
proposalFilterWhitelist |
boolean |
controls how multiple proposal handlers are combined |
BuildConstructionUtil.HandleProposalEventParams¶
record base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:15
record HandleProposalEventParams<TaskContext>
Hinweise
Ein Event zu einem Bauvorschlag, das an die Prüfungen geht.
Im Basisspiel verwendet: 51-mal in 2 Dateien
base/content/mission/mission/tasks/build_construction/build_construction.tl:28
base/content/mission/mission/tasks/build_construction/mission_task_build_construction_util.tl:6
Felder
| Name | Typ | Beschreibung |
|---|---|---|
id |
string |
ID des Werkzeugs, das den Vorschlag erzeugt hat (zum Beispiel constructionBuilder, streetTerminalBuilder, bulldozer, trackBuilder, streetBuilder). |
name |
string |
Name des Events (builder.proposalCreate oder builder.proposalApply). |
param |
ProposalEventData |
Der Vorschlag, seine Daten und beim Anwenden die Ergebnis-Entitäten. |
isApply |
boolean |
Der Vorschlag wird gerade angewendet. |
ctx |
TaskContext |
Kontext der Aufgabe. |
BuildConstructionUtil.HandleProposalEventConfig¶
record base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:24
record HandleProposalEventConfig<TaskContext>
Hinweise
Satz von Prüfungen; nicht gesetzte Prüfungen werden übersprungen. Das Feld checkStreetTerminalBuilderId liest der Handler nicht. Verwende checkBuilderId mit makeCheckStreetTerminalBuilderId.
Im Basisspiel verwendet: 5-mal in 2 Dateien
base/content/mission/mission/tasks/build_construction/build_construction.tl:35
base/content/mission/mission/tasks/build_construction/mission_task_build_construction_util.tl:7
Funktionen
checkStreetTerminalBuilderId(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:25
return true if builder is ok, false/nil to skip, or if you like a specific message
Rückgabe MissionInterface.ProposalHandlerResult | boolean
checkBuilderId(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:26
return true if builder is ok, false/nil to skip, or if you like a specific message
Rückgabe MissionInterface.ProposalHandlerResult | boolean
checkConstruction(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:27
Hinweise
Prüft die Konstruktion, die gebaut wird.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkSignal(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:28
Hinweise
Prüft, ob der Vorschlag ein Signal hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkSignalLocation(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:29
Hinweise
Prüft, wo ein Signal gesetzt wird.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkSignalDirection(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:30
Hinweise
Prüft die Seite eines Signals.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkStop(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:31
Hinweise
Prüft, ob der Vorschlag eine Straßenhaltestelle hinzufügt.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkStopLocation(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:32
Hinweise
Prüft, wo eine Straßenhaltestelle gesetzt wird.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkSnapping(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:33
Hinweise
Prüft, ob neue Segmente an vorhandene Knoten anschließen.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkLocation(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:34
Hinweise
Prüft die Position der Konstruktion.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.
checkRestrictedArea(HandleProposalEventParams<TaskContext>) : MissionInterface.ProposalHandlerResult | boolean base/tealdef/mission/tasks/build_construction/mission_task_build_construction_util.d.tl:35
Hinweise
Blockiert Änderungen in gesperrten Bereichen.
| Parameter | Typ | Beschreibung |
|---|---|---|
#1 |
HandleProposalEventParams<TaskContext> |
Event des Bauvorschlags. |
Rückgabe MissionInterface.ProposalHandlerResult | boolean: true, ein Fehlerergebnis oder false/nil.