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

Add GetItemTypePrice and a forward for GetItemTypeMaxHitPoints #7

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

mysy00
Copy link
Contributor

@mysy00 mysy00 commented Nov 21, 2022

There was a forward missing for GetItemTypeMaxHitPoints function. Hence, I hadn't had added this function.
In this pull request I add the missing forward + GetItemTypePrice.

I'd also like to ask. Is there any particular reason why ItemTypes lack of setters? I was considering adding them in the future.
I feel like it would be nice to dynamically manage not only items but also whole item types.

@Southclaws
Copy link
Contributor

Thanks!

And the reason there aren't many setters for item type data is that the original design behind item type data is that it remains static. This allows you to build against a set of assumptions and it simplifies everything. There also was never any user cases for introducing the ability to change some property about every single instance of an item. For example, you probably wouldn't ever need to change the model, weight, object offsets or hitpoints for every single AK-47 in the entire server. And if you do, it's always a long-term change not something that's only going to take affect for a few minutes so it warrants a re-compile of the game.

If there are use-cases, it could be implemented but those changes would need to be carefully propagated across all instances and it may cause a lot of additional complexity to be required.

@Southclaws Southclaws merged commit af95058 into ScavengeSurvive:master Nov 21, 2022
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.

2 participants