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

implement savefile << operator #1545

Closed
wants to merge 1 commit into from
Closed

Conversation

LetterN
Copy link
Contributor

@LetterN LetterN commented Dec 5, 2023

resolves #1306 , required by #1546

@amylizzle
Copy link
Collaborator

amylizzle commented Dec 5, 2023

wait nevermind I'm an idiot


// << statement
public override void OperatorOutput(DreamValue value) {
CurrentDir[_currentDirPath] = value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In BYOND this appears to do more than just set the value. It looks like it turns it into a list of some sort if there's already a value there.

For example

var/savefile/S = new()
S << "a"
S << "b"
world.log << S.ExportText()

Gives . = "a","b"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redirecting this to OperatorIndexAssign or some fancy intermediate that sets the index to (A) value so that it's a list

@LetterN
Copy link
Contributor Author

LetterN commented Dec 6, 2023

Merging this with #1546 instead

@LetterN LetterN closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

savefile << object is not implemented
3 participants