]> git.pond.sub.org Git - empserver/blobdiff - include/nuke.h
config: Generalize unit build materials storage
[empserver] / include / nuke.h
index 51c1a05016db20b6a9f06e5d74da78ff438f05fa..2ef7bf01ea76a1d6d090c5067b63b9eaa264a2b4 100644 (file)
@@ -35,6 +35,7 @@
 #define NUKE_H
 
 #include <time.h>
+#include "item.h"
 #include "types.h"
 
 #define N_MAXNUKE      20
@@ -64,12 +65,10 @@ struct nukstr {
 
 struct nchrstr {
     char *n_name;              /* warhead unit name */
-    int n_lcm;                 /* costs to build */
-    int n_hcm;
-    int n_oil;
-    int n_rad;
     int n_blast;               /* blast radius */
     int n_dam;                 /* damage at center */
+    short n_mat[I_MAX+1];      /* materials to build 100% */
+                               /* only I_LCM, I_HCM, I_OIL, I_RAD non-zero */
     int n_bwork;               /* work to build 100% */
     int n_tech;                        /* tech needed to build */
     int n_cost;                        /* how much it costs to build */