Skip to content

Conversation

@MadaraUchiha
Copy link
Contributor

  • Add CompAmmo to the auto mortar turret.
  • Move UseAmmo check to JobGiverUtils_Reload and refactor HasJobOnThing
  • Fix null errors

Changes

Fixes the following errors from mech automortars:

  • Pawns trying to reload them
  • Errors on load

Reasoning

Bug that was noticed after #1 but has been there probably since the move to 1.1.

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • Playtested a colony (specify how long)

@MadaraUchiha MadaraUchiha requested review from a team as code owners April 23, 2020 17:00

Choose a reason for hiding this comment

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

Can't you replace this.gunInt with Gun and let the property handle instancing gunInt? That way you won't need GetOrCreateGunInt() anymore, which seems a bit redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that Gun has a bunch of other side effects that I'm not familiar with.

- Add CompAmmo to the auto mortar turret.
- Move UseAmmo check to JobGiverUtils_Reload and refactor HasJobOnThing
- Fix null errors
- Uses new GetOrCreateGunInt()
- Small cleaning up
@MadaraUchiha MadaraUchiha force-pushed the bugfix/mechanoid-auto-mortars branch 2 times, most recently from e72f439 to 8919d19 Compare April 24, 2020 10:38
Copy link

@LockdownX7 LockdownX7 left a comment

Choose a reason for hiding this comment

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

While this does fix the previous errors with mech mortars, there's a new error when a cluster containing a mortar wakes up. All mechanoids in the cluster throw this every few seconds:

CE - MakeReloadJob() (1331) - Mech_Scyther43532 tried to create a reload job without ammo. This should have been checked earlier.
Verse.Log:Error(String, Boolean)
CombatExtended.CombatExtended.LoggerUtils.CELogger:Error(String, Boolean, String)
CombatExtended.CombatExtended.Jobs.Utils.JobGiverUtils_Reload:MakeReloadJob(Pawn, Building_TurretGunCE)
CombatExtended.JobGiver_DefenderReloadTurret:TryGiveJob(Pawn)
Verse.AI.ThinkNode_JobGiver:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_Duty:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

@N7Huntsman N7Huntsman self-requested a review May 10, 2020 17:51
@N7Huntsman N7Huntsman requested a review from LockdownX7 May 12, 2020 05:27
@MadaraUchiha MadaraUchiha marked this pull request as draft May 12, 2020 16:32
@N7Huntsman N7Huntsman self-requested a review July 22, 2020 15:12
@N7Huntsman N7Huntsman deleted the bugfix/mechanoid-auto-mortars branch July 15, 2021 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants