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

Set owner for new appliances #77211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sparr
Copy link
Member

@sparr sparr commented Oct 21, 2024

Summary

Bugfixes "New appliances have correct owner"

Purpose of change

Newly created appliances belong to NULL faction currently, until the player grabs them. With no owner, they can't be used for zone binding.
Fixes #77209

Describe the solution

Set the owner of newly created appliances to the [faction of the] character that [took the last step of the process that] created them.

Describe alternatives you've considered

place_appliance could return the vehicle, then the caller could decide if and how to set the owner, but this was suggested against on Discord.

Testing

I've tested the case described in the linked issue and the bug is gone. There's no obvious misbehavior when creating wiring, but I can't find a game mechanic that confirms the ownership either. I haven't been able to test the other two cases.

Additional context

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) Vehicles Vehicles, parts, mechanics & interactions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vehicle owner not set for appliances until you try to drag them.
1 participant