[Add] More weapon space for ships. Space limit on outfits.

This commit is contained in:
Allanis 2013-03-08 02:26:06 +00:00
parent 94623aa081
commit 1d4286d2ad
2 changed files with 11 additions and 5 deletions

View File

@ -24,8 +24,8 @@
<characteristics>
<crew>2</crew>
<mass>32</mass>
<cap_weapon>20</cap_weapon>
<cap_cargo>25</cap_cargo>
<cap_weapon>25</cap_weapon>
<cap_cargo>20</cap_cargo>
</characteristics>
<outfits>
<outfit quantity='1'>Laser</outfit>
@ -55,7 +55,7 @@
<characteristics>
<crew>2</crew>
<mass>25</mass>
<cap_weapon>25</cap_weapon>
<cap_weapon>30</cap_weapon>
<cap_cargo>10</cap_cargo>
</characteristics>
<outfits>
@ -87,8 +87,8 @@
<characteristics>
<crew>9</crew>
<mass>130</mass>
<cap_weapon>60</cap_weapon>
<cap_cargo>40</cap_cargo>
<cap_weapon>90</cap_weapon>
<cap_cargo>20</cap_cargo>
</characteristics>
<outfits>
<outfit quantity="10">Laser</outfit>

View File

@ -187,6 +187,12 @@ static void outfits_buy(char* str) {
q = 1; // Q should be dependant on MOD keys. TODO
if((player_freeSpace() - outfit->mass) < 0) {
toolkit_alert("No enough free space (you need %d more slots).",
outfit->mass - player_freeSpace());
return;
}
pilot_addOutfit(player, outfit, q);
outfits_update(NULL);
}