ShipRepairTool range work change#51
Open
salo2016 wants to merge 1 commit into
Open
Conversation
Pcolik505
requested changes
Jul 19, 2026
Comment on lines
+38
to
+42
| /// <summary> | ||
| /// Max distance to repair a tile, ignores obstructions. | ||
| /// </summary> | ||
| [DataField, AutoNetworkedField] | ||
| public float MaxRepairDistance = 3f; |
Collaborator
There was a problem hiding this comment.
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; | ||
|
|
Collaborator
There was a problem hiding this comment.
Закомментить, а не удалить.
|
|
||
| var ourXform = Transform(ent); | ||
| var clickPos = args.ClickLocation; | ||
| var userXform = Transform(args.User); |
Collaborator
There was a problem hiding this comment.
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; |
Collaborator
There was a problem hiding this comment.
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) |
Collaborator
There was a problem hiding this comment.
Закомментить, а не удалить.
| charges: 50 | ||
| - type: AutoRecharge | ||
| rechargeDuration: 2 | ||
| rechargeDuration: 1 |
Collaborator
There was a problem hiding this comment.
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) |
Collaborator
There was a problem hiding this comment.
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. |
Author
|
Благодарю, за один случай учту |
Collaborator
Нам ещё апстримится много, так что привыкай потихоньку. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
О пулл-реквесте
Убрал с кода interaction и воспользовался простым world обработчиком.Обоснование / Баланс
https://www.youtube.com/watch?v=Kz8-1BeijCgТехнические детали
Как протестировать
Медиа
Требования
Критические изменения
Журнал изменений
🆑