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

duplicator.GenericDuplicatorFunction() improvements #2169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kirillbrest123
Copy link

duplicator.GenericDuplicatorFunction() now runs PlayerSpawnSENT and PlayerSpawnedSENT, similar to MakeProp().

This change will fix the duplicator ignoring sbox_maxsents and will allow you to dynamically control whether specific entities can be duped without having to define a factory function (or worse, redefine it). It also makes duping SENTs more consistent with duping props and other things as they do run their respective PlayerSpawn* hooks when duped.

Possible issues: can't find any. Spawning default entities and random workshop dupes seems to be working as expected (e.g. nothing is counting towards 2 limits at the same time)

Further changes: update wiki pages for PlayerSpawn* hooks to reflect that they are ran not only when things are spawned from the Q menu. You could also add a bool Duplicated argument to these hooks, or maybe even string SpawnMethod (= "spawnmenu",
"duplicator", "some_custom_method") to allow modders to add and control custom spawn methods organically.

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

Successfully merging this pull request may close these issues.

1 participant