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

Hostile mininuke manhacks make unorthodox pets #66758

Closed
Procyonae opened this issue Jul 8, 2023 · 5 comments · Fixed by #66899
Closed

Hostile mininuke manhacks make unorthodox pets #66758

Procyonae opened this issue Jul 8, 2023 · 5 comments · Fixed by #66899
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@Procyonae
Copy link
Contributor

Procyonae commented Jul 8, 2023

Describe the bug

None of the exploding manhacks appear to be detonating possibly due to #64027 giving them PACIFIST whether deployed by the player, an enemy dispatch or spawned in

Attach save file

N/A

Steps to reproduce

  1. Spawn a mininuke manhack or dispatch
  2. Keep it as a pet forever

Expected behavior

KABOOM!

They should detonate when near a hostile (potentially only when out of range of their dispatch if that wasn't already a thing)

Screenshots

image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3086 (22H2)
  • Game Version: 42285e4 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

No response

@Procyonae Procyonae added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jul 8, 2023
@Zoraman26
Copy link
Contributor

Zoraman26 commented Jul 8, 2023

Dispatchers should also probably retreat to a safe distance after deploying manhacks, and if there isn't anywhere to go should only deploy tear gas/flashbang hacks.

@Zephanos
Copy link
Contributor

Zephanos commented Jul 9, 2023

I took a little bit of time to look into this to see if I could pinpoint the problem, first thing I tried was removing PACIFIST from the drone flags again but they still wouldn't detonate. After turning on debug mode I found this message was popping up:

monhackinvalid

which seems to be coming from these lines:

const use_function *use = act_bomb_type->get_use( "explosion" );
if( use == nullptr ) {
// Invalid active bomb item usage, Toggle this special off so we stop processing
add_msg_debug( debugmode::DF_MATTACK,
"Invalid active bomb explosion use in kamikaze special for %s.",
z->name() );
z->disable_special( "KAMIKAZE" );
return true;
}

It could possibly be related to #66161 since use_action for explosives was reworked there.

@Procyonae
Copy link
Contributor Author

That could be it, I figured it was unlikely your PR did it without you somehow noticing, I just couldn't find any other relevant ones from a quick search

@Zephanos
Copy link
Contributor

Zephanos commented Jul 9, 2023

All good I'm glad that you pinged it cause othewise I probably wouldn't have noticed this bug, I love the dispatch conceptually and I'd hate to see it's mechanics bugged. I might take a look at fixing this if I get some free time and someone else hasn't already fixed it in the future, though I am pretty novice when it comes to c++ so it might be a challenging lol.

@Hirmuolio
Copy link
Contributor

That is few too many // HACK: HORRIBLE HACK ALERT! on the code.

Probably easiest way to fix is to define new grenades that are used by the manhacks only that have same use_action definitions as old grenades.
So "use_action": { exploson stuff } instead of "countdown_action": { explosion stuff }.
Some of the item IDs are hardcoded in code so those would need to be updated. But other than that there wouldn't need to be any c++ changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants