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

Update base_npcs.lua #1256

Merged
merged 2 commits into from Nov 28, 2016
Merged

Update base_npcs.lua #1256

merged 2 commits into from Nov 28, 2016

Conversation

Blixibon
Copy link
Contributor

  • Medics can now heal allies, including Alyx, Barney, and even Vortigaunts. (caused by being in same squad)
  • Medics will drop a health vial when they die.
  • Zombies/Headcrabs and Antlions have their own squads.
    • Poison Zombies and Poison Headcrabs are in a different squad.
  • Vortigaunt Slaves are not in a squad. (unless they smuggle things, another reason not to trust these vorts)

Basically, everyone is in a squad now except for actor-derived NPCs like Kleiner or Breen who lack the AI required to make squads plausible.

}, "npc_odessa" )

AddNPC( {
Name = "Medic",
Class = "npc_citizen",
Category = Category,
SpawnFlags = SF_CITIZEN_MEDIC,
KeyValues = { citizentype = CT_REBEL },
SpawnFlags = bit.bor( 8, 131072 ),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use raw values here and not bit.bor( SF_NPC_DROP_HEALTHKIT, SF_CITIZEN_MEDIC )?

Copy link
Contributor Author

@Blixibon Blixibon Oct 12, 2016

Choose a reason for hiding this comment

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

I wrote that code about 5 months ago for a NPC enhancement mod, and I've always thought bit.bor only accepted integers. This is before I understood exactly what SF_FLAG_HERE definitions were, thinking they were only lua hooks at the time. I didn't think about it very much while making this pull request, except for wondering if there's another way to include multiple spawnflags.

I'll fix it as soon as possible.

@robotboy655 robotboy655 merged commit 289bdb7 into Facepunch:master Nov 28, 2016
@robotboy655
Copy link
Collaborator

image

I guess I should've seen this one coming...

robotboy655 added a commit that referenced this pull request Nov 28, 2016
@Kefta
Copy link
Contributor

Kefta commented Nov 28, 2016

Guess he pulled a code_gs

@Blixibon
Copy link
Contributor Author

Blixibon commented Nov 29, 2016

I'm assuming I made this mistake when I updated the code to fit the recent base_npcs.lua revamp. Thank you for fixing it.

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