Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Audio File.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioFile</class>
<class>scripts.audiokit.AudioFile</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Audio Group.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioController</class>
<class>scripts.audiokit.AudioController</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Button - Master Switch.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</usertexture>
<script>
<classpath></classpath>
<class>scripts.AudioToggleShutOff</class>
<class>scripts.audiokit.AudioToggleShutOff</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Button - Music Mute Toggle.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</usertexture>
<script>
<classpath></classpath>
<class>scripts.AudioToggleMute</class>
<class>scripts.audiokit.AudioToggleMute</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Button - Trigger.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</usertexture>
<script>
<classpath></classpath>
<class>scripts.AudioCueButton</class>
<class>scripts.audiokit.AudioCueButton</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Emergency Stop.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueEStop</class>
<class>scripts.audiokit.AudioCueEStop</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Proximity Cube.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioCueVolumeTriggerCube</class>
<class>scripts.audiokit.AudioCueVolumeTriggerCube</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Proximity Sphere.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioCueVolumeTriggerSphere</class>
<class>scripts.audiokit.AudioCueVolumeTriggerSphere</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Station Dispatch.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueStationDispatch</class>
<class>scripts.audiokit.AudioCueStationDispatch</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Station Gate.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueStationGate</class>
<class>scripts.audiokit.AudioCueStationGate</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Station Platform.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueStationPlatform</class>
<class>scripts.audiokit.AudioCueStationPlatform</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Station Restraint.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueStationRestraint</class>
<class>scripts.audiokit.AudioCueStationRestraint</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Time Of Day.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueTimeOfDay</class>
<class>scripts.audiokit.AudioCueTimeOfDay</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Timer.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueTimer</class>
<class>scripts.audiokit.AudioCueTimer</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Track Trigger.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueTrackTrigger</class>
<class>scripts.audiokit.AudioCueTrackTrigger</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Cue Trigger - Weather.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<param baseroty="-90"/>
<script>
<classpath></classpath>
<class>scripts.AudioCueWeather</class>
<class>scripts.audiokit.AudioCueWeather</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Emitter - Car.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioEmitterCar</class>
<class>scripts.audiokit.AudioEmitterCar</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Emitter - Cube.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioEmitterCube</class>
<class>scripts.audiokit.AudioEmitterCube</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Emitter - Point.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioEmitterPoint</class>
<class>scripts.audiokit.AudioEmitterPoint</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
2 changes: 1 addition & 1 deletion Emitter - Sphere.nl2sco
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</usercolor>
<script>
<classpath></classpath>
<class>scripts.AudioEmitterSphere</class>
<class>scripts.audiokit.AudioEmitterSphere</class>
<sharedvm>true</sharedvm>
</script>
<scriptparameter>
Expand Down
20 changes: 0 additions & 20 deletions New.nl2mat

This file was deleted.

63 changes: 63 additions & 0 deletions scripts/BlockLogic.nlvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package scripts;

import com.nolimitscoaster.*;

public abstract class BlockLogic extends Behaviour implements ITrackProcess
{
public final int GetOrder() { return 25; }
public bool Awake() { return true; }

protected Coaster m_Coaster = null;
protected IBlock m_ControlledBlock = null;

public static final int STATE_EMPTY = 0;
public static final int STATE_APPROACH = 1;
public static final int STATE_PROCESS = 2;
public static final int STATE_LEAVING = 3;

public void Start()
{
Block block = GetBlockParameter("controlled_block", true);
m_ControlledBlock = GetIBlockFromInternalType(block);


BlockLogicManager.GetInstance().Register(this);
}

protected IBlock GetIBlockFromInternalType(Block block)
{
String blockId = block.getName();
if(block.isStation())
{
IReferenceable reference = Registry.GetInstance().GetReferenceFromName("scripts.StationSection", blockId);
if(reference == null)
Exception.Throw("Unable to find type 'scripts.StationSection' with name '" + blockId + "'");
return (IBlock)reference;
}
else if(block.isLift())
{
IReferenceable reference = Registry.GetInstance().GetReferenceFromName("scripts.LiftSection", blockId);
if(reference == null)
Exception.Throw("Unable to find type 'scripts.LiftSection' with name '" + blockId + "'");
return (IBlock)reference;
}
else
{
IReferenceable reference = Register.GetInstance().GetReferenceFromName("scripts.BlockSection", blockId);
if(reference == null)
Exception.Throw("Unable to find type 'scripts.BlockSection' with name '" + blockId + "'");
return (IBlock)reference;
}
}

public final Coaster GetCoaster()
{
return m_ControlledBlock.GetBlock().getCoaster();
}
public final Section GetSection()
{
return m_ControlledBlock.GetBlock().getSection();
}

public abstract void Process();
}
46 changes: 46 additions & 0 deletions scripts/BlockLogicManager.nlvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package scripts;

import scripts.containers.*;

public final class BlockLogicManager extends UpdateableObject
{
private static BlockLogicManager m_Instance = null;
private List m_RegisteredTrackProcesses = new List();

private BlockLogicManager()
{
SetShouldUpdate(true);
}

public static BlockLogicManager GetInstance()
{
if(m_Instance == null)
m_Instance = new BlockLogicManager();

return m_Instance;
}


public void RegisterProcess(ITrackProcess process)
{
if(m_RegisteredTrackProcesses.Contains(process))
return;

m_RegisteredTrackProcesses.Insert(process);
}
public void UnregisterProcess(ITrackProcess process)
{
if(m_RegisteredTrackProcesses.Contains(process))
m_RegisteredTrackProcesses.Remove(process);
}

public void Update(float tick)
{
IEnumerator enumerator = m_RegisteredTrackProcesses.GetEnumerator();
while(enumerator.MoveNext())
((ITrackProcess)enumerator.Get()).Process();
}

public void LateUpdate(float tick) { }
public void LateUnblockedUpdate() { }
}
21 changes: 14 additions & 7 deletions scripts/blocks/BlockSection.nlvm → scripts/BlockSection.nlvm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package scripts.blocks;
package scripts;

import com.nolimitscoaster.Block;
import com.nolimitscoaster.Section;

/// <class ignore_api="true">
/// <desc>.</desc>
public class BlockSection extends TransportSection, IState, IBlock, ITrainPositionQuery
public class BlockSection extends TransportSection, IState, IBlock, ITrainPositionQuery, IReferenceable
{
protected Block m_Block = null;

Expand Down Expand Up @@ -74,15 +74,22 @@ public class BlockSection extends TransportSection, IState, IBlock, ITrainPositi
m_Block.setState(state);
}


public String GetName()
public Block GetBlock()
{
return m_Block;
}
public TrackSection GetTrackSection()
{
return m_Block.getName();
return this;
}
public int GetNumberOfTrainsOnBlock()
{
return m_Block.getNumberOfTrainsOnBlock();
}

public Block GetBlock()
public String GetType()
{
return m_Block;
return "scripts.BlockSection";
}
}
/// </class>
21 changes: 21 additions & 0 deletions scripts/Elevator.nlvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package scripts;

import scripts.containers.*;

public class Elevator extends Behaviour
{
private Dictionary m_ElevatorInternalDoors = new Dictionary();

public int GetOrder() { return 20; }

public bool Awake() { return true; }
public void Start()
{
Json data = Json.Parse(Tools.loadTextFileFromResource(GetResourcePathParameter("elevator_data", true)));
}

public void Update(float delta)
{

}
}
Loading
Loading