-
Notifications
You must be signed in to change notification settings - Fork 291
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
Carry objects #5706
Carry objects #5706
Conversation
Would there be any opportunity in this to handle the Lift Hoists being able to load and carry a unit and drop on the map? |
Definitely not units. I'll look into Lift Hoists/infantry being able to load cargo in a subsequent pull request. |
Not quite complete, but can be put through some initial testing/feedback. |
return "attacker is evading."; | ||
} | ||
|
||
if (!game.getOptions().booleanOption(OptionsConstants.BASE_FRIENDLY_FIRE)) { |
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.
Removed this because it's being done in the base class already.
@@ -46,35 +46,27 @@ public ToHitData toHit(Game game) { | |||
*/ | |||
protected static String toHitIsImpossible(Game game, Entity ae, Targetable target) { | |||
String physicalImpossible = PhysicalAttackAction.toHitIsImpossible(game, ae, target); | |||
String extendedBladeImpossible = null; |
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.
Removed this because it's being done in the base class already.
NPE when creating a 1,000 ton object. |
A "So-and-so" has fled the map, taking (Object) with it message would be nice. |
Refactored the ICarryable interface so it's part of the BTObject hierarchy. I'm kind of ambivalent re: camo, as the cargo may not necessarily belong to the player (i.e. scenario rules call for "attacker nominates X squares that contain cargo"). The one thing that I do want to ideally do is have the cargo sprite appear "under" the units rather than over (it looks odd). Any advice on that? |
Ah ok, I didn't know if they should be player-colored. My intention was more to not keep them this black/white. Giving them a fixed brownish camo (we sure have one) is a simple option. But we can leave that for any point later. Sprite ordering ... is not in an ideal place. There is Sprite.getSpritePriority() but it is only used with the xyzSpriteHandlers while the older code just draws the sprites according to type. Since the handler sprites are mostly the ones that go over everything (move envelope) they currently draw after the units and it wouldnt be helpful to swap that. I'll take a look if the unit sprites can be added to the allSprites treemap without a big hassle so they would respect draw order, then the sprite priority should help. Will be back on this. |
Should be better now. Got a little too overzealous in my refactoring. |
I have created #5801 |
Ok, merged #5801 into this one. I think this one's ready to go now. |
The briefcase sprite doesnt scale with the board zoom. Suggestion: replace the empty prepare() in GroundObjectSprite with this:
:) |
I'm getting problems when trying to pick up stacked objects, i.e. more than 1 in a hex, specifically a light 2t and a heavy 30t. The game lets me pick up one, no questions asked (as the 30t is too heavy) but it does not really pick it up. |
Would it make sense to show carried objects in the unit tooltip? (or does it already?) |
Hoping I'm not missing something that's there already, I feel that it's likely we will at some point want to be able to identify specific carryables and maybe have them have an owner (thinking of capture the flag). May I suggest having ICarryable extend InGameObject instead of BTObject and adding the following to Briefcase.
|
Added sprite scaling and unit tooltip; adjusted the ordering of "cargo dropped" messages during PSR resolution; adjusted object hierarchy; make sure to pick up the correct object when the "default" object being picked up isn't the first in the list. |
[After #5706] Carryable objects scenario v2 language
Implements cargo carrier rules from TW:261 (mechs and protomechs only) and (partly) TOAR:90 (just the part where you can pick up a lighter object with one hand only).
Includes:
Does not include
A story told in a few screenshots: