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

New global - the type of building being linked to a lever/pressure plate #45

Closed
pronvit opened this issue Jun 26, 2015 · 2 comments
Closed
Assignees

Comments

@pronvit
Copy link
Contributor

pronvit commented Jun 26, 2015

I seem to have found a new global, it's a one byte value immediately following ui_workshop_in_add and specifies the type of building being linked to a lever/pressure plate. Interesting thing is that it takes not values from building_type, but character code of a key you use to initiate linkage, e.g. b for bridge, ... , T for track stop. It's set to 0xff when not in the linkage mode.

EDIT: Also it's set to t when choosing a mechanism for the target, and to l when choosing a mechanism for the lever/pressure plate (with ui_building_assign_items holding the list of choices).

Since globals need to be updated manually for new DF versions, what's the procedure of adding a new one?

@lethosor
Copy link
Member

This seems like it should be fairly easy to locate with find-offsets, once a scan is implemented for it.
(@quietust says he identified this in 0.23, by the way, so it could be using character codes because of its age.)

@lethosor lethosor self-assigned this Dec 19, 2015
@lethosor
Copy link
Member

I've gotten a scan for this in find-offsets to mostly work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants