Skip to content

ShipRepairTool range work change#51

Open
salo2016 wants to merge 1 commit into
Lua-Frontier:masterfrom
salo2016:BorgFIx1
Open

ShipRepairTool range work change#51
salo2016 wants to merge 1 commit into
Lua-Frontier:masterfrom
salo2016:BorgFIx1

Conversation

@salo2016

Copy link
Copy Markdown

О пулл-реквесте

Убрал с кода interaction и воспользовался простым world обработчиком.

Обоснование / Баланс

https://www.youtube.com/watch?v=Kz8-1BeijCg

Технические детали

Как протестировать

Медиа

Требования

Критические изменения

Журнал изменений

🆑

  • tweak: Перезарядка ADS борга с 2 --> 1;
  • tweak: Repair Module теперь не требует "видимости" обьекта и работает буквально от дистанции персонажа позволяя ремонтировать обьекты даже за стеной от вас. Satisfaction.mp3

@Pcolik505 Pcolik505 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Комментирование изменений обязательно. Плюс жду балансный апрув Ковра.

Comment on lines +38 to +42
/// <summary>
/// Max distance to repair a tile, ignores obstructions.
/// </summary>
[DataField, AutoNetworkedField]
public float MaxRepairDistance = 3f;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// <summary>
/// Max distance to repair a tile, ignores obstructions.
/// </summary>
[DataField, AutoNetworkedField]
public float MaxRepairDistance = 3f;
// LuaM-start:
/// <summary>
/// Max distance to repair a tile, ignores obstructions.
/// </summary>
[DataField, AutoNetworkedField]
public float MaxRepairDistance = 3f;
// LuaM-end.

Comment on lines -23 to -25
if (!args.CanReach)
return;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Закомментить, а не удалить.


var ourXform = Transform(ent);
var clickPos = args.ClickLocation;
var userXform = Transform(args.User);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var userXform = Transform(args.User);
var userXform = Transform(args.User); // LuaM

Comment on lines +27 to +30
var userWorld = _transform.ToWorldPosition(userXform.Coordinates);

if ((clickWorld - userWorld).Length() > ent.Comp.MaxRepairDistance)
return;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var userWorld = _transform.ToWorldPosition(userXform.Coordinates);
if ((clickWorld - userWorld).Length() > ent.Comp.MaxRepairDistance)
return;
// LuaM-start:
var userWorld = _transform.ToWorldPosition(userXform.Coordinates);
if ((clickWorld - userWorld).Length() > ent.Comp.MaxRepairDistance)
return;
// LuaM-end.

Comment on lines -88 to -89
// only consider it if it's close enough
if ((spec.LocalPosition - clickPos.Position).Length() > ent.Comp.EntitySearchRadius)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Закомментить, а не удалить.

charges: 50
- type: AutoRecharge
rechargeDuration: 2
rechargeDuration: 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rechargeDuration: 1
rechargeDuration: 1 # LuaM: 2 > 1

Comment on lines +90 to +92
// only consider it if it's close enough to the clicked location, ignoring reach/visibility
var entityWorldPos = _transform.ToWorldPosition(new EntityCoordinates(targetGrid, spec.LocalPosition));
if ((entityWorldPos - clickWorld).Length() > ent.Comp.EntitySearchRadius)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// only consider it if it's close enough to the clicked location, ignoring reach/visibility
var entityWorldPos = _transform.ToWorldPosition(new EntityCoordinates(targetGrid, spec.LocalPosition));
if ((entityWorldPos - clickWorld).Length() > ent.Comp.EntitySearchRadius)
// LuaM-start:
// only consider it if it's close enough to the clicked location, ignoring reach/visibility
var entityWorldPos = _transform.ToWorldPosition(new EntityCoordinates(targetGrid, spec.LocalPosition));
if ((entityWorldPos - clickWorld).Length() > ent.Comp.EntitySearchRadius)
// LuaM-end.

@Covral Covral left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Гуд

@salo2016

Copy link
Copy Markdown
Author

Благодарю, за один случай учту

@Pcolik505

Copy link
Copy Markdown
Collaborator

Благодарю, за один случай учту

Нам ещё апстримится много, так что привыкай потихоньку.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants