summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ec6c5d)
raw | patch | inline | side by side (parent: 1ec6c5d)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 5 Aug 2019 22:31:39 +0000 (01:31 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 5 Aug 2019 22:31:39 +0000 (01:31 +0300) |
src/editor/f_main.pas | patch | blob | history | |
src/editor/g_language.pas | patch | blob | history | |
src/shared/MAPDEF.pas | patch | blob | history | |
src/shared/mapstructio.inc | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 481f597163599fabe72c50eba1127988af2abb0e..74d43c0b59d93824edf5b0956cff19186d9e1250 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
EditStyle := esSimple;
MaxLength := 5;
end;
+ case Data.DamageKind of
+ 3: str := _lc[I_PROP_TR_DAMAGE_KIND_3];
+ 4: str := _lc[I_PROP_TR_DAMAGE_KIND_4];
+ 5: str := _lc[I_PROP_TR_DAMAGE_KIND_5];
+ 6: str := _lc[I_PROP_TR_DAMAGE_KIND_6];
+ 7: str := _lc[I_PROP_TR_DAMAGE_KIND_7];
+ 8: str := _lc[I_PROP_TR_DAMAGE_KIND_8];
+ else str := _lc[I_PROP_TR_DAMAGE_KIND_0];
+ end;
+ with ItemProps[InsertRow(_lc[I_PROP_TR_DAMAGE_KIND], str, True)] do
+ begin
+ EditStyle := esPickList;
+ ReadOnly := True;
+ end;
end;
TRIGGER_HEALTH:
Values.Add(_lc[I_PROP_TR_SHOT_AIM_2]);
Values.Add(_lc[I_PROP_TR_SHOT_AIM_3]);
end
+ else if KeyName = _lc[I_PROP_TR_DAMAGE_KIND] then
+ begin
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_0]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_3]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_4]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_5]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_6]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_7]);
+ Values.Add(_lc[I_PROP_TR_DAMAGE_KIND_8]);
+ end
else if (KeyName = _lc[I_PROP_PANEL_BLEND]) or
(KeyName = _lc[I_PROP_DM_ONLY]) or
(KeyName = _lc[I_PROP_ITEM_FALLS]) or
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_DAMAGE_VALUE]], 0), 0), 65535);
Data.DamageInterval := Min(Max(
StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_INTERVAL]], 0), 0), 65535);
+ s := vleObjectProperty.Values[_lc[I_PROP_TR_DAMAGE_KIND]];
+ if s = _lc[I_PROP_TR_DAMAGE_KIND_3] then
+ Data.DamageKind := 3
+ else if s = _lc[I_PROP_TR_DAMAGE_KIND_4] then
+ Data.DamageKind := 4
+ else if s = _lc[I_PROP_TR_DAMAGE_KIND_5] then
+ Data.DamageKind := 5
+ else if s = _lc[I_PROP_TR_DAMAGE_KIND_6] then
+ Data.DamageKind := 6
+ else if s = _lc[I_PROP_TR_DAMAGE_KIND_7] then
+ Data.DamageKind := 7
+ else if s = _lc[I_PROP_TR_DAMAGE_KIND_8] then
+ Data.DamageKind := 8
+ else
+ Data.DamageKind := 0;
end;
TRIGGER_HEALTH:
index ea8c56292ad54cb666a9c6243520893fc95b95ec..0ba24c1550d1b554320cf93529881b3e01e4eb39 100644 (file)
I_PROP_TR_SCORE_CON,
I_PROP_TR_SCORE_MSG,
I_PROP_TR_DAMAGE_VALUE,
+ I_PROP_TR_DAMAGE_KIND,
+ I_PROP_TR_DAMAGE_KIND_0,
+ I_PROP_TR_DAMAGE_KIND_3,
+ I_PROP_TR_DAMAGE_KIND_4,
+ I_PROP_TR_DAMAGE_KIND_5,
+ I_PROP_TR_DAMAGE_KIND_6,
+ I_PROP_TR_DAMAGE_KIND_7,
+ I_PROP_TR_DAMAGE_KIND_8,
I_PROP_TR_HEALTH_MAX,
I_PROP_TR_SHOT_TYPE,
I_PROP_TR_SHOT_SOUND,
'Сообщение в игру'),
('PROP TR DAMAGE VALUE', 'Damage',
'Ущерб'),
+ ('PROP TR DAMAGE KIND', 'Damage type',
+ 'Тип урона'),
+ ('PROP TR DAMAGE KIND 0', 'HIT_SOME',
+ 'HIT_SOME'),
+ ('PROP TR DAMAGE KIND 3', 'HIT_TRAP',
+ 'HIT_TRAP'),
+ ('PROP TR DAMAGE KIND 4', 'HIT_FALL',
+ 'HIT_FALL'),
+ ('PROP TR DAMAGE KIND 5', 'HIT_WATER',
+ 'HIT_WATER'),
+ ('PROP TR DAMAGE KIND 6', 'HIT_ACID',
+ 'HIT_ACID'),
+ ('PROP TR DAMAGE KIND 7', 'HIT_ELECTRO',
+ 'HIT_ELECTRO'),
+ ('PROP TR DAMAGE KIND 8', 'HIT_FLAME',
+ 'HIT_FLAME'),
('PROP TR HEALTH MAX', 'To maximum',
'До максимума'),
('PROP TR SHOT TYPE', 'Projectile',
diff --git a/src/shared/MAPDEF.pas b/src/shared/MAPDEF.pas
index a94f1ecd0c2b006541d9ff07f753d17993cf3eb3..b39b5fabb3ba64de636e9564036d96d1dc8c5736 100644 (file)
--- a/src/shared/MAPDEF.pas
+++ b/src/shared/MAPDEF.pas
MessageText: Char100;
MessageTime: Word);
TRIGGER_DAMAGE: (DamageValue: Word;
- DamageInterval: Word);
+ DamageInterval: Word;
+ DamageKind: Byte);
TRIGGER_HEALTH: (HealValue: Word;
HealInterval: Word;
HealMax: Boolean;
index ae432b9614f0a857f524af2fa522be8b06d8d2fa..d1198d539aadee69b5e2961350d172dcc20f6cb8 100644 (file)
begin
getWordAt(tr.DamageValue, buf, 0);
getWordAt(tr.DamageInterval, buf, 2);
+ getBytesAt(tr.DamageKind, buf, 4);
end;
procedure xreadHealth ();
@@ -495,6 +496,7 @@ procedure mb_Write_TriggerData (var buf; bufsize: Integer; ttype: Integer; var t
begin
putWordAt(buf, 0, tr.DamageValue);
putWordAt(buf, 2, tr.DamageInterval);
+ putBytesAt(buf, 4, tr.DamageKind);
end;
procedure xwriteHealth ();