object OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
{
Puts("OnDispenserGather works!");
return null;
}Instead of "BaseEntity" should be "BasePlayer" in the documentation.
Spent time on this :(
object OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
{
Puts("OnDispenserGather works!");
return null;
}Instead of "BaseEntity" should be "BasePlayer" in the documentation.
Spent time on this :(
Emm BaseEntity is parent for BasePlayer.
BTW Docs is out of date.
ArtiIOMI
Emm BaseEntity is parent for BasePlayer.
BTW Docs is out of date.
Yes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
bananamen4ikYes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
I am studying development for the first month and documentation is very important to me.
It's bad that the documentation is abandoned. 😞
Better for you will be using decompilator like ILSpy or dotPeek,
bananamen4ikYes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
I am studying development for the first month and documentation is very important to me.
It's bad that the documentation is abandoned. 😞
That isn't really the best way to check for types. You're likely better of using is or casting and null checking. Even still if you want to do it that way then you should probably use typeof(BaseEntity).IsAssignableFrom(entity.GetType()). But I'll update the docs to show the correct type.
Also the docs aren't abandoned?
ArtiIOMI
Better for you will be using decompilator like ILSpy or dotPeek,
Thanks! I'm already using "JustDecompile" 😌
0x89A
That isn't really the best way to check for types. You're likely better of using
isor casting and null checking. Even still if you want to do it that way then you should probably usetypeof(BaseEntity).IsAssignableFrom(entity.GetType()). But I'll update the docs to show the correct type.Also the docs aren't abandoned?
Thanks! I'll try your way. If I find other inaccuracies, I will report it. 👍