diff --git a/Content.Client/Crayon/CrayonSystem.cs b/Content.Client/Crayon/CrayonSystem.cs index dc039794813..84749cf1f1b 100644 --- a/Content.Client/Crayon/CrayonSystem.cs +++ b/Content.Client/Crayon/CrayonSystem.cs @@ -57,6 +57,17 @@ protected override void FrameUpdate(FrameEventArgs args) } _parent.UIUpdateNeeded = false; + + // Frontier: unlimited crayon, Delta V Port + if (_parent.Capacity == int.MaxValue) + { + _label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label-unlimited", + ("color", _parent.Color), + ("state", _parent.SelectedState))); + return; + } + // End Frontier, Delta V Port + _label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label", ("color",_parent.Color), ("state",_parent.SelectedState), diff --git a/Content.Server/Crayon/CrayonSystem.cs b/Content.Server/Crayon/CrayonSystem.cs index 4257c436c23..e69d0f177a3 100644 --- a/Content.Server/Crayon/CrayonSystem.cs +++ b/Content.Server/Crayon/CrayonSystem.cs @@ -73,9 +73,14 @@ private void OnCrayonAfterInteract(EntityUid uid, CrayonComponent component, Aft if (component.UseSound != null) _audio.PlayPvs(component.UseSound, uid, AudioParams.Default.WithVariation(0.125f)); - // Decrease "Ammo" - component.Charges--; - Dirty(uid, component); + // Frontier: check if crayon is infinite, Delta V Port + if (component.Charges != int.MaxValue) + { + // Decrease "Ammo" + component.Charges--; + Dirty(uid, component); + } + // End Frontier, Delta V Port _adminLogger.Add(LogType.CrayonDraw, LogImpact.Low, $"{EntityManager.ToPrettyString(args.User):user} drew a {component.Color:color} {component.SelectedState}"); args.Handled = true; diff --git a/Resources/Locale/en-US/_NF/crayon/crayon-component.ftl b/Resources/Locale/en-US/_NF/crayon/crayon-component.ftl new file mode 100644 index 00000000000..146559f00a5 --- /dev/null +++ b/Resources/Locale/en-US/_NF/crayon/crayon-component.ftl @@ -0,0 +1,5 @@ + +## Entity + +crayon-drawing-label-unlimited = Drawing: [color={$color}]{$state}[/color] + diff --git a/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml b/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml index c484fee13f1..ba2b91df007 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml @@ -85,6 +85,8 @@ amount: 2 - id: CrayonMime - id: CrayonRainbow + - id: CrayonMagic # Delta V - A construction graph was made, but still can find in the wild + prob: .10 - type: entity id: ToolboxMechanicalFilled diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml index 4c0a9826de7..00a9e25fc6e 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml @@ -134,6 +134,8 @@ children: - id: StrangePill prob: 0.20 + - id: CrayonMagic # Delta V - Just another way to get it + prob: .01 # Tools - !type:NestedSelector tableId: MaintToolsTable diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail.yml index 09b3a8ae88f..6ea56a91842 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail.yml @@ -1555,6 +1555,8 @@ - type: Mail contents: - id: CrayonBox + - id: CrayonMagic + - prob: .10 - type: entity parent: BaseMail diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail_civilian.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail_civilian.yml index ffc5801fc3b..5c0248f02fd 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail_civilian.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Specific/Mail/mail_civilian.yml @@ -178,6 +178,8 @@ - id: CrayonBox - id: Paper maxAmount: 3 + - id: CrayonMagic + - prob: .2 - type: entity parent: BaseMail diff --git a/Resources/Prototypes/_NF/Entities/Objects/Fun/magic_crayon.yml b/Resources/Prototypes/_NF/Entities/Objects/Fun/magic_crayon.yml new file mode 100644 index 00000000000..35ac44cdcf5 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Fun/magic_crayon.yml @@ -0,0 +1,31 @@ +- type: entity + parent: CrayonRainbow + id: CrayonMagic + name: magic crayon + description: Specially blended with bluespace crystals and certified non-toxic. + components: + - type: Sprite + sprite: _NF/Objects/Fun/magic_crayon.rsi + state: icon + - type: Item + sprite: _NF/Objects/Fun/magic_crayon.rsi + heldPrefix: icon + - type: Tag # Removing trash & recyclable + tags: + - Write + - Crayon + - type: Crayon + capacity: 2147483647 # int.MaxValue, infinite charges + - type: FlavorProfile + flavors: + - chewy + - magical + - type: SolutionContainerManager + solutions: + food: + reagents: + - ReagentId: Nothing + Quantity: 100 + - type: Construction + graph: magic_crayon + node: magicCrayon diff --git a/Resources/Prototypes/_NF/Recipes/Crafting/Graphs/magic_crayon.yml b/Resources/Prototypes/_NF/Recipes/Crafting/Graphs/magic_crayon.yml new file mode 100644 index 00000000000..5d5c4836781 --- /dev/null +++ b/Resources/Prototypes/_NF/Recipes/Crafting/Graphs/magic_crayon.yml @@ -0,0 +1,28 @@ +- type: constructionGraph + id: magic_crayon + start: start + graph: + - node: start + edges: + - to: magicCrayon + steps: + - material: Bluespace + amount: 1 + - tag: CrayonRed + name: red crayon + icon: + sprite: Objects/Fun/crayons.rsi + state: red + - tag: CrayonGreen + name: green crayon + icon: + sprite: Objects/Fun/crayons.rsi + state: green + - tag: CrayonBlue + name: blue crayon + icon: + sprite: Objects/Fun/crayons.rsi + state: blue + doAfter: 5 + - node: magicCrayon + entity: CrayonMagic diff --git a/Resources/Prototypes/_NF/Recipes/Crafting/magic_crayon.yml b/Resources/Prototypes/_NF/Recipes/Crafting/magic_crayon.yml new file mode 100644 index 00000000000..cb26164f471 --- /dev/null +++ b/Resources/Prototypes/_NF/Recipes/Crafting/magic_crayon.yml @@ -0,0 +1,10 @@ +- type: construction + name: Magic Crayon + id: CrayonMagic + graph: magic_crayon + startNode: start + targetNode: magicCrayon + category: construction-category-misc + description: A crayon that lasts forever! Pretty too + icon: { sprite: _NF/Objects/Fun/magic_crayon.rsi, state: icon } + objectType: Item diff --git a/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-left.png b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-left.png new file mode 100644 index 00000000000..a88404f0b20 Binary files /dev/null and b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-left.png differ diff --git a/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-right.png b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-right.png new file mode 100644 index 00000000000..c3376414530 Binary files /dev/null and b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon-inhand-right.png differ diff --git a/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon.png b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon.png new file mode 100644 index 00000000000..c520ae93250 Binary files /dev/null and b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/icon.png differ diff --git a/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/meta.json b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/meta.json new file mode 100644 index 00000000000..21fc89b91f5 --- /dev/null +++ b/Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/meta.json @@ -0,0 +1,46 @@ +{ + "version": 1, + "license": "CC-BY-SA-4.0", + "copyright": "Taken from tgstation and modified by Swept at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24, tweaked by Ubaser and whatston3 (GitHub)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "icon-inhand-left", + "directions": 4, + "delays": [ + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ] + ] + }, + { + "name": "icon-inhand-right", + "directions": 4, + "delays": [ + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ], + [ 0.2, 0.2, 0.2 ] + ] + } + ] +} +