-
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
Open
MaxDorob
wants to merge
129
commits into
Development
Choose a base branch
from
CIWS_V2
base: Development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CIWS v2 #3534
Changes from 118 commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
1752cf0
Comps for CIWS (used my comps from vanilla CIWS - https://github.com/…
MaxDorob 898c4a9
Different projectile def for CIWS-targets
MaxDorob d7115a0
Moved some code to base class
MaxDorob e085a99
Projectile movement improvments
MaxDorob f686568
Virtual check collision between
MaxDorob 3cf9ab5
Moved unused calculations to Init
MaxDorob 793cda2
Invoking OnImpact of CIWSTarget
MaxDorob 87b8ab3
Moved moving-forward code to ProjectilePropertiesCE
MaxDorob 5c7a14b
Moved NextPositions to ProjectilePropetiesCE
MaxDorob f7c929d
Returned NextPositions to ProjectileCE
MaxDorob 10ae251
2D segments intersection check
MaxDorob 343c4cd
NextPosition Changes
MaxDorob c9d620c
Initial commit for CIWS verb
MaxDorob b4b8bd1
Initial commit for CIWS projectile and turret
MaxDorob ed04020
Name fix
MaxDorob 45f241c
Another name fix
MaxDorob 6b84eb7
Temp CalculatePointForPreemptiveFire
MaxDorob afc4458
Improved base ciws tick
MaxDorob 5746b92
TryFindShotLine for projectile
MaxDorob c3ca285
Development merge
MaxDorob 725c3db
Moved PenetrationAmount to ProjectileCE again
MaxDorob c2d4704
Moved "MoveForward" logic to ProjectilePropetiesCE again
MaxDorob d23f77d
CompCIWSTarget targeting method call
MaxDorob 315718d
selecting CIWS projectile if possible for CIWS verbs
MaxDorob 6638563
Warning about wrong projectile
MaxDorob 4da40bd
Comp -> Verb
MaxDorob ee992cf
IgnoredDefs changes
MaxDorob e6007a7
Projectile -> ProjectileCE
MaxDorob ffc8f51
Validate target moved to base class
MaxDorob c082f99
Moved projectile code
MaxDorob b40bea4
One more check
MaxDorob b55d9d1
Another rename
MaxDorob 269efab
Active verb selecting
MaxDorob 0a6db24
PrimaryVerb -> AttackVerb
MaxDorob 29f2db2
Corrected check
MaxDorob 62a2671
Not calling base findLine
MaxDorob 95befe3
Seconds -> ticks
MaxDorob de887b6
Fixed reneder issue with shells
MaxDorob acc4576
Do not return target for deafult CIWS target
MaxDorob 3a7be12
ExactPosToDrawPos method
MaxDorob 8cc5b29
Corrected projectile targeting
MaxDorob 25e3a95
Moved warmup ticks to property
MaxDorob 043ee13
Corrected skip ticks (not sure if it's needed cuz it's always 0)
MaxDorob 177b345
Test CIWS turret
MaxDorob a3f4c65
Splited CompCIWSTarget to targeting and impact handle comps
MaxDorob 0889401
Splited impact logic
MaxDorob dac1499
Access modifier
MaxDorob 1248f5c
Collision logic
MaxDorob 01b9b93
Virtual CanCollideWith
MaxDorob 5d5c713
Removed CIWS code from base projectile
MaxDorob 96e7fcc
Additional check (not sure if'll help)
MaxDorob 70e129e
Revert "Different projectile def for CIWS-targets"
MaxDorob be59f64
Projectile targeting fix
MaxDorob 8d9b630
XML - Impact handler for bullets
MaxDorob 2866d22
Missing class
MaxDorob a30bbc7
Moved trajectory code to special worker
MaxDorob b60ad5b
Debug things
MaxDorob dbbd4c2
Another ballistic changes
MaxDorob 3fcdf67
Some manipulations with tick offset
MaxDorob f1152d5
Draw CIWS projectile exactly where it is
MaxDorob 14464e1
Fixed turret not using default verb
MaxDorob 79afc9d
TurretTop rotation fix
MaxDorob f6fb81d
Impact and vfx position fix
MaxDorob 576961e
Draw pos of skyfallers
MaxDorob e69476f
Code reuse for skyfallers
MaxDorob 82bfe0b
Overrided ShiftTarget variable calculations
MaxDorob 5e49c86
Removed log
MaxDorob 085f5d8
Unlocked rotation for CIWS
MaxDorob 2d4eeba
Moved GetFlightTime and DistanceTraveled to trajecory worker
MaxDorob ee6f093
Moved some calculations to separate methods
MaxDorob bdaa20f
Trajectory worker with exactpos drawing
MaxDorob 5423f86
Do not aim if CIWS
MaxDorob 42dfe71
ImpactSomething condition property
MaxDorob 842b1b5
Original ShiftTarget
MaxDorob 66fccb2
Angle and rotation now calculated w/o ShiftReport
MaxDorob 73f5a18
Corrected ticksToSkip calculations
MaxDorob 3da4d58
Shot rotation now use variable instead of field
MaxDorob 4056655
Target projectile height included
MaxDorob bc15746
Parameters change
MaxDorob b053b76
Aim CIWS-trajectory point instead of intersection point
MaxDorob e7bca9d
Moved GetTargetHeight to base class
MaxDorob a4c8d45
Skyfaller impact handler patch
MaxDorob 5bd107f
Returning more accurate position from TryFindCEShootLineFromTo (can b…
MaxDorob c0694fd
Corrected shoot position if no shootLine found
MaxDorob 719332d
Hold fire for CIWS
MaxDorob 49cbf31
Targeting by CompCIWSTarget + CompCIWSTarget_Skyfaller (not tested)
MaxDorob 8b32cc7
Changed folder of verbs
MaxDorob 369e91a
Ignored defs
MaxDorob 8f6032b
Effecter
MaxDorob 0553cca
CIWS settings dialog
MaxDorob 7c4c72a
Fixed non-lerped moving (not sure if even worked before).
MaxDorob 414eb6f
Moved rotation and angle calculations to trajectory worker
MaxDorob 9fafa61
Some optimizations
MaxDorob 4064638
Small mortar fix
MaxDorob 994dc3d
Speed gain
MaxDorob e2b55f6
Fixed prediction
MaxDorob d096114
Direct shooting version
MaxDorob 8e3e106
Rotation fix
MaxDorob 8601c76
Speed fix
MaxDorob a3027de
Removed useless class
MaxDorob 28b16ac
Disabled debug
MaxDorob 97e18f1
Some cleanup
MaxDorob 4f3bc13
reverted change for other branch
MaxDorob 38c6d7a
Backward compatibility for vehicles
MaxDorob 0a7de3b
Whitespace
MaxDorob b377260
Swap thingClass and trajectory workers if not CIWS projectile (can be…
MaxDorob ba5e06a
Whitespace
MaxDorob 3989b82
Health points
MaxDorob 94293e4
Shadow rotation fix
MaxDorob 79a7393
Removed tryPredict
MaxDorob d62426d
Checks for if Verb available (will be used with #3575 PR)
MaxDorob ea64d73
Development merge
MaxDorob b7af0ea
CIWS icons
MaxDorob e2f2864
CIWS text
MaxDorob 8a20185
Fixed warning
MaxDorob 1ddbee5
Default values for hold fire
MaxDorob fd9c036
KPV now able to target skyfallers
MaxDorob dec17b4
Fixed whitespaces
MaxDorob 6d99b3d
TryDropThing cleanup
MaxDorob 945b9f1
Another cleanup
MaxDorob 373edb0
typo
MaxDorob ab5151a
convert -> cast
MaxDorob db11cc0
Variable names
MaxDorob ea5b006
Created MidBurst property
MaxDorob 22060a6
Removed unused param
MaxDorob 87e172f
Moved new properties to other properties
MaxDorob 87d2cf3
Moved comments
MaxDorob c617309
Cleanup
MaxDorob 9cc2ed9
Removed linq
MaxDorob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Defs> | ||
|
||
<!--=============== Blaster CIWS ===============--> | ||
|
||
<ThingDef ParentName="TurretAutoBase"> | ||
<defName>CIWS_Blaster</defName> | ||
<thingClass>CombatExtended.Building_CIWS_CE</thingClass> | ||
<label>charge blaster CIWS</label> | ||
<constructionSkillPrerequisite>8</constructionSkillPrerequisite> | ||
<graphicData> | ||
<texPath>Things/Building/Turrets/MachineGunBase</texPath> | ||
<shadowData> | ||
<volume>(0.27,0.25,0.27)</volume> | ||
<offset>(0,0,0)</offset> | ||
</shadowData> | ||
</graphicData> | ||
<uiIconPath>UI/Icons/Turrets/ChargeBlaster_uiIcon</uiIconPath> | ||
<statBases> | ||
<WorkToBuild>23000</WorkToBuild> | ||
<MaxHitPoints>150</MaxHitPoints> | ||
<Mass>20</Mass> | ||
<Bulk>25</Bulk> | ||
<AimingAccuracy>0.75</AimingAccuracy> | ||
<ShootingAccuracyTurret>1.25</ShootingAccuracyTurret> | ||
<NightVisionEfficiency>0.5</NightVisionEfficiency> | ||
</statBases> | ||
<techLevel>Spacer</techLevel> | ||
<comps> | ||
<li Class="CompProperties_Power"> | ||
<compClass>CompPowerTrader</compClass> | ||
<basePowerConsumption>400</basePowerConsumption> | ||
</li> | ||
</comps> | ||
<description>Automatic turret equipped with a charge blaster.</description> | ||
<costList> | ||
<Steel>125</Steel> | ||
<Plasteel>40</Plasteel> | ||
<ComponentIndustrial>6</ComponentIndustrial> | ||
<ComponentSpacer>1</ComponentSpacer> | ||
</costList> | ||
<building> | ||
<turretGunDef>Gun_CIWSBlasterTurret</turretGunDef> | ||
<ai_combatDangerous>true</ai_combatDangerous> | ||
</building> | ||
<designatorDropdown>CE_AutoTurrets</designatorDropdown> | ||
<placeWorkers> | ||
<li>PlaceWorker_TurretTop</li> | ||
<li>PlaceWorker_ShowTurretRadius</li> | ||
</placeWorkers> | ||
<researchPrerequisites> | ||
<li>CE_ChargeTurret</li> | ||
</researchPrerequisites> | ||
<minifiedDef>MinifiedThing</minifiedDef> | ||
</ThingDef> | ||
|
||
|
||
|
||
</Defs> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Defs> | ||
|
||
<!-- ================== Blaster Turret ================== --> | ||
|
||
<ThingDef ParentName="BaseAutoTurretGun"> | ||
<defName>Gun_CIWSBlasterTurret</defName> | ||
<label>blaster turret gun</label> | ||
<graphicData> | ||
<texPath>Things/Building/Turrets/BlasterTurret_Top</texPath> | ||
<graphicClass>Graphic_Single</graphicClass> | ||
</graphicData> | ||
<description>Charge blaster attached to a turret mount.</description> | ||
<soundInteract>Interact_ChargeRifle</soundInteract> | ||
<statBases> | ||
<SightsEfficiency>1</SightsEfficiency> | ||
<ShotSpread>0.06</ShotSpread> | ||
<SwayFactor>0.86</SwayFactor> | ||
<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown> | ||
<Mass>10</Mass> | ||
</statBases> | ||
<verbs> | ||
<li Class="CombatExtended.VerbPropertiesCE"> | ||
<recoilAmount>0.90</recoilAmount> | ||
<verbClass>CombatExtended.Verb_ShootCE</verbClass> | ||
<hasStandardCommand>true</hasStandardCommand> | ||
<defaultProjectile>Bullet_8x35mmCharged</defaultProjectile> | ||
<warmupTime>1.3</warmupTime> | ||
<range>55</range> | ||
<ticksBetweenBurstShots>5</ticksBetweenBurstShots> | ||
<burstShotCount>10</burstShotCount> | ||
<soundCast>Shot_ChargeBlaster</soundCast> | ||
<soundCastTail>GunTail_Heavy</soundCastTail> | ||
<muzzleFlashScale>9</muzzleFlashScale> | ||
<recoilPattern>Mounted</recoilPattern> | ||
</li> | ||
<li Class="CombatExtended.VerbProperties_CIWSProjectile"> | ||
<verbClass>CombatExtended.VerbCIWSProjectile</verbClass> | ||
<recoilAmount>0.90</recoilAmount> | ||
<hasStandardCommand>true</hasStandardCommand> | ||
<defaultProjectile>Bullet_8x35mmCharged</defaultProjectile> | ||
<warmupTime>0.4</warmupTime> | ||
<range>105</range> | ||
<ticksBetweenBurstShots>5</ticksBetweenBurstShots> | ||
<burstShotCount>10</burstShotCount> | ||
<soundCast>Shot_ChargeBlaster</soundCast> | ||
<soundCastTail>GunTail_Heavy</soundCastTail> | ||
<muzzleFlashScale>9</muzzleFlashScale> | ||
<recoilPattern>Mounted</recoilPattern> | ||
<holdFireLabel>HoldCloseInProjectilesFire</holdFireLabel> | ||
<holdFireDesc>HoldCloseInProjectilesFireDesc</holdFireDesc> | ||
</li> | ||
<li Class="CombatExtended.VerbProperties_CIWSSkyfaller"> | ||
<verbClass>CombatExtended.VerbCIWSSkyfaller</verbClass> | ||
<recoilAmount>0.90</recoilAmount> | ||
<hasStandardCommand>true</hasStandardCommand> | ||
<defaultProjectile>Bullet_8x35mmCharged</defaultProjectile> | ||
<warmupTime>0.4</warmupTime> | ||
<range>105</range> | ||
<ticksBetweenBurstShots>5</ticksBetweenBurstShots> | ||
<burstShotCount>10</burstShotCount> | ||
<soundCast>Shot_ChargeBlaster</soundCast> | ||
<soundCastTail>GunTail_Heavy</soundCastTail> | ||
<muzzleFlashScale>9</muzzleFlashScale> | ||
<recoilPattern>Mounted</recoilPattern> | ||
<holdFireLabel>HoldCloseInSkyfallersFire</holdFireLabel> | ||
</li> | ||
</verbs> | ||
<comps> | ||
<li Class="CombatExtended.CompProperties_AmmoUser"> | ||
<magazineSize>100</magazineSize> | ||
<reloadTime>7.8</reloadTime> | ||
<ammoSet>AmmoSet_8x35mmCharged</ammoSet> | ||
</li> | ||
<li> | ||
<compClass>CombatExtended.CompVerbDisabler</compClass> | ||
</li> | ||
</comps> | ||
</ThingDef> | ||
|
||
|
||
</Defs> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. I don't know |
||
<CIWSSettings_Paste>Paste</CIWSSettings_Paste> | ||
<CIWSSettings_AvailableTargets>Available targets</CIWSSettings_AvailableTargets> | ||
<CIWSSettings_IgnoredTargets>Ignored targets</CIWSSettings_IgnoredTargets> | ||
<HoldCloseInProjectilesFire>Hold fire - projectiles</HoldCloseInProjectilesFire> | ||
<HoldCloseInProjectilesFireDesc>Ignore incoming projectiles</HoldCloseInProjectilesFireDesc> | ||
<HoldCloseInSkyfallersFire>Hold fire - skyfallers</HoldCloseInSkyfallersFire> | ||
<HoldCloseInSkyfallersFireDesc>Ignore landing skyfallers and drop pods</HoldCloseInSkyfallersFireDesc> | ||
<Dialog_ManageCIWS>Configure CIWS</Dialog_ManageCIWS> | ||
<Dialog_ManageCIWSDesc>Change available and ignored targets for selected CIWS</Dialog_ManageCIWSDesc> | ||
|
||
</LanguageData> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Patch> | ||
|
||
<!-- Skyfallers --> | ||
|
||
<Operation Class="PatchOperationConditional"> | ||
<xpath>Defs/ThingDef[@Name="SkyfallerBase"]/comps</xpath> | ||
<nomatch Class="PatchOperationAdd"> | ||
<xpath>Defs/ThingDef[@Name="SkyfallerBase"]</xpath> | ||
<value> | ||
<comps /> | ||
</value> | ||
</nomatch> | ||
</Operation> | ||
|
||
<Operation Class="PatchOperationAdd"> | ||
<xpath>Defs/ThingDef[@Name="SkyfallerBase"]/comps</xpath> | ||
<value> | ||
<li Class="CombatExtended.CompProperties_CIWSImpactHandler"> | ||
<compClass>CombatExtended.CompCIWSImpactHandler_Skyfaller</compClass> | ||
<HP>22</HP> | ||
</li> | ||
</value> | ||
</Operation> | ||
</Patch> |
This file contains 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
Oops, something went wrong.
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.
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