mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
44 lines
1.7 KiB
Java
Executable File
44 lines
1.7 KiB
Java
Executable File
package script.poi;
|
|
|
|
import script.dictionary;
|
|
import script.location;
|
|
import script.obj_id;
|
|
|
|
public class remote_theater_spawner extends script.base_script
|
|
{
|
|
public remote_theater_spawner()
|
|
{
|
|
}
|
|
public int handleCreateRemoteTheater(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
String datatable = params.getString("datatable");
|
|
if (datatable == null)
|
|
{
|
|
CustomerServiceLog("theater", "WARNING: handleCreateRemoteTheater could not get " + "datatable from params on remote theater spawner " + self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
obj_id caller = params.getObjId("caller");
|
|
String name = params.getString("name");
|
|
int locationType = params.getInt("locationType");
|
|
obj_id theater = null;
|
|
if (params.containsKey("x"))
|
|
{
|
|
float x = params.getFloat("x");
|
|
float z = params.getFloat("z");
|
|
String script = params.getString("script");
|
|
debugServerConsoleMsg(self, "handleCreateRemoteTheater creating theater at " + x + ", " + z + " with script " + script);
|
|
theater = createTheater(datatable, new location(x, 0, z), script, caller, name, locationType);
|
|
}
|
|
else
|
|
{
|
|
theater = createTheater(datatable, caller, name, locationType);
|
|
}
|
|
if (!isIdValid(theater))
|
|
{
|
|
CustomerServiceLog("theater", "WARNING: handleCreateRemoteTheater could not create " + "theater from datatable " + datatable + " on remote theater spawner " + self);
|
|
}
|
|
destroyObject(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|