mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Rename bases to templates and add per property inheritance
Review changes for #1142: - base becomes template everywhere (is_template, template_id, --template, --is-template, --templates, InstanceDetails.isTemplate). - Object fields inherit per property. inherited_fields lists the overridden properties for object fields and the template object is merged with them. - Linking a template also inherits fields that hold the default value. The server name stays per instance. - Ports are never inherited. - InstanceDetails carries templateId. Web UI: inherited values are locked until unlocked, overridden values can be inherited again, templates are listed separately, the create modal can create templates and instances from templates, and the instance page has "Create template" which can link the source. Part of #200 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
01cf789f5d
commit
b5c372f109
21 files changed
+865
-312
No files matched your search
+14
-12
@@ -521,26 +521,28 @@ This allows you to prevent certain instances from being started when using the b
|
||||
Defaults to false.
|
||||
|
||||
|
||||
### instance.is_base
|
||||
### instance.is_template
|
||||
|
||||
If enabled this instance is a base other instances can inherit config values from.
|
||||
Base instances cannot be assigned to a host and therefore never start.
|
||||
Hidden from `instance list` in clusterioctl unless `--bases` is passed.
|
||||
An instance cannot stop being a base while other instances inherit from it.
|
||||
If enabled this instance is a template other instances can inherit config values from.
|
||||
Templates cannot be assigned to a host and therefore never start.
|
||||
Hidden from `instance list` in clusterioctl unless `--templates` is passed, and listed separately in the web interface.
|
||||
An instance cannot stop being a template while other instances inherit from it.
|
||||
|
||||
Defaults to false.
|
||||
|
||||
|
||||
### instance.base_id
|
||||
### instance.template_id
|
||||
|
||||
ID of the base instance to inherit config values from.
|
||||
Inherited fields take their value from the base and follow it when it changes, setting a field on this instance stops inheriting it.
|
||||
When set on an existing instance only fields with the same value as the base become inherited.
|
||||
`instance.name`, `instance.is_base`, `instance.base_id` and hidden fields are never inherited.
|
||||
A base may itself inherit from another base, but not from itself through a chain of bases.
|
||||
ID of the template to inherit config values from.
|
||||
Inherited fields take their value from the template and follow it when it changes, setting a field on this instance stops inheriting it.
|
||||
Object fields like `factorio.settings` are inherited per property, properties set on this instance override the ones from the template.
|
||||
When set on an existing instance fields with the same value as the template or the default value become inherited, except the server name in `factorio.settings`.
|
||||
`instance.name`, `instance.is_template`, `instance.template_id`, the port fields and hidden fields are never inherited.
|
||||
A template may itself inherit from another template, but not from itself through a chain of templates.
|
||||
The fields currently inherited are stored in the hidden `instance.inherited_fields` field.
|
||||
In the web interface inherited values are locked and must be unlocked before they can be changed.
|
||||
|
||||
Defaults to null meaning no base.
|
||||
Defaults to null meaning no template.
|
||||
|
||||
|
||||
### factorio.version
|
||||
|
||||
Reference in new issue
Block a user