public bool isPossible;
public List needsList;
public List itemsList;
public Connection(bool newIsPossible, List newItemList, List newNeedsList) {
isPossible = newIsPossible;
itemsList = newItemList;
needsList = newNeedsList;
}
Also, if that doesn’t work you can always do what’s done in languages without default parameters: function (or constructor) overload.
public bool isPossible;
public List<string> needsList;
public List<string> itemsList;
public Connection(bool newIsPossible, List<string> newItemList, List<string> newNeedsList) {
isPossible = newIsPossible;
itemsList = newItemList;
needsList = newNeedsList;
}
public Connection(bool newIsPossible, List<string> newItemList) :
this(newIsPossible,newItemList,null) {
}
An then:
Connection(something, somethingElse); //will automatically match the second Connection constructor
Connection(something, somethingElse, moreStuff); //will automatically match the first one