Gridarta Editor
net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent Class Reference

Class which stores information about one scripted event. More...

+ Inheritance diagram for net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent:
+ Collaboration diagram for net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent:

Public Member Functions

GameObject getEventArch ()
 
int getEventType ()
 
String getOptions ()
 
String getPluginName ()
 
String getScriptPath ()
 
void modifyEventPath ()
 
- Public Member Functions inherited from net.sf.gridarta.model.scripts.ScriptedEvent< G, A, R >
getEventArch ()
 Returns the underlying event game object. More...
 
int getEventType ()
 
String getOptions ()
 
String getPluginName ()
 
String getScriptPath ()
 
void modifyEventPath ()
 Set event path and plugin name according to user input from popup dialog. More...
 

Protected Member Functions

final void setEventData (@NotNull final String pluginName, @NotNull final String scriptPath, @NotNull final String options)
 
String typeName (final int eventType)
 

Package Functions

 DefaultScriptedEvent (@NotNull final ScriptArchUtils scriptArchUtils, final GameObject event, @NotNull final String subtypeAttribute, @NotNull final ScriptedEventEditor< GameObject, MapArchObject, Archetype > scriptedEventEditor)
 Creates a ScriptedEvent of given type (This is used for map-loading). More...
 
 DefaultScriptedEvent (@NotNull final ScriptArchUtils scriptArchUtils, final int eventType, @NotNull final String subtypeAttribute, @NotNull final String pluginName, final String scriptPath, final String options, @NotNull final ScriptedEventFactory< GameObject, MapArchObject, Archetype > scriptedEventFactory, @NotNull final ScriptedEventEditor< GameObject, MapArchObject, Archetype > scriptedEventEditor) throws UndefinedEventArchetypeException
 Creates a fully initialized ScriptedEvent. More...
 

Private Member Functions

void setOptions (@NotNull final String options)
 
void setPluginName (@NotNull final String pluginName)
 
void setScriptPath (@NotNull final String scriptPath)
 

Private Attributes

final GameObject event
 The underlying game object that represents the event. More...
 
final ScriptArchUtils scriptArchUtils
 The ScriptArchUtils instance to use. More...
 
final ScriptedEventEditor< GameObject, MapArchObject, ArchetypescriptedEventEditor
 The ScriptedEventEditor to use. More...
 
final String subtypeAttribute
 The attribute name for the subtype field. More...
 

Static Private Attributes

static final String OPTIONS = "slaying"
 The attribute that holds the options. More...
 
static final String SCRIPT_PATH = "race"
 The attribute that holds the script path. More...
 

Detailed Description

Class which stores information about one scripted event.

Author
Andreas Kirschbaum

Definition at line 37 of file DefaultScriptedEvent.java.

Constructor & Destructor Documentation

◆ DefaultScriptedEvent() [1/2]

net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.DefaultScriptedEvent ( @NotNull final ScriptArchUtils  scriptArchUtils,
final GameObject  event,
@NotNull final String  subtypeAttribute,
@NotNull final ScriptedEventEditor< GameObject, MapArchObject, Archetype scriptedEventEditor 
)
package

Creates a ScriptedEvent of given type (This is used for map-loading).

Parameters
scriptArchUtilsthe script arch utils instance to use
eventthe game object that describes the event
subtypeAttributethe attribute name for the subtype field
scriptedEventEditorthe scripted event editor to use

Definition at line 81 of file DefaultScriptedEvent.java.

References net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.event, net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.scriptArchUtils, net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.scriptedEventEditor, and net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.subtypeAttribute.

◆ DefaultScriptedEvent() [2/2]

net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.DefaultScriptedEvent ( @NotNull final ScriptArchUtils  scriptArchUtils,
final int  eventType,
@NotNull final String  subtypeAttribute,
@NotNull final String  pluginName,
final String  scriptPath,
final String  options,
@NotNull final ScriptedEventFactory< GameObject, MapArchObject, Archetype scriptedEventFactory,
@NotNull final ScriptedEventEditor< GameObject, MapArchObject, Archetype scriptedEventEditor 
) throws UndefinedEventArchetypeException
package

Creates a fully initialized ScriptedEvent.

Parameters
scriptArchUtilsthe script arch utils instance to use
eventTypetype of the event
subtypeAttributethe attribute name for the subtype field
pluginNamename of the plugin
scriptPathpath to the file for this event
optionsthe options for this event
scriptedEventFactorythe scripted event factory for creating game objects
scriptedEventEditorthe scripted event editor to use
Exceptions
UndefinedEventArchetypeExceptionIn case there is no Archetype to create a ScriptedEvent.

Definition at line 102 of file DefaultScriptedEvent.java.

References net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.scriptArchUtils, net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.scriptedEventEditor, net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.setEventData(), and net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.subtypeAttribute.

+ Here is the call graph for this function:

Member Function Documentation

◆ getEventArch()

GameObject net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.getEventArch ( )

◆ getEventType()

int net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.getEventType ( )

◆ getOptions()

String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.getOptions ( )

◆ getPluginName()

String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.getPluginName ( )

◆ getScriptPath()

String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.getScriptPath ( )

◆ modifyEventPath()

◆ setEventData()

◆ setOptions()

void net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.setOptions ( @NotNull final String  options)
private

◆ setPluginName()

void net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.setPluginName ( @NotNull final String  pluginName)
private

◆ setScriptPath()

void net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.setScriptPath ( @NotNull final String  scriptPath)
private

◆ typeName()

String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.typeName ( final int  eventType)
protected

Member Data Documentation

◆ event

final GameObject net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.event
private

◆ OPTIONS

final String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.OPTIONS = "slaying"
staticprivate

◆ SCRIPT_PATH

final String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.SCRIPT_PATH = "race"
staticprivate

◆ scriptArchUtils

final ScriptArchUtils net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.scriptArchUtils
private

◆ scriptedEventEditor

◆ subtypeAttribute

final String net.sf.gridarta.var.atrinik.model.scripts.DefaultScriptedEvent.subtypeAttribute
private

The documentation for this class was generated from the following file: