-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SerializableDifficultyDef (#353)
* Added SerializableDifficultyDef * Fixed dumb thing from content additions * MethodImpl
- Loading branch information
Showing
5 changed files
with
67 additions
and
6 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
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,29 @@ | ||
using RoR2; | ||
using UnityEngine; | ||
|
||
namespace R2API.ScriptableObjects { | ||
[CreateAssetMenu(fileName = "new SerializableDifficultyDef", menuName = "R2API/SerializableDifficultyDef")] | ||
public class SerializableDifficultyDef : ScriptableObject { | ||
[Tooltip("Scaling value of the difficulty, Drizzle is 1, Rainstorm is 2, Monsoon is 3")] | ||
public float scalingValue; | ||
public string descriptionToken; | ||
public string nameToken; | ||
[Tooltip("Unique identifier for this Difficulty")] | ||
public string serverTag; | ||
[Tooltip("If true, beating the game on this difficulty will unlock the survivor's Mastery skin")] | ||
public bool countsAsHardMode; | ||
[Tooltip("If set to true, the difficulty index will be a possitive number, this causes the difficulty to have all the Eclipse modifiers (From 1 to 8)")] | ||
public bool preferPositiveIndex = false; | ||
public Color difficultyColor; | ||
public Sprite iconSprite; | ||
|
||
public DifficultyDef DifficultyDef { get; private set; } | ||
public DifficultyIndex DifficultyIndex { get; internal set; } | ||
|
||
internal void CreateDifficultyDef() { | ||
DifficultyDef = new DifficultyDef(scalingValue, nameToken, string.Empty, descriptionToken, difficultyColor, serverTag, countsAsHardMode); | ||
DifficultyDef.foundIconSprite = true; | ||
DifficultyDef.iconSprite = iconSprite; | ||
} | ||
} | ||
} |