Единый форум поддержки

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Единый форум поддержки » Корзина » ..:|Зима... ПредновоGodняя Floodилка|:..


..:|Зима... ПредновоGodняя Floodилка|:..

Сообщений 461 страница 480 из 1000

461

у нас от 0 до -5

Отредактировано Хатико (Вс, 30 Дек 2012 15:36:57)

0

462

Есть текстурщики?
А технические текстурщики есть?

Вопрос есть: как лучше рендерить панель боковины кузова тепловоза, длинной и тёмно-зелёной: вертикальными полосками или горизонтальными?

0

463

http://s3.uploads.ru/6tMgU.jpg

0

464

Один из самых странных клипов (из тех что я смотрел):

Отредактировано RUSSIAN_GOBLIN (Вс, 30 Дек 2012 10:00:37)

0

465

double

Отредактировано Je Ane (Вс, 30 Дек 2012 10:56:33)

0

466

LOL
http://s2.uploads.ru/t/2xRXM.jpg

0

467

Je Ane
Факт http://i039.radikal.ru/0806/ec/a5ffc6d7cfd9.gif

0

468

А вот это стоит послушать :)
Вечная тема)

0

469

И ещё музычка:

Надеюсь ухи не увянут)))))))

0

470

RUSSIAN_GOBLIN написал(а):

Надеюсь ухи не увянут)))))))

Неа. Вообще не слушаю :D

0

471

http://cs323119.userapi.com/v323119856/419e/Plm8YBn4m2Q.jpg

0

472

ПредновоGODняя флудерастилка.
Она не кончается.
Никто не хочет флудить.
Никто не хочет свободно общаться.
Все чем-то заняты.

Твою ж мать.

0

473

Сфоткал Витю, пока он в моём профиле!
http://s2.uploads.ru/t/n91Wx.png
Люблю его. Меня терзает любопытство, неужели ты настроил наконец модем и мы поиграем?

0

474

Тему просматривают (Гостей: 0, Пользователей: 2) John Warner Чаечка

Чайки-чайки-чаечки...

0

475

http://cs410718.userapi.com/v410718428/48e6/kJqMh2v4tak.jpg

http://cs410718.userapi.com/v410718428/4904/xmYqb6XOoMA.jpg

http://cs410718.userapi.com/v410718604/4e86/0rX2mO295eo.jpg

http://cs402125.userapi.com/v402125811/6040/y2DKuAK9O8M.jpg

http://cs410718.userapi.com/v410718323/6b81/VDzJ7ShrIdQ.jpg

http://cs323428.userapi.com/v323428688/4572/h9G_kLRG0FI.jpg

http://cs410718.userapi.com/v410718709/4bec/6KhxKR5H8EA.jpg

http://cs315227.userapi.com/v315227928/3bb9/4SFcy66HIaM.jpg

─────────────────────────────
Вконтакте
ДэвиантАрт
YouTube
Мир@Мэйл

0

476

передумал

Отредактировано John Warner (Пн, 31 Дек 2012 02:05:07)

0

477

:disappointed:

0

478

John Warner написал(а):

передумал
Отредактировано John Warner (Сегодня 07:05:07)

Шо такое, не понравились тяны?

─────────────────────────────
Вконтакте
ДэвиантАрт
YouTube
Мир@Мэйл

0

479

DARTVENOM
Неа, не про то.
Зачем тут постить вопросы по скриптингу? http://i039.radikal.ru/0806/ec/a5ffc6d7cfd9.gif
Ну, если хошь, спрошу: на каком языке это?

st44.gs
Код:
include "locomotive.gs"
include "vehicle.gs"

