-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CIWS v2 #3534
base: Development
Are you sure you want to change the base?
CIWS v2 #3534
Conversation
Count warmup time when trying to predict position Not tested yet (as well as everything else about CIWS)
MultiVerb turret
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12097015705.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12097281167.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12097480056.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12097511410.zip |
float speedGain, | ||
float maxSpeed, | ||
int flightTicks) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: It might simplify things to pack all these parameters into a ref struct
and pass that around instead. Right now the full parameter list has to be spelled out in a lot of places.
Source/CombatExtended/CombatExtended/Comps/CompCIWSImpactHandler_Skyfaller.cs
Outdated
Show resolved
Hide resolved
private Thing TryDropThing(Thing thing, Map map, IntVec3 position) | ||
{ | ||
var contents = (parent as IActiveDropPod)?.Contents; | ||
Rot4 rot = (contents?.setRotation != null) ? contents.setRotation.Value : Rot4.North; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could return early if contents
are null
here and spare a lot of null checks down the line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rimworld ActiveDropPod.OpenPod works the same way, so is it really worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth it since this code will now live in CE, so simplifying things will make life easier for future us.
Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs
Outdated
Show resolved
Hide resolved
Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs
Outdated
Show resolved
Hide resolved
Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs
Outdated
Show resolved
Hide resolved
Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs
Outdated
Show resolved
Hide resolved
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12126067072.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12146271401.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12146321943.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12146488676.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12146666738.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add a visual/audio effect when a skyfaller is intercepted? If they are destroyed by a non-explosive shot, it just sort of pops out a piece of slag and a dead raider.
<li Class="CombatExtended.CompProperties_CIWSImpactHandler"> | ||
<compClass>CombatExtended.CompCIWSImpactHandler_Projectile</compClass> | ||
</li> | ||
</comps> | ||
</ThingDef> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any performance implications to attaching this comp to every projectile? Would we be better making a completely different base for CIWS projectiles? Or just attaching the comp to the individual CIWS bullets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how it affects performance - there's no Tick override, so they should not affect it much.
These components is not intended for CIWS bullets, but for targets
@@ -176,5 +176,17 @@ | |||
<!-- Shield Information --> | |||
<CE_Shield_Coverage>Shield coverage</CE_Shield_Coverage> | |||
<CE_Shield_Coverage_Desc>Body parts protected from ranged and melee attacks by the shield.</CE_Shield_Coverage_Desc> | |||
|
|||
<!--CIWS--> | |||
<CIWSSettings_Copy>Copy</CIWSSettings_Copy> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a vanilla Key we can use for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know
There is a impactEffecter (EffecterDef) in CompCIWSImpactHandler for these purposes |
Additions
Describe new functionality added by your code
Changes
Describe adjustments to existing features made in this merge
References
ToDo
Testing
Check tests you have performed:
Examples
Turrets should use projectiles with thingClass ProjectileCE_CIWS.
You can specify CIWS version in def with CIWSVersion node like this:
CIWS must use Building_CIWS_CE as thingClass
Gun of such CIWS may have few attack verbs unlike usual turret.
Usual attack verb (non CIWS) must be specified first (otherwise turret may ignore it).
Also you may specify CompVerbDisabler in comps to make CIWS disablable.
Example of such gun:
Example of smart rocket, that use specific trajectory worker