mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-01-15 23:04:31 -05:00
Backed out changes to spawner and fixed Tatooine spawn TABs
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
bantha 4
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@ strItem fltSize
|
||||
s f
|
||||
dune_stalker 4
|
||||
dune_stalker_scavenger 4
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@ strItem fltSize
|
||||
s f
|
||||
canyon_krayt_dragon 4
|
||||
giant_canyon_krayt_dragon 4
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
gunrunner_newbie_leader 4
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
gunrunner_newbie_sentry 4
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
gunrunner_newbie 4
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
rockmite 4
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
rill_tempest 4
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
terrorist 4
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
strItem fltSize
|
||||
s f
|
||||
worrt 4
|
||||
|
||||
|
||||
@@ -60,23 +60,23 @@ public class spawner_area extends script.base_script
|
||||
if (dataTableOpen(strFileName))
|
||||
{
|
||||
String[] strSpawns = dataTableGetStringColumnNoDefaults(strFileName, "strItem");
|
||||
float[] fltSizes = dataTableGetFloatColumnNoDefaults(strFileName, "fltSize");
|
||||
float[] fltSizes = dataTableGetFloatColumn(strFileName, "fltSize");
|
||||
if (strSpawns == null || strSpawns.length == 0)
|
||||
{
|
||||
setName(self, "Mangled spawner. strFileName is " + strFileName + " I couldnt find any spawns in that file.");
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
if (fltSizes.length == 0)
|
||||
{
|
||||
setName(self, "Missing spawn sizes in " + strFileName);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
if (fltSizes.length != strSpawns.length)
|
||||
{
|
||||
setName(self, "MISSING VALUES: Each spawn must have an associated size (" + strFileName + ")");
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
int intRoll = rand(0, strSpawns.length - 1);
|
||||
if(intRoll >= fltSizes.length) {
|
||||
intRoll = fltSizes.length - 1;
|
||||
}
|
||||
strSpawn = strSpawns[intRoll];
|
||||
fltSize = fltSizes[intRoll];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user