Thread: Extention Creation Questions
-
July 3rd, 2019, 04:13 #1
Extention Creation Questions
The latest question:
I don't want to use Athletics for thrown weapons in my setting. So I assume that I add the following to my onInit()
registerWeaponType("Thrown", "Throwing", true)
or even
registerWeaponType("Thrown Knife", "Throwing Knife", true)
If I wanted to really get into the crunchy weeds of skill specialization.
My question is: Should I or do I have too explicitly call unregisterWeaponType("Thrown") beforehand? Or will mine just overwrite the default: and that's fine to do?
Sorry I know this stuff is nit-picky and I already have it working I just want my extensions to be as code correct as possible. I find that proper use really cuts down on the bugs and makes bug hunting easier.Last edited by Nurgelrot; July 3rd, 2019 at 04:22.
-
July 9th, 2019, 13:07 #2
WeaponManager.registerWeaponType does not replace/update existing weapon types, it will always add new one. If you want to update existing one, you could use WeaponManager.unregisterWeaponType to unregister is first and re-register it again. Alternatively you could fetch existing one with WeaponManager.getWeaponTypeTitles, update its properties and store changes with WeaponManager.updateWeaponType.
"Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness
Post your SavageWorlds ruleset feature requests and issue reports here!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks