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

Beepsky can be fully rebuilt and drops a special baton #1627

Merged
merged 7 commits into from Aug 10, 2020

Conversation

Superlagg
Copy link
Contributor

[FEATURE]

About the PR

If Beepsky dies, two things now happen: his wreckage is flagged as his and he drops a new type of stun baton.

When his wreck is reassembled with this baton, he's fully rebuilt, complete with attack_on_move properly set.

This securitron stun baton can also be used in crafting ordinary non-Beepsky secbots. This gives us a secbot that can attack_on_move, albeit at 1/3 of Beepsky's rate (25%/tile vs 75%/tile).

The baton can also be scanned by mechanics (like all batons), so you can make more sorta-robust secbots. Just gotta kill Beepsky first.

Also, once the secbot assembly has an arm, you can complete the bot by giving it a stun baton. It'll even drop that baton when it dies! Not sure why you'd want to, non-securitron batons don't give the bot anything special over the type Beepsky drops.

It also fixes the bug I left in from the last secbot PR where the scrap secbots are supposed to drop werent given a location. Whoops.

Why's this needed?

Right now, if Beepsky is killed and rebuilt, he won't be as robust as he used to be. Plus you can't even use his own baton to build him!

Changelog

(u)Superlagg:
(*)Beepsky now drops his own personal stun baton, and he can now be properly rebuilt when he dies.
(+)Beepsky's baton can be used to build other non-Beepsky securitrons, granting them some of his robustness.

@keywordlabeler keywordlabeler bot added the C-Feature A new feature or enhancements to existing features label Jul 28, 2020
@pali6
Copy link
Member

pali6 commented Aug 5, 2020

Shouldn't /obj/machinery/bot/secbot/beepsky have is_beepky set to 3?

@Superlagg
Copy link
Contributor Author

Shouldn't /obj/machinery/bot/secbot/beepsky have is_beepky set to 3?

That's what I get for not using defines. I'll take a look!

@Superlagg
Copy link
Contributor Author

Added some defines, cleaned up some of the drop-loot section, and boosted the dropped baton's contraband level if it was Beepsky's (and had the assembly check this var to see if it should give it the unique name).

Thanks for getting me to look at this PR again, never would've caught the fact that normal secbots armed with generic special secbot batons would drop named batons, despite the baton never having entered Beepsky's possession

Comment on lines +1 to +5
#define IS_NOT_BEEPSKY_AND_HAS_SOME_GENERIC_BATON 0 // Just some everyday bot on the beat
#define IS_BEEPSKY_AND_HAS_HIS_SPECIAL_BATON 1 // Full-assed Beepsky
#define IS_NOT_BEEPSKY_BUT_HAS_HIS_SPECIAL_BATON 2 // A Beepsky brand secboton
#define IS_BEEPSKY_BUT_HAS_SOME_GENERIC_BATON 3 // A generic-ass shitcurity baton
#define IS_NOT_BEEPSKY_BUT_HAS_A_GENERIC_SPECIAL_BATON 4 // A generic, non-Beepsky brand secboton
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this sort of thing would be better either as two variables (is_beepsky, baton_type) or through bit flags in one variable but it's ok even like this to some extent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really know how bitflags work, when I do, I'll definitely think about using them!

@pali6 pali6 merged commit c3f3e3c into goonstation:master Aug 10, 2020
github-actions bot pushed a commit that referenced this pull request Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature or enhancements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants