-
-
Notifications
You must be signed in to change notification settings - Fork 113
Some Engineer logics on Warheads #1801
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
base: develop
Are you sure you want to change the base?
Some Engineer logics on Warheads #1801
Conversation
- Now `infantry` and `units` can execute some operations engineers do without loosing the firer like happens with engineers. - `FakeEngineer.CanRepairBridges`, if set to true, when a building with `BridgeRepairHut=yes` linked to a bridge is affected by the Warhead then all destroyed bridge sections will be fixed. - `FakeEngineer.CanDestroyBridges`, if set to true, when a building with `BridgeRepairHut=yes` linked to a bridge is affected by the Warhead then all the bridge will be destroyed. - `FakeEngineer.CanCaptureBuildings`, if set to true, a building with `Capturable=true` or `NeedsEngineer=true` is affected by the Warhead then the building will be captured by the house's firer. In `rulesmd.ini`: ```ini [SOMEWARHEAD] ; WarheadType FakeEngineer.CanRepairBridges=false ; boolean FakeEngineer.CanDestroyBridges=false ; boolean FakeEngineer.CanCaptureBuildings=false ; boolean ```
Removed all repetitive code related to checks and placed all that in a new method called CanBeAffectedByFakeEngineer(...)
Found a silent crash. Code tweaks
- Added ForceWeapon.Capture. - Added FakeEngineer.BombDisarm. - Code cleanup and improvements.
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
warhead has its own |
FakeEngineer.DisarmBombs & FakeEngineer.CanDestroyBridges dont work |
and code improvements like adding the "send event" in the capture building, because I think the radar event the capture function has doesn't trigger the Enter event in map triggers. Also, now can be triggered both repair bridge & destroy bridge depending of the current bridge status if both tags are enabled in the warhead.
Vanilla tag "BombDisarm" makes the wapon unusable for other purposes that isn't defuse bombs, also disrupts the weapons selection if you try to use the multiweapons and that tag isn't in the last weapon of the multiweapon list. Try yourself if you aren't sure of my findings (I could be wrong) :-) |
You are right about the FakeEngineer.CanDestroyBridges, I broke it days before I started this PR, I'm sorry. Now is fixed. You can have both repair & destroy tags in the same warhead and the bridge will be repaired or destroyed depending the current status of the bridge. As I mentioned to NetsuNegi I used this new disarm bombs tag in a repair weapon inside a multiweapon in a combat engineer with this weapons order: |
when FakeEngineer.CanDestroyBridges=1 & FakeEngineer.CanRepairBridges=1 in a same warhead, bridge cant be repaired or destroyed |
Engineer logics on Warheads
InfantryType
,VehicleType
,BuildingType
orAircraftType
can execute some operations engineers do without loosing the firer in the process.FakeEngineer.CanRepairBridges
, if set to true, when a building withBridgeRepairHut=yes
linked to a bridge is affected by the Warhead then all destroyed bridge sections will be fixed.FakeEngineer.CanDestroyBridges
, if set to true, when a building withBridgeRepairHut=yes
linked to a bridge is affected by the Warhead then all the bridge will be destroyed.FakeEngineer.CanCaptureBuildings
, if set to true, a building withCapturable=true
orNeedsEngineer=true
is affected by the Warhead then the building will be captured by the house's firer.FakeEngineer.DisarmBombs
, if set to true, an attached bomb will be removed if the target is affected by the Warhead.In
rulesmd.ini
:Regarding "Forcing specific weapon against certain targets":
ForceWeapon.Capture
forces specified weapon to be used if the target building is capturable.In
rulesmd.ini
: