Merge remote-tracking branch 'main/master'

This commit is contained in:
DarthArgus
2015-12-05 00:16:34 -06:00
6 changed files with 31 additions and 8 deletions
@@ -1116,3 +1116,4 @@ i i h i f f f f f f f s p
4026531 0 object/static/structure/general/droid_r5_torso.iff 0 2012.64 28 1771.15 -0.0264239 0 0.999651 0 $|
4026532 0 object/static/structure/general/droid_repairdroidtorso.iff 0 2011.94 28 1770.73 -0.312988 0 0.949757 0 $|
4026533 0 object/static/structure/general/droid_r3_head.iff 0 2012.34 27.2962 1770.79 0.956802 -0.29074 0 0 $|
164639 0 object/tangible/space/content_infrastructure/ground_npc_spawner.iff 0 1898 28 1424 0 0 0.993868 0 space.content_tools.npc_spawner $|
@@ -0,0 +1,11 @@
type move accuracy attack defense
h f f f f
basic_recon 10 20 30 50
std_recon 10 30 40 75
adv_recon 20 40 60 100
basic_battle 20 20 20 50
std_battle 30 30 30 75
adv_battle 40 40 40 100
basic_assault 30 20 10 50
std_assault 40 30 10 75
adv_assault 60 40 20 100
@@ -2,6 +2,7 @@ spawns name room loc_x loc_y loc_z yaw script mood animation_mood respawn_time s
s s s f f f f s s s i s s s s s s
newbie_pilot_informer foyer4 1.1 0.6 66.3 33 explain 300
nexus_travel_01 arrivals1 49.2 0.6 47.3 -93 npc_sitting_chair 300
corellia_jesseb_convorr arrivals2 50 4.3 25.5 35 conversation.corellia_coronet_starport_master 300
object/tangible/collection/col_jalopy_crate_04.iff foyer4 -11.9 0.6 50.8 55
object/tangible/spawning/spawn_egg.iff arrivals1 37.3 0.6 40.9 -160 city.interior_2_convo
object/tangible/spawning/spawn_egg.iff foyer4 -6.7 0.6 65.7 30 city.interior_2_convo
@@ -5,3 +5,6 @@
@class object_template 5
moveFlags = [ MF_player ]
scripts = +["item.armor.new_armor"]
+10 -7
View File
@@ -770,13 +770,16 @@ public class armor extends script.base_script
while (keys.hasMoreElements())
{
String key = (String)(keys.nextElement());
float value = componentData.getFloatObjVar(key);
float newValue = rescaleArmorData(key, fromRow, toRow, value);
if (newValue != Float.MIN_VALUE)
{
debugServerConsoleMsg(null, "Armor scaling component data " + key + " from " + value + " to " + newValue + "(fromRow = " + fromRow + ", toRow = " + toRow + ")");
setObjVar(schematic, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".scaled." + key, newValue);
removeObjVar(schematic, craftinglib.COMPONENT_ATTRIBUTE_INTERNAL_OBJVAR_NAME + "." + key);
// scaling ignored the fact that not all objvars were floats. Instead of letting it throw a warning, just scale objvars that are floats and ints
if(componentData.isFloatObjVar(key) || componentData.isIntObjVar(key)) {
float value = (componentData.isFloatObjVar(key) ? componentData.getFloatObjVar(key) : componentData.getIntObjVar(key));
float newValue = (float) rescaleArmorData(key, fromRow, toRow, value);
if (newValue != Float.MIN_VALUE)
{
debugServerConsoleMsg(null, "Armor scaling component data " + key + " from " + value + " to " + newValue + "(fromRow = " + fromRow + ", toRow = " + toRow + ")");
setObjVar(schematic, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".scaled." + key, newValue);
removeObjVar(schematic, craftinglib.COMPONENT_ATTRIBUTE_INTERNAL_OBJVAR_NAME + "." + key);
}
}
}
setObjVar(schematic, craftinglib.COMPONENT_ATTRIBUTE_INTERNAL_OBJVAR_NAME + ".isScaled", true);
+5 -1
View File
@@ -357,6 +357,10 @@ public class obj_var implements Comparable, Serializable
catch( ClassCastException err )
{
System.err.println("WARNING: Java obj_var.getFloatData tried to get item " + m_name + " of type " + m_data.getClass());
System.err.println("------- Caught NON-FATAL Class Cast Exception -------");
System.err.println("Stack:");
err.printStackTrace();
System.err.println("------- End of Caught Class Cast Exception, Continuing execution --------");
}
return 0.0f;
} // getFloatData
@@ -535,7 +539,7 @@ public class obj_var implements Comparable, Serializable
return data;
} // getStringIdArrayData
/**
/**
* Accessor function.
*
* @return the obj_var data as an attrib_mod