Remove wiki object export and now unused socket descriptions

Redundant now as everything has been imported into the new wiki
This commit is contained in:
ROllerozxa 2022-12-24 21:51:43 +01:00
commit 79907bb04a
29 changed files with 1 additions and 169 deletions

View file

@ -70,8 +70,6 @@ absorber::absorber(int size)
this->s_out[0].lpos = b2Vec2(-.125f, +this->absorber_h+this->frame_h);
this->s_in[0].lpos = b2Vec2( .125f, +this->absorber_h+this->frame_h);
this->s_in[0].set_description("Active");
this->s_out[0].set_description("1.0 when an object was absorbed");
this->scaleselect = true;
this->menu_scale = .5f;

View file

@ -16,8 +16,6 @@ angularvelmeter::angularvelmeter()
{
this->s_out[0].tag = SOCK_TAG_NONE;
this->s_out[1].tag = SOCK_TAG_NONE;
this->s_out[0].set_description("CCW Velocity");
this->s_out[1].set_description("CW Velocity");
}
edevice*

View file

@ -90,9 +90,6 @@ conveyor::conveyor()
this->s_in[0].lpos = b2Vec2(-.15f, .0f); /* speed multiplier */
this->s_in[1].lpos = b2Vec2( .15f, .0f); /* invert direction */
this->s_in[0].set_description("Speed multiplier");
this->s_in[1].set_description("Invert direction");
this->set_num_properties(3);
this->properties[0].type = P_INT;
this->properties[1].type = P_FLT;

View file

@ -75,11 +75,9 @@ class isocket
float abias;
float angle;
int tag;
char *description;
isocket()
{
description = 0;
tag = SOCK_TAG_NONE;
ctype = CABLE_RED;
p = 0;
@ -87,13 +85,6 @@ class isocket
abias = 0.f;
}
~isocket()
{
if (this->description) {
free(this->description);
}
}
inline void unplug(void)
{
if (this->p) {
@ -102,15 +93,6 @@ class isocket
tms_infof("No plug to disconnect.");
}
}
inline void set_description(const char *v)
{
if (this->description) {
free(this->description);
}
this->description = strdup(v);
}
};
class socket_in : public isocket

View file

@ -120,9 +120,6 @@ emitter::emitter(int size)
this->s_out[0].lpos = b2Vec2(-.125f, +this->emitter_h+this->frame_h-0.025f);
this->s_in[0].lpos = b2Vec2( .125f, +this->emitter_h+this->frame_h-0.025f);
this->s_in[0].set_description("Active");
this->s_out[0].set_description("1.0 when an object was emitted");
this->scaleselect = true;
this->menu_scale = .5f;

View file

@ -32,8 +32,6 @@ fan::fan()
this->s_in[0].ctype = CABLE_BLACK;
this->s_in[0].lpos = b2Vec2(.0f, .10f);
this->s_in[0].set_description("Voltage");
this->handler = new fan::cb_handler(this);
this->set_as_rect(FAN_WIDTH/2.f, .25f);

View file

@ -22,9 +22,6 @@ fxemitter::fxemitter()
this->menu_scale = 1.0f;
this->s_in[0].set_description("Activate");
this->s_out[0].set_description("Outputs 1 for one tick after its effects have been completed after being activated.");
if (W->level.version < LEVEL_VERSION_1_1_6) {
this->set_as_rect(.15f, .375f);
}

View file

