forked from Goz3rr/SatisfactorySaveEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
22 changed files
with
523 additions
and
59 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using SatisfactorySaveEditor.ViewModel.Property; | ||
using SatisfactorySaveParser.PropertyTypes; | ||
|
||
namespace SatisfactorySaveEditor.Util | ||
{ | ||
public static class PropertyViewModelMapper | ||
{ | ||
public static SerializedPropertyViewModel Convert(SerializedProperty property) | ||
{ | ||
switch (property) | ||
{ | ||
case ArrayProperty arp: | ||
return new ArrayPropertyViewModel(arp); | ||
case BoolProperty bop: | ||
return new BoolPropertyViewModel(bop); | ||
case ByteProperty byp: | ||
return new BytePropertyViewModel(byp); | ||
case EnumProperty enp: | ||
return new EnumPropertyViewModel(enp); | ||
case FloatProperty flp: | ||
return new FloatPropertyViewModel(flp); | ||
case IntProperty inp: | ||
return new IntPropertyViewModel(inp); | ||
case MapProperty map: | ||
return new MapPropertyViewModel(map); | ||
case NameProperty nap: | ||
return new NamePropertyViewModel(nap); | ||
case ObjectProperty obp: | ||
return new ObjectPropertyViewModel(obp); | ||
case StrProperty strip: | ||
return new StrPropertyViewModel(strip); | ||
case StructProperty strup: | ||
return new StructPropertyViewModel(strup); | ||
case TextProperty tep: | ||
return new TextPropertyViewModel(tep); | ||
default: | ||
throw new ArgumentOutOfRangeException(nameof(property), property, null); | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.