Files
dsrc/sku.0/sys.server/compiled/game/script/planet_map/map_loc.script
T

81 lines
2.6 KiB
Plaintext

/**********************************************************************
* Copyright (c)2000-2002 Sony Online Entertainment Inc.
* All Rights Reserved
*
* Title: temporary_structure.script
* Description: script that handles the temporary player structure
* @author $Author:$
* @version $Revision:$
**********************************************************************/
/***** INCLUDES ********************************************************/
include library.planetary_map;
inherits planet_map.map_loc_base;
/***** CONSTANTS *******************************************************/
/***** TRIGGERS ********************************************************/
trigger OnInitialize()
{
string template = getTemplateName(self);
if ( (template != null) || (!template.equals("")))
{
if ( template.indexOf ("object/building/player/city/garden_") != -1 ) //Don't register player city gardens on the planetary map
{
detachScript(self, "planet_map.map_loc_both");
return SCRIPT_CONTINUE;
}
}
if ( !planetary_map.addMapLocation(self) )
{
location here = getLocation(self);
debugServerConsoleMsg(self, "WARNING: unable to add self as planetary map location!");
debugServerConsoleMsg(self, "template = " + template + " here = " + here.toString());
LOG("planetaryMapLocation", "trigger OnInitialize()");
LOG("planetaryMapLocation", "WARNING: unable to add self (" + self + ") as planetary map location!");
LOG("planetaryMapLocation", "template = " + template);
LOG("planetaryMapLocation", "here = " + here.toString());
}
return SCRIPT_CONTINUE;
}
/********** debug triggers ***************
trigger OnAttach()
{
if ( !planetary_map.addMapLocation(self) )
{
string template = getTemplateName(self);
location here = getLocation(self);
debugServerConsoleMsg(self, "WARNING: unable to add self as planetary map location!");
debugServerConsoleMsg(self, "template = " + template + " here = " + here.toString());
LOG("planetaryMapLocation", "trigger OnAttach()");
LOG("planetaryMapLocation", "WARNING: unable to add self (" + self + ") as planetary map location!");
LOG("planetaryMapLocation", "template = " + template);
LOG("planetaryMapLocation", "here = " + here.toString());
}
return SCRIPT_CONTINUE;
}
trigger OnDetach()
{
planetary_map.removeMapLocation(self);
return SCRIPT_CONTINUE;
}
/********** end debug triggers ***************/
/***** MESSAGEHANDLERS *************************************************/
/***** COMMANDHANDLERS *************************************************/
/***** FUNCTIONS **************************************************/