@ -1596,12 +1596,6 @@ game::init_gui(void)
factionlabel = this->text_small->add_to_atlas(this->texts, "Faction:");
catsprites[n] = this->text_small->add_to_atlas(this->texts, "Recent");
#if defined(DEBUG) && (defined(TMS_BACKEND_WINDOWS) || defined(TMS_BACKEND_LINUX))
char path[512];
sprintf(path, "%s/obj", tbackend_get_storage_path());
FILE *obj_fh = fopen(path, "w+");
#endif
tms_assertf((ierr = glGetError()) == 0, "gl error %d in game::init_gui 3", ierr);
int num_objects = 0;
tms_progressf("*");
@ -1610,51 +1604,7 @@ game::init_gui(void)
for (int x=0; x<of::get_num_objects(y); x++) {
int gid = of::get_gid(y, x);
entity *e = of::create(gid);
#if defined(DEBUG) && (defined(TMS_BACKEND_WINDOWS) || defined(TMS_BACKEND_LINUX))
/* Output object data */
/* g_id:name:description:category_name:flag_active(ENTITY_IS_EDEVICE) */
if (!(y == 0 && x == 0)) {
fprintf(obj_fh, "=====");
}
const char *descr = of::get_object_description(e);
if (strcmp(descr, "No description added for this object yet, sorry!") == 0) {
tms_infof("%s LACKS A DESCRIPTION", e->get_name());
}
fprintf(obj_fh, "%d:::::", e->g_id);
fprintf(obj_fh, "%s:::::", e->get_name());
fprintf(obj_fh, "%s:::::", descr);
fprintf(obj_fh, "%s:::::", of::get_category_name(y));
fprintf(obj_fh, "%d:::::", e->get_layer());
fprintf(obj_fh, "%d:::::", e->layer_mask);
fprintf(obj_fh, "%d", e->flag_active(ENTITY_IS_EDEVICE) ? 1 : 0);
if (e->flag_active(ENTITY_IS_EDEVICE)) {
edevice *ed = e->get_edevice();
if (ed->num_s_in) {
for (int i=0; i<ed->num_s_in; ++i) {
if (i != 0) fprintf(obj_fh, ":");
fprintf(obj_fh, "%d;;", i); /* Socket index */
fprintf(obj_fh, "%d;;", ed->s_in[i].ctype); /* Cable type */
fprintf(obj_fh, "%d;;", ed->s_in[i].tag); /* Socket tag */
fprintf(obj_fh, "%s", ed->s_in[i].description ? ed->s_in[i].description : "0"); /* Socket description */
}
}
fprintf(obj_fh, "|");
if (ed->num_s_out) {
for (int i=0; i<ed->num_s_out; ++i) {
if (i != 0) fprintf(obj_fh, ":");
fprintf(obj_fh, "%d;;", i); /* Socket index */
fprintf(obj_fh, "%d;;", ed->s_out[i].ctype); /* Cable type */
fprintf(obj_fh, "%d;;", ed->s_out[i].tag); /* Socket tag */
fprintf(obj_fh, "%s", ed->s_out[i].description ? ed->s_out[i].description : "0"); /* Socket description */
}
}
}
#endif
//tms_infof("%d:'%s'", gid, e->get_name());
if (!e) {
tms_errorf("Error creating %d", gid);
@ -1669,10 +1619,6 @@ game::init_gui(void)
item::_init();
#if defined(DEBUG) && (defined(TMS_BACKEND_WINDOWS) || defined(TMS_BACKEND_LINUX))
fclose(obj_fh);
#endif
tms_assertf((ierr = glGetError()) == 0, "gl error %d in game::init_gui 4", ierr);
tms_progressf("+");

View file

@ -33,37 +33,23 @@ gameman::gameman()
this->s_in[12].lpos = b2Vec2(-.6f + .6f, .3f);
this->s_in[0].set_description("Player wins the game");
this->s_in[0].tag = SOCK_TAG_WIN;
this->s_in[1].set_description("Player loses the game");
this->s_in[1].tag = SOCK_TAG_LOSE;
this->s_in[2].set_description("Score +1");
this->s_in[2].tag = SOCK_TAG_ADD_1;
this->s_in[3].set_description("Score +50");
this->s_in[3].tag = SOCK_TAG_ADD_50;
this->s_in[4].set_description("Score +100");
this->s_in[4].tag = SOCK_TAG_ADD_100;
this->s_in[5].set_description("Score +250");
this->s_in[5].tag = SOCK_TAG_ADD_250;
this->s_in[6].set_description("Score +500");
this->s_in[6].tag = SOCK_TAG_ADD_500;
this->s_in[7].set_description("Score -1");
this->s_in[7].tag = SOCK_TAG_SUB_1;
this->s_in[8].set_description("Score -50");
this->s_in[8].tag = SOCK_TAG_SUB_50;
this->s_in[9].set_description("Score -100");
this->s_in[9].tag = SOCK_TAG_SUB_100;
this->s_in[10].set_description("Score -250");
this->s_in[10].tag = SOCK_TAG_SUB_250;
this->s_in[11].set_description("Score -500");
this->s_in[11].tag = SOCK_TAG_SUB_500;
this->s_out[0].lpos = b2Vec2(.6f, .3f);
this->s_out[0].ctype = CABLE_RED;
this->s_out[0].angle = M_PI/2.f;
this->s_out[0].set_description("Outputs current score as a fraction <monospace>current_score/max_score</monospace>. If there is no max score, 0 is always output.");
this->set_as_rect(1.6f/2.f, .950f/2.f);
}

View file

@ -30,13 +30,11 @@ generator::generator()
this->s_out[x].lpos = b2Vec2(sx,sy);
this->s_out[x].angle = M_PI/2.f;
this->s_out[x].ctype = CABLE_BLACK;
this->s_out[x].set_description("Voltage");
}
this->s_in[0].lpos = b2Vec2(-.6f,-.3f);
this->s_in[0].angle = -M_PI/2.f;
this->s_in[0].ctype = CABLE_RED;
this->s_in[0].set_description("Voltage multiplier");
this->scaleselect = true;
this->num_sliders = 1;

