midspace / midspace/Space-Engineers-Admin-script-mod

Replace RayCastBlocks calls

Open
#170 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
43
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Update calls to RayCastBlocks to use MyAPIGateway.Physics.CastRay.

https://github.com/midspace/Space-Engineers-Admin-script-mod/blob/master/midspace%20admin%20helper/Data/Scripts/midspace.adminscripts/Support.cs#L105

  MyAPIGateway.Physics.CastRay(start, end, out info);
    var hitGrid = info?.HitEntity as IMyCubeGrid;
    return hitGrid?.GetCubeBlock(hitGrid.WorldToGridInteger(info.Position + headTransform.Forward * 0.01))?.FatBlock as IMyTerminalBlock;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in midspace admin helper/Data/Scripts/midspace.adminscripts/Support.cs at line 105, then search the repository for other RayCastBlocks calls. Replace the calls with the suggested MyAPIGateway.Physics.CastRay usage, and verify that the old calls are no longer present.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.