-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5bd576
commit 30d6fcf
Showing
4 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 18 additions & 1 deletion
19
addons/wfc/problems/2d/preconditions/precondition_2d_base_settings.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
extends Resource | ||
class_name WFC2DPrecondition2DNullSettings | ||
|
||
""" | ||
Contains serializable settings for creation of a WFC2DPrecondition. | ||
This base class creates an empty precondition that does not limit acontent of any cells. | ||
For custom precondition classes a corresponding WFC2DPrecondition2DNullSettings subclasses should exist. | ||
This class is named WFC2DPrecondition2DNullSettings, not WFC2DPrecondition2DSettings to make it clearer to | ||
node inspector users that it will create a "null" (empty, default) precondition. | ||
If GdScript supported interfaces or abstract classes then there would be an interface/abstract class | ||
IWFC2DPrecondition2DSettings and WFC2DPrecondition2DNullSettings extending/implementing it along with | ||
other concreate classes. | ||
But with GdScript all other precondition settings classes should extend WFC2DPrecondition2DNullSettings. | ||
""" | ||
|
||
class CreationParameters: | ||
var problem_settings: WFC2DProblem.WFC2DProblemSettings | ||
var target_node: Node | ||
var base_node: Node | ||
var generator_node: WFC2DGenerator | ||
|
||
func create_precondition(parameters: CreationParameters) -> WFC2DPrecondition: | ||
""" | ||
Instantiates a precondition using settings from this object. | ||
""" | ||
return WFC2DPrecondition.new() |