View file

@ -30,9 +30,6 @@ gravityman::gravityman(int _type)
this->s_in[0].lpos = b2Vec2(-.225f, 0.f); /* Angle */
this->s_in[1].lpos = b2Vec2(0.f, -0.000001f); /* Force */
this->s_in[2].lpos = b2Vec2(.25f, .0f); /* Active (+ modifier) */
this->s_in[0].set_description("Angle");
this->s_in[1].set_description("Force");
this->s_in[2].set_description("Active (+ modifier)");
this->s_in[0].tag = SOCK_TAG_ANGLE;
this->s_in[1].tag = SOCK_TAG_FORCE;
this->s_in[2].tag = SOCK_TAG_MULTIPLIER;
@ -53,7 +50,6 @@ gravityman::gravityman(int _type)
this->num_s_in = 1;
this->s_in[0].lpos = b2Vec2(0.f, -.125f); /* Active */
this->s_in[0].set_description("Multiplier");
this->s_in[0].tag = SOCK_TAG_MULTIPLIER;
this->set_as_rect(.125f, .25f);

View file

@ -207,7 +207,6 @@ lmotor::init_socks()
this->s_in[0].lpos = b2Vec2(0.f,-.085f);
this->s_in[0].ctype = CABLE_BLUE;
this->s_in[0].angle = M_PI/2.f;
this->s_in[0].set_description("Interface");
/*
this->s_in[1].lpos = b2Vec2(.0f,.35f);
@ -222,7 +221,6 @@ lmotor::init_socks()
this->s_in[0].lpos = b2Vec2(0.f,-.185f);
this->s_in[0].ctype = CABLE_BLUE;
this->s_in[0].angle = -M_PI/2.f;
this->s_in[0].set_description("Interface");
/*
this->s_in[1].lpos = b2Vec2(.0f,-.35f);

View file

@ -29,7 +29,6 @@ magnet::magnet(int type)
this->num_s_in = 1;
this->s_in[0].lpos = b2Vec2(-.5f, .25f);
this->s_in[0].ctype = CABLE_BLACK;
this->s_in[0].set_description("Voltage");
break;
}
}

View file

@ -49,9 +49,6 @@ motor::motor(int mtype)
this->s_in[1].ctype = CABLE_RED;
this->s_in[1].angle = M_PI/2.f;
this->s_in[1].tag = SOCK_TAG_SPEED;
this->s_in[0].set_description("Voltage");
this->s_in[1].set_description("Speed");
} else {
this->set_flag(ENTITY_ALLOW_AXIS_ROT, true);
this->do_solve_electronics = false;

View file

@ -411,13 +411,6 @@ panel::init_mpanel()
this->s_in[3+x].tag = SOCK_TAG_SET_VALUE;
this->s_in[6+x].ctype = CABLE_RED;
this->s_in[6+x].tag = SOCK_TAG_SET_ENABLE;
this->s_in[x].set_description("Feedback/report current value");
this->s_in[3+x].set_description("Override value");
this->s_in[6+x].set_description("Override enabled/disabled");
this->s_out[x].set_description("Raw signal");
this->s_out[3+x].set_description("Focus signal (0 or 1)");
}
}
@ -439,8 +432,6 @@ panel::init_xsmallpanel()
this->s_out[0].lpos = b2Vec2(0.f, 0.f);
this->s_out[0].ctype = CABLE_RED;
this->s_out[0].tag = SOCK_TAG_VALUE;
this->s_out[0].set_description("Raw signal");
}
void
@ -462,7 +453,6 @@ panel::init_smallpanel()
this->s_out[x].lpos = b2Vec2(-.45f + .3f * x, -.05f);
this->s_out[x].ctype = CABLE_RED;
this->s_out[x].tag = SOCK_TAG_VALUE;
this->s_out[x].set_description("Raw signal");
}
}
@ -508,13 +498,6 @@ panel::init_bigpanel()
this->s_in[8+x].tag = SOCK_TAG_SET_VALUE;
this->s_in[16+x].ctype = CABLE_RED;
this->s_in[16+x].tag = SOCK_TAG_SET_ENABLE;
this->s_in[x].set_description("Feedback/report current value");
this->s_in[8+x].set_description("Override value");
this->s_in[16+x].set_description("Override enabled/disabled");
this->s_out[x].set_description("Raw signal");
this->s_out[8+x].set_description("Focus signal (0 or 1)");
}
}

View file

@ -53,10 +53,6 @@ pkgstatus::pkgstatus()
this->scaleselect = true;
this->scalemodifier = 6.5f;
this->s_out[0].set_description("Percent completed. 1.0 if the level has been completed, otherwise top_score/final_score or 0.0");
this->s_out[1].set_description("Unlock status. Returns 1.0 if the level is unlocked according to the package unlock count.");
this->s_out[2].set_description("1.0 if this level was the last played level before the current one.");
this->set_num_properties(1);
this->properties[0].type = P_INT8;
this->properties[0].v.i8 = 1;

View file

@ -22,7 +22,6 @@ pointer::pointer()
this->s_in[0].lpos = b2Vec2(.35f, .35f);
this->s_in[0].ctype = CABLE_RED;
this->s_in[0].set_description("Angle");
this->set_uniform("~color", .3f, 0.3f, 0.3f, 1.f);

View file

@ -17,11 +17,6 @@ prompt::prompt()
this->menu_scale = 1.5f;
this->s_in[0].set_description("Activate prompt");
this->s_out[0].set_description("First button pressed");
this->s_out[1].set_description("Second button pressed");
this->s_out[2].set_description("Third button pressed");
this->set_num_properties(4);
this->properties[0].type = P_STR; /* Button #1 */