class LSC isclass Locomotive {

public define int S_NONE = 0;
public define int S_PC1 = 1;
public define int S_PC2 = 2;
public define int S_PC5 = 3;
public define int S_TB1 = 4;

public define int D_NONE = 0;
public define int D_RIGHT = 1;
public define int D_LEFT = 2;
public define int D_BOTH = 3;

public define int P_NONE = 0;
public define int P_FRONT = 1;
public define int P_REAR = 2;
public define int P_BOTH = 3;

StringTable ST;
Browser viewer;

int  vdb_left = 100;
int  vdb_right = 450;
int  vdb_top = 100;
int  vdb_bottom = 450;

bool bln_physics;
bool bln_lightsoff;
bool bln_pc2light;
bool bln_steamheating;
bool bln_desttable;
bool bln_night;

int int_doorstate, int_doordelay = 2;
int int_pantstate, int_pantdelay = 4;

string str_destinations;

public void ExecuteSettings (void);
KUID GetCorona(string effect);

Asset ast_red, ast_white;

KUID GetCorona(string effect) {
Soup meshtable = GetAsset().GetConfigSoup().GetNamedSoup("mesh-table");
Soup effects = meshtable.GetNamedSoup(meshtable.GetIndexedTagName(0)).GetNamedSoup("effects");
KUID kuid = effects.GetNamedSoup(effect).GetNamedTagAsKUID("texture-kuid");
return kuid;
}

void Heating(void) {
if(bln_steamheating) {
PostMessage(me,"pfx","+1+2+3",0);
} else {
PostMessage(me,"pfx","-1-2-3",0);
}
}

public void LampsClear(void) {
int int_i = 0;
while(int_i < 3) {
SetFXCoronaTexture("pb"+int_i,null);
SetFXCoronaTexture("tb"+int_i,null);
if(HasMesh("pb"+int_i)) {
SetMeshVisible("pb"+int_i,false,0.2);
}
if(HasMesh("tb"+int_i)) {
SetMeshVisible("tb"+int_i,false,0.2);
}
int_i++;
}
int_i = 0;
while(int_i < 3) {
SetFXCoronaTexture("pc"+int_i,null);
SetFXCoronaTexture("tc"+int_i,null);
if(HasMesh("pc"+int_i)) {
SetMeshVisible("pc"+int_i,false,0.2);
}
if(HasMesh("tc"+int_i)) {
SetMeshVisible("tc"+int_i,false,0.2);
}
int_i++;
}
}

public void SetLamps(int int_signal, bool bln_facing) {
int int_i;
switch(int_signal) {
case S_NONE:
break;
case S_PC1:
if (bln_facing) {
for (int_i = 0;int_i < 3;int_i++) {
if(ast_white) {
SetFXCoronaTexture("pb"+int_i,ast_white);
}
if(HasMesh("pb"+int_i)) {
SetMeshVisible("pb"+int_i,true,0.2);
}
}
} else {
for (int_i = 0;int_i < 3;int_i++) {
if(ast_white) {
SetFXCoronaTexture("tb"+int_i,ast_white);
}
if(HasMesh("tb"+int_i)) {
SetMeshVisible("tb"+int_i,true,0.2);
}
}
}
break;
case S_PC2:
if (bln_facing) {
if(ast_white) {
SetFXCoronaTexture("pb0",ast_white);
SetFXCoronaTexture("pb2",ast_white);
}
if(ast_red) {
SetFXCoronaTexture("pc1",ast_red);
}
SetMeshVisible("pb0",true,0.2);
SetMeshVisible("pb2",true,0.2);
SetMeshVisible("pc1",true,0.2);
} else {
if(ast_white) {
SetFXCoronaTexture("tb0",ast_white);
SetFXCoronaTexture("tb2",ast_white);
}
if(ast_red) {
SetFXCoronaTexture("tc1",ast_red);
}
SetMeshVisible("tb0",true,0.2);
SetMeshVisible("tb2",true,0.2);
SetMeshVisible("tc1",true,0.2);
}
break;
case S_PC5:
if (bln_facing) {
for (int_i = 0;int_i < 3;int_i++) {
if(ast_red) {
SetFXCoronaTexture("tc"+int_i,ast_red);
}
SetMeshVisible("tc"+int_i,true,0.2);
}
} else {
for (int_i = 0;int_i < 3;int_i++) {
if(ast_red) {
SetFXCoronaTexture("pc"+int_i,ast_red);
}
SetMeshVisible("pc"+int_i,true,0.2);
}
}
break;
case S_TB1:
GetMyTrain().SetHeadlightState(false);
if (bln_facing) {
if(ast_white) {
SetFXCoronaTexture("pb0",ast_white);
SetFXCoronaTexture("tb1",ast_white);
}
SetMeshVisible("pb0",true,0.2);
SetMeshVisible("tb1",true,0.2);
} else {
if(ast_white) {
SetFXCoronaTexture("pb1",ast_white);
SetFXCoronaTexture("tb0",ast_white);
}
SetMeshVisible("pb1",true,0.2);
SetMeshVisible("tb0",true,0.2);
}
break;
default:
break;
}
}

void LampySprawdz() {
int int_loc = S_NONE;
int int_prio = 2;
int bln_facing = true;
if(GetMyTrain())
{
LampsClear();
Vehicle[] veh_wagons = GetMyTrain().GetVehicles();
int_prio = GetMyTrain().GetTrainPriorityNumber();
if (!bln_lightsoff) {
if (bln_pc2light) {
if (me.GetMyTrain().GetFrontmostLocomotive()!=null) {
if (veh_wagons.size() == 1) {
SetLamps(S_PC2,GetDirectionRelativeToTrain());
SetLamps(S_PC5,GetDirectionRelativeToTrain());
} else {
if (me == veh_wagons[0]) {
SetLamps(S_PC2,GetDirectionRelativeToTrain());
}
if (me == veh_wagons[veh_wagons.size() - 1]) {
SetLamps(S_PC5,GetDirectionRelativeToTrain());
}
}
}
} else {
if (int_prio == 3) {
SetLamps(S_TB1,GetDirectionRelativeToTrain());
} else {
if (me.GetMyTrain().GetFrontmostLocomotive()!=null) {
if (veh_wagons.size() == 1) {
SetLamps(S_PC1,GetDirectionRelativeToTrain());
SetLamps(S_PC5,GetDirectionRelativeToTrain());
} else {
if (me == veh_wagons[0]) {
SetLamps(S_PC1,GetDirectionRelativeToTrain());
}
if (me == veh_wagons[veh_wagons.size() - 1]) {
SetLamps(S_PC5,GetDirectionRelativeToTrain());
}
}
}
}
}
}
}
}

void SetDoors(int int_doorstate,int int_doordelay) {
switch(int_doorstate) {
case D_NONE:
SetMeshAnimationFrame("right-passenger-door",0,int_doordelay);
SetMeshAnimationFrame("left-passenger-door",0,int_doordelay);
break;
case D_RIGHT:
SetMeshAnimationFrame("right-passenger-door",GetMeshAnimationFrameCount("right-passenger-door")-1,int_doordelay);
SetMeshAnimationFrame("left-passenger-door",0,int_doordelay);
break;
case D_LEFT:
SetMeshAnimationFrame("right-passenger-door",0,int_doordelay);
SetMeshAnimationFrame("left-passenger-door",GetMeshAnimationFrameCount("left-passenger-door")-1,int_doordelay);
break;
case D_BOTH:
SetMeshAnimationFrame("right-passenger-door",GetMeshAnimationFrameCount("right-passenger-door")-1,int_doordelay);
SetMeshAnimationFrame("left-passenger-door",GetMeshAnimationFrameCount("left-passenger-door")-1,int_doordelay);
break;
default:
break;
}
}

void SetPantos(int int_pantstate,int int_pantdelay) {
switch(int_pantstate) {
case P_NONE:
SetMeshAnimationFrame("frontpant",0,int_pantdelay);
SetMeshAnimationFrame("rearpant",0,int_pantdelay);
break;
case P_FRONT:
SetMeshAnimationFrame("frontpant",GetMeshAnimationFrameCount("frontpant")-1,int_pantdelay);
SetMeshAnimationFrame("rearpant",0,int_pantdelay);
break;
case P_REAR:
SetMeshAnimationFrame("frontpant",0,int_pantdelay);
SetMeshAnimationFrame("rearpant",GetMeshAnimationFrameCount("rearpant")-1,int_pantdelay);
break;
case P_BOTH:
SetMeshAnimationFrame("frontpant",GetMeshAnimationFrameCount("frontpant")-1,int_pantdelay);
SetMeshAnimationFrame("rearpant",GetMeshAnimationFrameCount("rearpant")-1,int_pantdelay);
break;
default:
break;
}
}

void SetDestinations(string str_destinations) {
int int_i;
if(str_destinations != "") {
if(str_destinations == "null") {
for (int_i = 0;int_i < 12;int_i++) {
SetFXNameText("dest"+int_i," ");
SetFXNameText("pdest"+int_i," ");
}
} else {
if(str_destinations[0,3] == "[O]") {
string[] str_token = Str.Tokens(str_destinations[3,],"-");
for (int_i = 0;int_i < str_token.size();int_i++) {
SetFXNameText("dest"+int_i,str_token[int_i]);
}
} else if(str_destinations[0,3] == "[P]") {
string[] str_token = Str.Tokens(str_destinations[3,],"-");
for (int_i = 0;int_i < str_token.size();int_i++) {
SetFXNameText("pdest"+int_i,str_token[int_i]);
}
} else {
for (int_i = 0;int_i < 12;int_i++) {
SetFXNameText("dest"+int_i,str_destinations);
}
}
}
}
}

void SetTableDestiny(bool bln_desttable) {
SetMeshVisible("desttable",bln_desttable,0.2);
}

void SetNightMesh(bool bln_night) {
SetMeshVisible("night",bln_night,0.2);
}

void SetPhysics(bool bln_physics) {
if(GetMyTrain()) {
GetMyTrain().EnablePhysics(!bln_physics);
}
if(!bln_physics) {
PostMessage(me,"pfx","+0",0.0);
PostMessage(me,"pfx","-0",0.5);
}
if(HasMesh("fan")) {
if(bln_physics) {
StopMeshAnimation("fan");
} else {
StartMeshAnimationLoop("fan");
}
}
}

string ViewMyDetails(void) {

string ret = "<html><body>";
Train trn_t = GetMyTrain();
Vehicle[] veh_vehicles = trn_t.GetVehicles();
DriverCharacter dch_driver = trn_t.GetActiveDriver();
string str_prio = (string)trn_t.GetTrainPriorityNumber();
string str_mykuidstr = GetAsset().GetKUID().GetHTMLString();
string str_myname = BrowserInterface.Quote(GetLocalisedName());
string str_trainname = BrowserInterface.Quote(trn_t.GetTrainDisplayName());
float flt_totalmass = 0.0;
int i;
for (i = 0; i < veh_vehicles.size(); i++) {
flt_totalmass = flt_totalmass + veh_vehicles[i].GetMass();
}
string str_massstr = strTable.GetString("mass") + ((string)(int)(flt_totalmass / 1000) + " t");

ret=ret+HTMLWindow.StartTable();
if (dch_driver) {
string str_driverimgkuid = dch_driver.GetAsset().GetKUID().GetHTMLString();
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeImage(str_driverimgkuid,true,32,32)+HTMLWindow.MakeBold(HTMLWindow.MakeFontSizeMedium(HTMLWindow.MakeFontColorBlack(str_trainname)))));
} else {
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontSizeMedium(HTMLWindow.MakeFontColorBlack(str_trainname)))));}
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontSizeMedium(HTMLWindow.MakeFontColorBlack(strTable.GetString1("vehicle_view_details1", str_massstr))))));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeFontColorBlack(strTable.GetString("interface-train-view-details-priority") + HTMLWindow.MakeLink("live://property/priority-number",str_prio))));
ret=ret+HTMLWindow.MakeRow("");
ret=ret+HTMLWindow.EndTable();
ret=ret+HTMLWindow.StartTable("bgcolor=#000000D0 cellpadding=0 cellspacing=0 border=0");
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell("","width=100%"),"height=1");
ret=ret+HTMLWindow.EndTable();
ret=ret+HTMLWindow.StartTable();
ret=ret+HTMLWindow.MakeRow("");
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeImage(str_mykuidstr,true,64,32)+HTMLWindow.MakeCell("","width=10")+HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(str_myname)))));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_physics"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/physics",bln_physics)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_pc2light"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/pc2light",bln_pc2light)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_lightsoff"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/lightsoff",bln_lightsoff)));
if(HasMesh("night")) ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_night"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/night",bln_night)));
if(HasMesh("desttable")) ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_desttable"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/desttable",bln_desttable)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_steamheating"))))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/heating",bln_steamheating)));
string str_pant;
if(HasMesh("frontpant") or HasMesh("rearpant")) {
str_pant=HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_pantograph"))))+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantograph/"+P_NONE,int_pantstate==P_NONE));
}
if(HasMesh("frontpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantograph/"+P_FRONT,int_pantstate==P_FRONT));
if(HasMesh("rearpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantograph/"+P_REAR,int_pantstate==P_REAR));
if(HasMesh("frontpant") and HasMesh("rearpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantograph/"+P_BOTH,int_pantstate==P_BOTH));
ret = ret+HTMLWindow.MakeRow(str_pant);
string str_door;
if(HasMesh("right-passenger-door") or HasMesh("left-passenger-door")) {
str_door=HTMLWindow.MakeCell(HTMLWindow.MakeBold(HTMLWindow.MakeFontColorBlack(ST.GetString("st_doorstate"))))+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_NONE,int_doorstate==D_NONE));
}
if(HasMesh("right-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_RIGHT,int_doorstate==D_RIGHT));
if(HasMesh("left-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_LEFT,int_doorstate==D_LEFT));
if(HasMesh("right-passenger-door") and HasMesh("left-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_BOTH,int_doorstate==D_BOTH));
ret = ret+HTMLWindow.MakeRow(str_door);
ret=ret+HTMLWindow.EndTable();
ret=ret+HTMLWindow.StartTable();
int int_state = trn_t.GetScheduleState();
if (int_state != Train.SS_NONE) {
string str_schstate = trn_t.GetScheduleStateString();
ret = ret + HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeItalic(HTMLWindow.MakeFontColorBlack(BrowserInterface.Quote(str_schstate)))));
}
ret=ret+HTMLWindow.EndTable();

ret=ret+HTMLWindow.StartTable();
int int_i;
ProductQueue[] prq_vehicle = GetQueues();
for (int_i = 0; int_i < prq_vehicle.size(); int_i++)
{
ProductQueue prq_vehqueue = prq_vehicle[int_i];
Asset[] ast_products = prq_vehqueue.GetProductList();
int int_l;
for (int_l = 0; int_l < ast_products.size(); int_l++)
{
ret=ret+HTMLWindow.GetPercentHTMLCode(null, prq_vehqueue, ast_products[int_l]);
}
}
ret=ret+HTMLWindow.EndTable();

ret=ret+"</body></html>";
return ret;
}

void BrowserClose(Message msg) {
if (msg.src == viewer)
viewer = null;
}

void BrowserClick(Message msg) {
if (msg.src == viewer) {
string str_prop = msg.minor[16, ];
string[] str_token = Str.Tokens(str_prop,"/");
if (str_token[0] == "priority-number") {
me.GetMyTrain().SetTrainPriorityNumber((me.GetMyTrain().GetTrainPriorityNumber() % 3) + 1);
}
if (str_token[0] == "lightsoff") {
bln_lightsoff=!bln_lightsoff;
}
if (str_token[0] == "pc2light") {
bln_pc2light=!bln_pc2light;
}
if (str_token[0] == "physics") {
bln_physics=!bln_physics;
SetPhysics(bln_physics);
}
if (str_token[0] == "desttable") {
bln_desttable=!bln_desttable;
}
if (str_token[0] == "night") {
bln_night=!bln_night;
}
if (str_token[0] == "heating") {
bln_steamheating=!bln_steamheating;
Heating();
}
if (str_token[0] == "pantograph") {
int_pantstate = Str.ToInt(str_token[1]);
}
if (str_token[0] == "doorstate") {
int_doorstate = Str.ToInt(str_token[1]);
}
ExecuteSettings();
ViewDetails(msg);
}
}

void ViewDetails(Message msg) {
if (viewer) {
vdb_left   = viewer.GetWindowLeft();
vdb_top    = viewer.GetWindowTop();
vdb_right  = viewer.GetWindowRight();
vdb_bottom = viewer.GetWindowBottom();
} else {
viewer = Constructors.NewBrowser();
}
viewer.SetWindowRect(vdb_left, vdb_top, vdb_right, vdb_bottom);
viewer.LoadHTMLString(ViewMyDetails());
}

string MakeProperty (string str_property, string str_link) {
string str_t;
if (str_link=="") {
str_t = ST.GetString("none");
} else {
str_t=str_link;
}
return HTMLWindow.MakeLink("live://property/"+str_property,str_t);
}

public string GetDescriptionHTML(void) {
string ret = inherited();
ret=ret+HTMLWindow.StartTable();
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_physics")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/physics",bln_physics)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_pc2light")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/pc2light",bln_pc2light)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_lightsoff")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/lightsoff",bln_lightsoff)));
if(HasMesh("night")) ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_night")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/night",bln_night)));
if(HasMesh("desttable")) ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_desttable")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/desttable",bln_desttable)));
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_steamheating")))+HTMLWindow.MakeCell(HTMLWindow.CheckBox("live://property/heating",bln_steamheating)));
string str_pant;
if(HasMesh("frontpant") or HasMesh("rearpant")) {
str_pant=HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_pantograph")))+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantstate/"+P_NONE,int_pantstate==P_NONE));
}
if(HasMesh("frontpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantstate/"+P_FRONT,int_pantstate==P_FRONT));
if(HasMesh("rearpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantstate/"+P_REAR,int_pantstate==P_REAR));
if(HasMesh("frontpant") and HasMesh("rearpant")) str_pant=str_pant+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/pantstate/"+P_BOTH,int_pantstate==P_BOTH));
ret = ret+HTMLWindow.MakeRow(str_pant);
if(HasMesh("frontpant") or HasMesh("rearpant")) {
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_pantdelay")))+HTMLWindow.MakeCell(MakeProperty("pantdelay",int_pantdelay)));
}
string str_door;
if(HasMesh("right-passenger-door") or HasMesh("left-passenger-door")) {
str_door=HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_doorstate")))+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_NONE,int_doorstate==D_NONE));
}
if(HasMesh("right-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_RIGHT,int_doorstate==D_RIGHT));
if(HasMesh("left-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_LEFT,int_doorstate==D_LEFT));
if(HasMesh("right-passenger-door") and HasMesh("left-passenger-door")) str_door=str_door+HTMLWindow.MakeCell(HTMLWindow.RadioButton("live://property/doorstate/"+D_BOTH,int_doorstate==D_BOTH));
ret = ret+HTMLWindow.MakeRow(str_door);
if(HasMesh("right-passenger-door") or HasMesh("left-passenger-door")) {
ret=ret+HTMLWindow.MakeRow(HTMLWindow.MakeCell(HTMLWindow.MakeBold(ST.GetString("st_doordelay")))+HTMLWindow.MakeCell(MakeProperty("doordelay",int_doordelay)));
}
ret=ret+HTMLWindow.EndTable();
ret=ret+"</body></html>";
return ret;
}


string GetPropertyType(string pID) {
string[] str_token = Str.Tokens(pID,"/");
if(str_token[0] == "lightsoff") { return "link"; }
if(str_token[0] == "pc2light") { return "link"; }
if(str_token[0] == "physics") { return "link"; }
if(str_token[0] == "night") { return "link"; }
if(str_token[0] == "desttable") { return "link"; }
if(str_token[0] == "heating") { return "link"; }
if(str_token[0] == "pantstate") { return "link"; }
if(str_token[0] == "doorstate") { return "link"; }
if(str_token[0] == "pantdelay") { return "int,1,10"; }
if(str_token[0] == "doordelay") { return "int,1,10"; }
return inherited(pID);
}

void LinkPropertyValue(string pID) {
string[] str_token = Str.Tokens(pID,"/");
if (str_token[0] == "lightsoff") {
bln_lightsoff=!bln_lightsoff;
}
else if (str_token[0] == "pc2light") {
bln_pc2light=!bln_pc2light;
}
else if (str_token[0] == "physics") {
bln_physics=!bln_physics;
SetPhysics(bln_physics);
}
else if (str_token[0] == "desttable") {
bln_desttable=!bln_desttable;
}
else if (str_token[0] == "night") {
bln_night=!bln_night;
}
else if (str_token[0] == "heating") {
bln_steamheating=!bln_steamheating;
Heating();
}
else if (str_token[0] == "pantstate") {
int_pantstate = Str.ToInt(str_token[1]);
}
else if (str_token[0] == "doorstate") {
int_doorstate = Str.ToInt(str_token[1]);
} else {
inherited(pID);
}
ExecuteSettings();
}

void SetPropertyValue(string pID, int value) {
if (pID == "pantdelay") {
int_pantdelay = value;
}
if (pID == "doordelay") {
int_doordelay = value;
}
inherited(pID,value);
}

public Soup GetProperties(void) {
Soup db = inherited();
db.SetNamedTag("bln_lightsoff",bln_lightsoff);
db.SetNamedTag("bln_pc2light",bln_pc2light);
db.SetNamedTag("bln_physics",bln_physics);
db.SetNamedTag("bln_night",bln_night);
db.SetNamedTag("bln_steamheating",bln_steamheating);
db.SetNamedTag("bln_desttable",bln_desttable);
db.SetNamedTag("int_pantstate",int_pantstate);
db.SetNamedTag("int_pantdelay",int_pantdelay);
db.SetNamedTag("int_doorstate",int_doorstate);
db.SetNamedTag("int_doordelay",int_doordelay);
db.SetNamedTag("str_destinations",str_destinations);
return db;
}

public void SetProperties(Soup db)
{
inherited(db);
bln_lightsoff = db.GetNamedTagAsBool("bln_lightsoff",false);
bln_pc2light = db.GetNamedTagAsBool("bln_pc2light",false);
bln_physics = db.GetNamedTagAsBool("bln_physics",false);
bln_night = db.GetNamedTagAsBool("bln_night",false);
bln_steamheating = db.GetNamedTagAsBool("bln_steamheating",false);
bln_desttable = db.GetNamedTagAsBool("bln_desttable",false);
int_pantstate = db.GetNamedTagAsInt("int_pantstate",0);
if (db.GetNamedTag("int_pantdelay")=="") { int_pantdelay = 4; } else {
int_pantdelay = db.GetNamedTagAsInt("int_pantdelay");
}
int_doorstate = db.GetNamedTagAsInt("int_doorstate",0);
if (db.GetNamedTag("int_doordelay")=="") { int_doordelay = 2; } else {
int_doordelay = db.GetNamedTagAsInt("int_doordelay");
}
str_destinations = db.GetNamedTag("str_destinations");
SetPhysics(bln_physics);
Heating();
ExecuteSettings();
}


void Controls(Message msg) {
if(msg.major == "World" and msg.minor == "ModuleInit") {
AddHandler(me,"Vehicle","","Controls");
AddHandler(me.GetMyTrain(),"Train","","Controls");
} else if(msg.major == "ChangeDestinationSign") {
SetDestinations(msg.minor);
} else if(msg.major == "Train" and msg.minor == "NotifyPantographs") {
SetPantos(me.GetMyTrain().GetPantographState(),int_pantdelay);
} else {
ExecuteSettings();
}
}

public void ExecuteSettings (void) {
LampySprawdz();
SetDoors(int_doorstate,int_doordelay);
SetPantos(int_pantstate,int_pantdelay);
if(str_destinations == "") { SetDestinations("null"); } else { SetDestinations(str_destinations); }
SetTableDestiny(bln_desttable);
SetNightMesh(bln_night);
}

public void Init(void) {
inherited();

if(!HasMesh("tc0")) {
ast_red = World.FindAsset(GetCorona("tc0"));
}
if(!HasMesh("pb0")) {
ast_white = World.FindAsset(GetCorona("pb0"));
}

ST = GetAsset().GetStringTable();

ExecuteSettings();

AddHandler(me,"PVL-147570","","Controls");
AddHandler(me,"World","","Controls");
AddHandler(me,"ChangeDestinationSign","","Controls");

//browser handlers
AddHandler(me,"Browser-URL","","BrowserClick");
AddHandler(me,"Browser-Closed","","BrowserClose");

}

};

http://i053.radikal.ru/0806/7f/8b80a2497566.gif

0

480

Я местами код понимаю, местами нет, и у меня нету стандарных форм для операторов, дабы самому что-то накропать.

А надо накропать.

ЗЫ Исправил ошибки.

Отредактировано John Warner (Пн, 31 Дек 2012 10:17:01)

0


Вы здесь » Единый форум поддержки » Корзина » ..:|Зима... ПредновоGodняя Floodилка|:..