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

Fix atom name/desc not copying on appearance set #2145

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TobleroneSwordfish
Copy link

Fixes #2107 by adding a desc var to appearances and changing atom var access methods to always defer to appearance.
There's a warning on the IconAppearance class that begins "Woe, weary traveler" so hopefully I've done all the steps right to avoid doom or whatever.
Includes a DM test to hopefully prove it works.

@boring-cyborg boring-cyborg bot added Client Involves the OpenDream client Runtime Involves the OpenDream server/runtime labels Dec 18, 2024
OpenDreamRuntime/Objects/DreamObject.cs Outdated Show resolved Hide resolved
OpenDreamRuntime/Objects/Types/DreamObjectAtom.cs Outdated Show resolved Hide resolved
@@ -38,6 +31,12 @@

base.HandleDeletion(possiblyThreaded);
}
public string GetDesc() {

Check warning

Code scanning / InspectCode

Incorrect blank lines: Blank lines are missing elsewhere Warning

Blank lines are missing, expected minimum 1 instead of 0
@@ -38,6 +31,12 @@

base.HandleDeletion(possiblyThreaded);
}
public string GetDesc() {
if (!TryGetVariable("desc", out DreamValue descVar) || !descVar.TryGetValueAsString(out string? desc))
return ObjectDefinition.Type.ToString();

Check warning

Code scanning / InspectCode

Redundant 'object.ToString()' call Warning

Redundant 'Object.ToString()' call
OpenDreamShared/Dream/IconAppearance.cs Dismissed Show dismissed Hide dismissed
Content.Tests/DMProject/Tests/Image/appearance.dm Outdated Show resolved Hide resolved
OpenDreamRuntime/AtomManager.cs Outdated Show resolved Hide resolved
OpenDreamRuntime/Objects/Types/DreamObjectAtom.cs Outdated Show resolved Hide resolved
OpenDreamRuntime/Objects/Types/DreamObjectAtom.cs Outdated Show resolved Hide resolved
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Involves the OpenDream client Runtime Involves the OpenDream server/runtime size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

thing.appearance = otherthing.appearance doesn't copy name and desc
3 participants