-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Mail table, system for smoke prank * Format mail messages * DelayedItemSystem cleanup, more mail table entries * More mail table entries * Remove hoverbike from mail pool * Add large mail. FIXME: mail_large.rsi has no copyright info * Default mail isLarge to false, comment cleanup * More mail types * Add optional large mail flag to admin mailto cmd * mail_large copyright * admin cmd fix, new mail types, const cleanup * Mail: new components, weighting, a few new items * Fix merge conflict, add placeholder pipebomb mail * Format mail text, separate sword mail from knives * Mail: fix exp. welder ID, split up Dan's cigs * Fourth muffin, decrease captain's sabre chance * yaml fixes * Add ShowJobIcons component to mail hud * Reorganize mail items, add build-a-buddy mail * Build-a-Buddy fixes, slime & vulp versions, text * Reptillian->Reptilian * More signatures, label necrosol bottle, bigger emp * lowercase i * extra premium cigars, premium liquors * Cleanup * Fixups And Edits * Remove kendo hakama, jabroni comment, fix cigars * Platinum cigars, fix sprites * fix premium absinthe ID * Remove cyberpen, add BibleUserImplanter, ATV mail Also adjusts weights for TacticalMaid (missing a zero), Restraints (cut in half) * kendo mail order, more mail comments * Remove Nyano mail lists & parcels, move into _NF/ * True to true, cigars aren't fragile --------- Co-authored-by: Dvir <[email protected]> Co-authored-by: Whatstone <[email protected]>
- Loading branch information
1 parent
44474b7
commit ed91b98
Showing
47 changed files
with
3,647 additions
and
1,426 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,16 @@ | ||
namespace Content.Server.Mail | ||
{ | ||
/// <summary> | ||
/// A placeholder for another entity, spawned when dropped or placed in someone's hands. | ||
/// Useful for storing instant effect entities, e.g. smoke, in the mail. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class DelayedItemComponent : Component | ||
{ | ||
/// <summary> | ||
/// The entity to replace this when opened or dropped. | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
public string Item = "None"; | ||
} | ||
} |
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,56 @@ | ||
using Content.Shared.Damage; | ||
using Content.Shared.Hands; | ||
using Robust.Shared.Containers; | ||
|
||
namespace Content.Server.Mail | ||
{ | ||
/// <summary> | ||
/// A placeholder for another entity, spawned when taken out of a container, with the placeholder deleted shortly after. | ||
/// Useful for storing instant effect entities, e.g. smoke, in the mail. | ||
/// </summary> | ||
public sealed class DelayedItemSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<DelayedItemComponent, DropAttemptEvent>(OnDropAttempt); | ||
SubscribeLocalEvent<DelayedItemComponent, GotEquippedHandEvent>(OnHandEquipped); | ||
SubscribeLocalEvent<DelayedItemComponent, DamageChangedEvent>(OnDamageChanged); | ||
SubscribeLocalEvent<DelayedItemComponent, EntGotRemovedFromContainerMessage>(OnRemovedFromContainer); | ||
} | ||
|
||
/// <summary> | ||
/// EntGotRemovedFromContainerMessage handler - spawn the intended entity after removed from a container. | ||
/// </summary> | ||
private void OnRemovedFromContainer(EntityUid uid, DelayedItemComponent component, ContainerModifiedMessage args) | ||
{ | ||
Spawn(component.Item, Transform(uid).Coordinates); | ||
} | ||
|
||
/// <summary> | ||
/// GotEquippedHandEvent handler - destroy the placeholder. | ||
/// </summary> | ||
private void OnHandEquipped(EntityUid uid, DelayedItemComponent component, EquippedHandEvent args) | ||
{ | ||
EntityManager.DeleteEntity(uid); | ||
} | ||
|
||
/// <summary> | ||
/// OnDropAttempt handler - destroy the placeholder. | ||
/// </summary> | ||
private void OnDropAttempt(EntityUid uid, DelayedItemComponent component, DropAttemptEvent args) | ||
{ | ||
EntityManager.DeleteEntity(uid); | ||
} | ||
|
||
/// <summary> | ||
/// OnDamageChanged handler - item has taken damage (e.g. inside the envelope), spawn the intended entity outside of any container and delete the placeholder. | ||
/// </summary> | ||
private void OnDamageChanged(EntityUid uid, DelayedItemComponent component, DamageChangedEvent args) | ||
{ | ||
Spawn(component.Item, Transform(uid).Coordinates); | ||
EntityManager.DeleteEntity(uid); | ||
} | ||
} | ||
} |
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,38 @@ | ||
namespace Content.Server.Mail | ||
{ | ||
/// <summary> | ||
/// A set of localized strings related to mail entities | ||
/// </summary> | ||
public struct MailEntityStrings | ||
{ | ||
public string NameAddressed; | ||
public string DescClose; | ||
public string DescFar; | ||
} | ||
|
||
/// <summary> | ||
/// Constants related to mail. | ||
/// </summary> | ||
public sealed class MailConstants : EntitySystem | ||
{ | ||
/// <summary> | ||
/// Locale strings related to small parcels. | ||
/// <summary> | ||
public static readonly MailEntityStrings Mail = new() | ||
{ | ||
NameAddressed = "mail-item-name-addressed", | ||
DescClose = "mail-desc-close", | ||
DescFar = "mail-desc-far" | ||
}; | ||
|
||
/// <summary> | ||
/// Locale strings related to large packages. | ||
/// <summary> | ||
public static readonly MailEntityStrings MailLarge = new() | ||
{ | ||
NameAddressed = "mail-large-item-name-addressed", | ||
DescClose = "mail-large-desc-close", | ||
DescFar = "mail-large-desc-far" | ||
}; | ||
} | ||
} |
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,4 @@ | ||
mail-large-item-name-unaddressed = package | ||
mail-large-item-name-addressed = package ({$recipient}) | ||
mail-large-desc-far = A large package. | ||
mail-large-desc-close = A large package addressed to {CAPITALIZE($name)}, {$job}. Last known location: {$station}. |
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.