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

Unique npc ids, allow interacting with npcs that are not in reality bubble #57533

Merged
merged 6 commits into from
May 9, 2022

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented May 8, 2022

Summary

None

Purpose of change

Part of #57419
Allow eocs to interact with npcs outside of reality bubble.

Describe the solution

Added new unique_id field to npc that can be optionally set via mapgen. Change u_run_npc_eocs to use this and allow it to be used at any distance.

Describe alternatives you've considered

Testing

Used this json

{
    "type": "effect_on_condition",
    "id": "test",
    "effect": [ { "u_run_npc_eocs": [
{
  "id":"test2",
  "effect":{ "arithmetic": [ { "u_val": "thirst" }, "++" ] }
}
    ], "unique_ids": ["test"] } ]
  },

after changing the line in refugee_center.json to this

{ "class": "free_merchants_merchant", "x": 71, "y": 0, "unique_id":"test" },

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Map / Mapgen Overmap, Mapgen, Map extras, Map display NPC / Factions NPCs, AI, Speech, Factions, Ownership json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels May 8, 2022
src/game.h Outdated Show resolved Hide resolved
src/npctalk.cpp Outdated Show resolved Hide resolved
Ramza13 and others added 3 commits May 7, 2022 23:47
Co-authored-by: Binrui Dong <brett.browning.dong@gmail.com>
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 9, 2022
@dseguin dseguin merged commit dc48ac2 into CleverRaven:master May 9, 2022
@Ramza13 Ramza13 deleted the unique_npc branch May 10, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs NPC / Factions NPCs, AI, Speech, Factions, Ownership
Development

Successfully merging this pull request may close these issues.

None yet

3 participants