Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Magic Crayon From Frontier #2410

Merged
merged 23 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion BuildChecker/BuildChecker.csproj
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
<ProjectGuid>{C899FCA4-7037-4E49-ABC2-44DE72487110}</ProjectGuid>
<TargetFrameworkMoniker>.NETFramework, Version=v4.7.2</TargetFrameworkMoniker>
<RestorePackages>false</RestorePackages>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
<TargetFrameworkProfile />
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
<PropertyGroup>
<OutputType>Library</OutputType>
Expand Down Expand Up @@ -49,4 +51,4 @@ https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
</Target>
<Target Name="CoreCompile">
</Target>
</Project>
</Project>
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions Content.Client/Crayon/CrayonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
11 changes: 8 additions & 3 deletions Content.Server/Crayon/CrayonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/crayon/crayon-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ crayon-drawing-label = Drawing: [color={$color}]{$state}[/color] ({$charges}/{$c
crayon-interact-not-enough-left-text = Not enough left.
crayon-interact-used-up-text = The {$owner} got used up.
crayon-interact-invalid-location = Can't reach there!
crayon-drawing-label-unlimited = Drawing: [color={$color}]{$state}[/color]
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved

## UI
crayon-window-title = Crayon
2 changes: 2 additions & 0 deletions Resources/Prototypes/Catalog/Fills/Items/toolboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
amount: 2
- id: CrayonMime
- id: CrayonRainbow
- id: CrayonMagic # Delta V - I don't feel liek making a construction graph :blunt:
prob: .33
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved

- type: entity
id: ToolboxMechanicalFilled
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Catalog/Fills/Lockers/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions Resources/Prototypes/DeltaV/Loadouts/Jobs/Civilian/clown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@
id: FoolPDA
equipment:
id: FoolPDA

# Trinkets
- type: loadout
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
id: CrayonMagic
effects:
- !type:JobRequirementLoadoutEffect
requirement:
!type:RoleTimeRequirement
role: JobClown
time: 36000
storage:
back:
- CrayonMagic
13 changes: 13 additions & 0 deletions Resources/Prototypes/DeltaV/Loadouts/Jobs/Civilian/mime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@
id: FoamSabre
equipment:
belt: ClothingBeltFoamSheathFilled

# Trinkets
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
- type: loadout
id: CrayonMagic
effects:
- !type:JobRequirementLoadoutEffect
requirement:
!type:RoleTimeRequirement
role: JobClown
time: 36000
storage:
back:
- CrayonMagic
1 change: 1 addition & 0 deletions Resources/Prototypes/Loadouts/loadout_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- Cane # DeltaV
- WhiteCane #DeltaV
- CDDogtags # _CD
- CrayonMagic # Delta V, _NF Port
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved

- type: loadoutGroup
id: Glasses
Expand Down
28 changes: 28 additions & 0 deletions Resources/Prototypes/_NF/Entities/Objects/Fun/magic_crayon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
- 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: 40
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions Resources/Textures/_NF/Objects/Fun/magic_crayon.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -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",
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
"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 ]
]
}
]
}

8 changes: 4 additions & 4 deletions SpaceStation14.sln
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -471,21 +471,21 @@ Global
{41B450C0-A361-4CD7-8121-7072B8995CFC} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{7B9472D3-79D4-48D1-9B22-BCDE518FE842} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{1FAE651D-29D8-437A-9864-47CE0D180016} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
{8922428F-17C3-47A7-BFE9-570DEB2464DA} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{16F7DE32-0186-44B9-9345-0C20D1BF2422} = {AFF53804-115F-4E67-B81F-26265EA27880}
{AFF53804-115F-4E67-B81F-26265EA27880} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{23F09C45-950E-4DB7-A465-E937450FF008} = {AFF53804-115F-4E67-B81F-26265EA27880}
{440426C1-8DCA-43F6-967F-94439B8DAF47} = {AFF53804-115F-4E67-B81F-26265EA27880}
{88B0FC0F-7209-40E2-AF16-EB90AF727C5B} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
{A3C5B00A-D232-4A01-B82E-B0E58BFD5C12} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{8A21C7CA-2EB8-40E5-8043-33582C06D139} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{952AAF2A-DF63-4A7D-8094-3453893EBA80} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{A965CB3B-FD31-44AF-8872-85ABA436098D} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{7844DA69-B0F0-49FB-A05E-ECA37372277A} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
{6FBF108E-5CB5-47DE-8D7E-B496ABA9E3E2} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
{07CA34A1-1D37-4771-A2E3-495A1044AE0B} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
{88B0FC0F-7209-40E2-AF16-EB90AF727C5B} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
{6FBF108E-5CB5-47DE-8D7E-B496ABA9E3E2} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
{83F510FE-9B50-4D96-AFAB-CC13998D6AFE} = {7844DA69-B0F0-49FB-A05E-ECA37372277A}
{7844DA69-B0F0-49FB-A05E-ECA37372277A} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
Avalon-Proto marked this conversation as resolved.
Show resolved Hide resolved
{5C05B9B4-6AFE-4884-AA6A-5A26C0FFF2F6} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
Loading