-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from flibber-hk/tablet
Add TabletDeployer
- Loading branch information
Showing
6 changed files
with
77 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace ItemChanger.Deployers | ||
{ | ||
/// <summary> | ||
/// A Deployer which creates a lore tablet at the specified point. | ||
/// The tablet will not be readable unless the y value is at least 0.1 higher than the knight's position at ground level. | ||
/// </summary> | ||
public record TabletDeployer : Deployer | ||
{ | ||
/// <summary> | ||
/// The text to display when the tablet is read by the player. | ||
/// </summary> | ||
public IString Text { get; init; } | ||
|
||
public override GameObject Instantiate() | ||
{ | ||
return Util.TabletUtility.MakeNewTablet("Deployed Tablet", Text.GetValue); | ||
} | ||
|
||
public override GameObject Deploy() | ||
{ | ||
GameObject obj = Instantiate(); | ||
Container.GetContainer(Container.Tablet).ApplyTargetContext(obj, X, Y, 0); | ||
return obj; | ||
} | ||
} | ||
} |
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