cwtools / cwtools/cwtools

Support for square bracket parameters in scripted_effects and scripted_triggers

Open
#57 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
151
Forks
38
PR merge metrics
No merged PRs in 30d

Description

Hey, would it be possible to add support for square bracket parameters? The way they work is if paramater in bracket is passed, the rest of racket is executed. The dollar and bracket parameters can overlap. I could try make change but never used F#

```
#Province effect
upgrade_building = {
[[trade]
if = {
limit = { has_building = trade_depot }
add_building = stock_exchange
}
else_if = {
limit = { has_building = marketplace }
add_building = trade_depot
}
]
[[government]
if = {
limit = { has_building = courthouse }
add_building = town_hall
}
]
}

upgrade_building = { trade = yes }
```

```
define_advisor_of_random_type = {
define_advisor = {
[[name] name = $name$ ]
type = treasurer
skill = $skill$
[[culture] culture = $culture$ ]
[[religion] religion = $religion$ ]
[[discount] discount = $discount$ ]
[[cost_multiplier] cost_multiplier = $cost_multiplier$ ]
}
}

define_advisor_of_random_type = { skill = 1 culture = some_culture }
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.