Fix all errors regarding auto mortars#49
Closed
MadaraUchiha wants to merge 2 commits intoDevelopmentfrom
Closed
Conversation
LockdownX7
reviewed
Apr 23, 2020
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
e72f439 to
8919d19
Compare
LockdownX7
suggested changes
Apr 24, 2020
LockdownX7
left a comment
There was a problem hiding this comment.
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
approved these changes
May 10, 2020
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.
Changes
Fixes the following errors from mech automortars:
Reasoning
Bug that was noticed after #1 but has been there probably since the move to 1.1.
Testing
Check tests you have performed: