Skip to content

Commit

Permalink
call rayt linear detector
Browse files Browse the repository at this point in the history
  • Loading branch information
krawthekrow authored and jacob1 committed Jun 24, 2018
1 parent 2935a94 commit 11d33d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/client/GameSave.cpp
Expand Up @@ -2680,7 +2680,7 @@ bool GameSave::TypeInCtype(int type, int ctype)
type == PT_STOR || type == PT_CONV || type == PT_STKM || type == PT_STKM2 ||
type == PT_FIGH || type == PT_LAVA || type == PT_SPRK || type == PT_PSTN ||
type == PT_CRAY || type == PT_DTEC || type == PT_DRAY || type == PT_PIPE ||
type == PT_PPIP || type == PT_RAYT);
type == PT_PPIP || type == PT_LDTC);
}

bool GameSave::TypeInTmp(int type)
Expand Down
@@ -1,11 +1,11 @@
#include "simulation/Elements.h"
#include <iostream>

//#TPT-Directive ElementClass Element_RAYT PT_RAYT 186
Element_RAYT::Element_RAYT()
//#TPT-Directive ElementClass Element_LDTC PT_LDTC 186
Element_LDTC::Element_LDTC()
{
Identifier = "DEFAULT_PT_RAYT";
Name = "RAYT";
Identifier = "DEFAULT_PT_LDTC";
Name = "LDTC";
Colour = PIXPACK(0x66ff66);
MenuVisible = 1;
MenuSection = SC_SENSOR;
Expand All @@ -30,7 +30,7 @@ Element_RAYT::Element_RAYT()

Temperature = 283.15f;
HeatConduct = 0;
Description = "RAYT scans in 8 directions for the element in its ctype and sparks the conductor on the opposite side";
Description = "Linear detector. Scans in 8 directions for particles with its ctype and creates a spark on the opposite side.";

Properties = TYPE_SOLID | PROP_DRAWONCTYPE | PROP_NOCTYPEDRAW;

Expand All @@ -43,7 +43,7 @@ Element_RAYT::Element_RAYT()
HighTemperature = ITH;
HighTemperatureTransition = NT;

Update = &Element_RAYT::update;
Update = &Element_LDTC::update;
}

const int mask_invert_filter = 0x1;
Expand All @@ -53,10 +53,10 @@ const int mask_keep_searching = 0x8;

//NOTES:
// ctype is used to store the target element, if any. (NONE is treated as a wildcard)
// life is used for the amount of pixels to skip before starting the scan. Starts just in front of the RAYT if 0.
// life is used for the amount of pixels to skip before starting the scan. Starts just in front of the LDTC if 0.
// tmp is the number of particles that will be scanned before scanning stops. Unbounded if 0.
// tmp2 is used for settings (binary flags). The flags are as follows:
// 0x01: Inverts the CTYPE filter so that the element in ctype is the only thing that doesn't trigger RAYT, instead of the opposite.
// 0x01: Inverts the CTYPE filter so that the element in ctype is the only thing that doesn't trigger LDTC, instead of the opposite.
// 0x02: Ignore energy particles
// 0x04: Ignore FILT (do not use color copying mode)
// 0x08: Keep searching even after finding a particle
Expand All @@ -83,8 +83,8 @@ bool accepted_type(Simulation* sim, int r)
return false;
}

//#TPT-Directive ElementHeader Element_RAYT static int update(UPDATE_FUNC_ARGS)
int Element_RAYT::update(UPDATE_FUNC_ARGS)
//#TPT-Directive ElementHeader Element_LDTC static int update(UPDATE_FUNC_ARGS)
int Element_LDTC::update(UPDATE_FUNC_ARGS)
{
int max = parts[i].tmp + parts[i].life;
for (int rx = -1; rx <= 1; rx++)
Expand Down Expand Up @@ -167,4 +167,4 @@ int Element_RAYT::update(UPDATE_FUNC_ARGS)
return 0;
}

Element_RAYT::~Element_RAYT() {}
Element_LDTC::~Element_LDTC() {}

0 comments on commit 11d33d5

Please sign in to comment.