weaponSubClass

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

weaponSubClass

Post by NoQ »

Could anybody unhardcode the list of weaponSubClass = values? :oops:
See getWeaponSubClass() :oops:

Cause right now it's quite restrictive :hmm:
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: weaponSubClass

Post by Per »

The hard part of it is to un-hard-code all the things that depend on the exact value of weaponSubClass. I am thinking of an .ini file such as this:

Code: Select all

[WSC_MISSILE]
name = "MISSILE"
flags = "WSC_EFFECT_RAIL", "WSC_EFFECT_DRAW_LAST", "WSC_EFFECT_ADDITIVE"
I'm not sure if all these hard-coded dependencies are really necessary, though. They seem somewhat arbitrary.

If someone did the job of filling out an .ini file such as the above example, with all the use cases in the code where weaponsubclasses are referenced, I'd add the support code required to read and use it.