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

feat: Spawning NPCs via RA adds them to the Npc.List #440

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Num10ck
Copy link

@Num10ck Num10ck commented Feb 19, 2025

Description

Describe the changes
Added a transpiler for SpawnDummyCommand.Execute that adds a created NPC to the Npc.List (Player.Dictionary).

What is the current behavior? (You can also link to an open issue here)
Spawning an NPC via RA does not add it to the Npc.List (Player.Dictionary).

What is the new behavior? (if this is a feature change)
Spawning an NPC via RA adds it to the Npc.List (Player.Dictionary).

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

RemoteAdminNpcCommandAddToDictionaryFix is now static.
@VALERA771
Copy link

I think it can be done easily

@Num10ck
Copy link
Author

Num10ck commented Feb 19, 2025

I think it can be done easily

It can be done by patching DummyUtils.SpawnDummy

@VALERA771
Copy link

We have IsNPC property in Player class which is basically incapsulates a method from base game that checks if player is NPC (fr?). So we can make this list depend on this property

Co-authored-by: Yamato <[email protected]>
@Num10ck Num10ck requested a review from louis1706 February 19, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base-game-bug Bug from the main game Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants