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

magic welder command

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • 1 When welder is active.
  • 2 and equipped by authorized person.
  • 3 Boost the weld rate.
  • 4 When triggered with RegisterBeforeDamageHandler
  • 5 copy GetTargetBlock() method to find target cube.
  • 6 If projection, add first component to player inventory.
  • 7 Fill target cube Stockpile with any missing components.
MyAPIGateway.Session.DamageSystem.RegisterBeforeDamageHandler(0, DamageHandler);

private void DamageHandler(object target, ref MyDamageInformation info)
{
    if (info.Type == Sandbox.Common.ObjectBuilders.Definitions.MyDamageType.Weld)
    {
        VRage.ModAPI.IMyEntity entity = MyAPIGateway.Entities.GetEntityById(info.AttackerId);
        var toolbase = entity as Sandbox.Game.Weapons.MyEngineerToolBase;
        var handheld = entity as Sandbox.Game.Entities.IMyHandheldGunObject<Sandbox.Game.Weapons.MyToolBase>;

   }
}
protected MySlimBlock GetTargetBlock()
{
    if (this.ReachesCube(this.m_toolActionDistance) && this.m_targetGrid != null)
    {
        return this.m_targetGrid.GetCubeBlock(this.m_targetCube);
    }
    return null;
}

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 at the RegisterBeforeDamageHandler example and inspect the provided GetTargetBlock() method to understand how the weld target is found. Trace how welder activity, authorization, projections, inventory, and target-cube stockpiles are represented in the mod. Done means the authorized active welder boosts weld rate, adds the first projection component to inventory, and fills missing stockpile components.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.