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

Rework door/safe hacking to be mostly in activity_handlers #35717

Merged
merged 5 commits into from Nov 28, 2019
Merged

Rework door/safe hacking to be mostly in activity_handlers #35717

merged 5 commits into from Nov 28, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 25, 2019

Summary

SUMMARY: Bugfixes "Rework door/safe hacking to be mostly in activity_handlers"

Purpose of change

Fixes #35707
Fixes #35602
Fixes #35195

Describe the solution

So the activity to hack a door or a safe, also called iexamine::hack_attempt() which subtracted moves manually, in addition to the activity.
I couldnt just remove that, because other things used hack_attempt() too, like hacking the gas station console.

So the best way was to consolidate it all in the activity code, and add differing results based on what the hack type is, also I added a prompt before the activity starts, because currently it just starts the activity when you examine the cardreader/safe automatically.

Describe alternatives you've considered

N/A

Testing

Loaded the save in th elinked issue, examined the cardreader, said yes to prompt, activity started, used electrohack, door opened, repeated test on electric gun safe and gas station console.

All works as before, except without the extra minutes of manual moves subtracted after the activity.
And now more extensible.

Additional context

N/A

src/activity_handlers.cpp Outdated Show resolved Hide resolved
Co-Authored-By: BevapDin <tho_ki@gmx.de>
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mechanics: Character / Player Character / Player mechanics Items / Item Actions / Item Qualities Items and how they work and interact labels Nov 25, 2019
@Night-Pryanik
Copy link
Contributor

Should this also fix #35602 and #35195?

dpwb and others added 3 commits November 26, 2019 10:37
Co-Authored-By: Anton Burmistrov <Night_Pryanik@mail.ru>
@ghost
Copy link
Author

ghost commented Nov 26, 2019

Should this also fix #35602 and #35195?

Yep, thanks

@ZhilkinSerg ZhilkinSerg merged commit 1baa984 into CleverRaven:master Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON Mechanics: Character / Player Character / Player mechanics
Projects
None yet
3 participants