Starsector API
Loading...
Searching...
No Matches
WeaponGroupSpec.java
Go to the documentation of this file.
1package com.fs.starfarer.api.loading;
2
3import java.util.ArrayList;
4import java.util.List;
5
6public class WeaponGroupSpec implements Cloneable {
7
9 private boolean autofireOnByDefault = false;
10 //private boolean isModuleGroup = false;
11
12 private List<String> slots = new ArrayList<String>(); // list of slot ids
13
14 @Override
16 try {
17 WeaponGroupSpec copy = (WeaponGroupSpec) super.clone();
18 copy.slots = new ArrayList<String>();
19 copy.slots.addAll(slots);
20 return copy;
21 } catch (CloneNotSupportedException e) {
22 }
23 return null;
24 }
25
26 public WeaponGroupSpec() {
27 }
28
30 this.type = type;
31 }
32
34 return type;
35 }
36
37 public void setType(WeaponGroupType type) {
38 this.type = type;
39 }
40
41 public List<String> getSlots() {
42 return slots;
43 }
44
45 public void addSlot(String slotId) {
46 slots.add(slotId);
47 }
48
49 public void removeSlot(String slotId) {
50 slots.remove(slotId);
51 }
52
53 public boolean isAutofireOnByDefault() {
54 return autofireOnByDefault;
55 }
56
57 public void setAutofireOnByDefault(boolean autofireOnByDefault) {
58 this.autofireOnByDefault = autofireOnByDefault;
59 }
60
61// public boolean isModuleGroup() {
62// return isModuleGroup;
63// }
64//
65// public void setModuleGroup(boolean isModuleGroup) {
66// this.isModuleGroup = isModuleGroup;
67// }
68
69
70}
void setAutofireOnByDefault(boolean autofireOnByDefault)