Code: Select all
if(w is "Lumberjack"){
//draw chainsaw stuff
}
else if(w is "HDPistol"){
//draw pistol stuff
}
else if(w is "HDSMG"){
...
}
else{
//draw numbers for ammo and secondary ammo as appropriate
1. this one file is going to get unmaintainably long if I include a lot of weapons (e.g., if I wanted to replace a bunch of weapons in another IWAD or TC)
2. it prevents anyone else from doing sub-mods without not only my approval but significant commitment on my part not just incorporating this but maintaining it in the future
Does anyone have a way for me to modularize this, so that basically this code can:
1. Look at the type of weapon that constitutes the readyweapon;
2. Look to that weapon definition to see what status bar function is tied to it; and
3. Execute that function?
Ideally I'd like to be able to do something like:
Code: Select all
extend class HDStatusBar{
void ZorchCrossbow(){
...
}
}
class ZorchCrossbow:HDWeapon{
default{
HDWeapon.SBarFunction "ZorchCrossbow";
...
}
}
Or, even better, something like:
Code: Select all
class ZorchCrossbow:HDWeapon{
override void StatusBarStuff(){
...
}
}