Hey all
I'm a Software Engineer but pretty new to rust / oxide development...so don't be too harsh ;D.
Problem
After melee interacting i want to give the player the item he interacted with. From the HitInfo i can get the prefab name, but thats not the item name i have to use to ItemManager.CreateByName.
Examples
(left is name from HitInfo, right is needed string to CreateByName)
researchtable.deployed -> research.table
repairbench_deployed -> box.repair.bench
refinery_small_deployed -> small.oil.refinery
Is there a way to get around manually mapping all the items? Can i get the parent name of the deployed instance or something like that?
Thanks already in advance
I'm a Software Engineer but pretty new to rust / oxide development...so don't be too harsh ;D.
Problem
After melee interacting i want to give the player the item he interacted with. From the HitInfo i can get the prefab name, but thats not the item name i have to use to ItemManager.CreateByName.
Examples
(left is name from HitInfo, right is needed string to CreateByName)
researchtable.deployed -> research.table
repairbench_deployed -> box.repair.bench
refinery_small_deployed -> small.oil.refinery
Is there a way to get around manually mapping all the items? Can i get the parent name of the deployed instance or something like that?
Thanks already in advance