Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining custom ruleset options #2501

Open
XHawk87 opened this issue Jan 15, 2025 · 0 comments
Open

Allow defining custom ruleset options #2501

XHawk87 opened this issue Jan 15, 2025 · 0 comments
Labels
enhancement New feature or request server This issue requires changes to the server

Comments

@XHawk87
Copy link
Collaborator

XHawk87 commented Jan 15, 2025

Is your feature request related to a problem? Please describe.
Currently, server options are hard-coded in C++.

freeciv21/server/settings.cpp

Lines 1337 to 1338 in 25ce4fe

// game settings
static struct setting settings[] = {

I'd like to be able to define additional options to be used in lua scripts so that game admins can manipulate them using the familiar /set command.

Describe the solution you'd like
Add a new server.setting.create command in lua, and possibly also server.setting.set.

Describe alternatives you've considered
Move all settings over to default.lua and add a new optional settings.lua file, so that settings can be defined and set more flexibly than just using the /set command and [settings] section of game.ruleset.

Additional context
Relating to this discussion on discord

@XHawk87 XHawk87 added enhancement New feature or request Untriaged This issue or PR needs triaging server This issue requires changes to the server and removed Untriaged This issue or PR needs triaging labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This issue requires changes to the server
Projects
None yet
Development

No branches or pull requests

1 participant