View file

@ -9,7 +9,6 @@ resistor::resistor()
this->s_in[0].ctype = CABLE_BLACK;
this->s_out[0].ctype = CABLE_BLACK;
this->s_in[1].set_description("Resistance");
this->s_in[1].tag = SOCK_TAG_MULTIPLIER;
if (W->level.version < LEVEL_VERSION_1_2_3) {

View file

@ -45,7 +45,6 @@ rocket::rocket(int size)
this->s_in[0].lpos = b2Vec2(0.f,0.6f);
this->s_in[0].ctype = CABLE_RED;
this->s_in[0].set_description("Thrust multiplier");
this->layer_mask = 14; /* sublayer 2, 3, 4 */

View file

@ -78,7 +78,6 @@ scanner::scanner()
this->handler = new scanner::cb_handler(this);
this->s_in[0].ctype = CABLE_RED;
this->s_in[0].lpos = b2Vec2(0.f, .2f);
this->s_in[0].set_description("Activate");
this->set_num_properties(1);
this->properties[0].type = P_FLT; /* Wavelength */

View file

@ -11,12 +11,7 @@
**/
esincos::esincos()
{
this->s_in[0].set_description("Angle");
this->s_out[0].set_description("Positive Y");
this->s_out[1].set_description("Positive X");
this->s_out[2].set_description("Negative Y");
this->s_out[3].set_description("Negative X");
}
edevice*

View file

@ -37,10 +37,6 @@ switcher::switcher()
this->s_in[2].angle = 0;
this->s_in[2].tag = SOCK_TAG_LEFT;
this->s_in[0].set_description("The value sent to any of the 5 outputs. Initially, the signal is sent to OUT0");
this->s_in[1].set_description("Switch output up");
this->s_in[2].set_description("Switch output down");
this->set_material(&m_edev);
this->set_mesh(mesh_factory::get_mesh(MODEL_SWITCHER));

View file

@ -17,8 +17,6 @@ tester::tester()
this->s_in[0].lpos = b2Vec2(-.125f, -.35f);
this->s_out[0].lpos = b2Vec2(.125f, -.35f);
this->s_out[0].set_description("Unmodified value of IN0");
this->set_num_properties(1);
this->properties[0].type = P_INT;
this->properties[0].v.i = 1;

View file

@ -7,7 +7,7 @@
timectrl::timectrl()
: last_set(-1.f)
{
this->s_in[0].set_description("Time modifier");
}
edevice*

View file

@ -39,12 +39,6 @@ timer::timer()
this->s_out[0].tag = SOCK_TAG_TICK;
this->s_out[1].tag = SOCK_TAG_STATUS;
this->s_in[0].set_description("Start");
this->s_in[1].set_description("Stop");
this->s_out[0].set_description("Tick");
this->s_out[1].set_description("Timer status");
this->set_num_properties(3);
this->properties[0].type = P_INT;
this->properties[0].v.i = 2500;

View file

@ -55,10 +55,6 @@ trampoline::trampoline()
this->s_out[0].ctype = CABLE_RED;
this->s_out[0].lpos = b2Vec2(.25f, 0.f);
this->s_in[0].set_description("Voltage");
this->s_in[1].set_description("On/off control (if voltage connected)");
this->s_out[0].set_description("Displacement feedback");
tmat4_load_identity(this->M);
tmat3_load_identity(this->N);
}

View file

@ -60,8 +60,6 @@ transmitter::transmitter(int _is_broadcaster)
this->s_in[1].lpos = b2Vec2(.125f, -.25f);
this->s_in[0].tag = SOCK_TAG_VALUE;
this->s_in[0].set_description("The signal to transmit");
this->s_in[1].set_description("Frequency shift");
this->set_as_rect(.25f, .375f);

View file

@ -18,8 +18,6 @@ velmeter::velmeter()
this->s_out[0].tag = SOCK_TAG_ANGLE;
//this->s_out[1].tag = SOCK_TAG_SPEED;
this->s_out[0].set_description("Angle");
this->s_out[1].set_description("Velocity");
this->set_num_properties(1);
this->properties[0].type = P_FLT;