Skip to content

Puppet city in console - #15388

Open
BobbyCobby wants to merge 5 commits into
yairm210:masterfrom
BobbyCobby:puppet-city-in-console
Open

Puppet city in console#15388
BobbyCobby wants to merge 5 commits into
yairm210:masterfrom
BobbyCobby:puppet-city-in-console

Conversation

@BobbyCobby

Copy link
Copy Markdown
Contributor

Resolves #15367

I have no idea if this is OK style-wise, but it works.

It adds the console command city setpuppet <boolean> to allow modders to make scenarios using puppet cities.

At the moment, city.cityConstructions.removeAll() is not included, despite its inclusion in

private fun makePuppet(){
city.isPuppet = true
// The city could be producing something that puppets shouldn't, like units
city.cityConstructions.removeAll()
}

I'm not familiar with Kotlin, but I guessed private fun to mean the same as def _name() in Python, restricting the function to use inside the class (although I think there's a messy way to bypass that in Python). Thus I did not just try to call the above function.

BobbyCobby and others added 5 commits August 11, 2026 15:00
"add" to ConsoleAction("city add <civName>") { console, params ->
val civ = console.getCivByName(params[0])
if (!civ.isMajorCiv() && !civ.isCityState)
if (!civ.isMajorCiv() && !civ.isCityState)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is just my IDE, I didn't do that on purpose. But I think trailing whitespace is disliked so I left this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Set city as puppet in dev console

1 participant