#2266 closed enhancement (duplicate)
[PATCH] Guard button In unit command panel
Reported by: | dajayalol | Owned by: | dajayalol |
---|---|---|---|
Priority: | Nice to Have | Milestone: | |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Attachments (2)
Change History (15)
by , 10 years ago
Attachment: | backup.zip added |
---|
comment:1 by , 10 years ago
Replying to dajayalol:
This is a
pre-selected action defined by input.js of /gui
with a unitcommand button of unit command panel as it's gui interface
Since i made it by cutting down garrison button
it already got a cursor,a case "guard" in /simulation/helpers/Commands.js
an Order.Guard to change an entites into "INDIVIDUAL.GUARD.APPROACHING"
and "INDIVIDUAL.GUARD.GUARDING" status
like Garrisonholder.js under /simulation/components
i added a Guard.js that has the following functions:
Guard.prototype.Init = function() Guard.prototype.GetEntities = function() Guard.prototype.GetCapacity = function()
to make sure every Unit that is under guard by another unit got a list of entitiesID that lists the Guardians of the unit,so we can manipulate the list of entitiesID when GlobalOwnershipChanged and OnGlobalEntityRenamed...etc..etc and it will Post a message to engine when MT_GuardingUnitsChanged
things that i haven't done yet is that when an entity is under "INDIVIDUAL.GUARD.GUARDING" status and when the Guarded unit is not killed or Ownershipchanged to an enemy player,it should try to keep in a range within the Guarded unit's LOS
comment:3 by , 10 years ago
Replying to leper:
Could you provide a diff (against the latest revision)?
i'll try doing so ,but last time i tried using svn -diff it didn't include guard.js and any new file against latest svn,that's the reason why i uploaded with zip it can works by extraction of the zip into /mod/public/
comment:4 by , 10 years ago
Try using svn add on the new files, then they should show up in the diff.
follow-up: 6 comment:5 by , 10 years ago
Keywords: | patch review added |
---|---|
Milestone: | Backlog → Alpha 16 |
Summary: | Guard button In unit command panel → [PATCH] Guard button In unit command panel |
See SubmittingPatches (especially the part about adding the review keyword) for future patches.
In Guard.js you are using var and const inconsitently.
In UnitAI.js the indentation in both "Order.Guard" and "GUARD.GUARDING.enter" is messed up.
You can just use <Guard/>
in the .xml-file.
comment:6 by , 10 years ago
Replying to leper:
See SubmittingPatches (especially the part about adding the review keyword) for future patches.
In Guard.js you are using var and const inconsitently.
In UnitAI.js the indentation in both "Order.Guard" and "GUARD.GUARDING.enter" is messed up.
You can just use<Guard/>
in the .xml-file.
i've acknowledged the problem during fixing FORMATIONCONTROLLER's Order.Guard
by , 10 years ago
Attachment: | Guard.diff added |
---|
i wrecked some function of garrison and lobby in this patch
comment:7 by , 10 years ago
It's not clear to me what is the purpose of this patch (there is no description), but from what I can guess fetching the code, I wonder to what extend it dupplicates http://trac.wildfiregames.com/ticket/2034 ? specially that one of the comments of #2034 was to also pass commands via a button. Most of the comments in question (including the guard button) had already been implemented in #2034, although I had not yet time to clean and finalize the patch.
comment:8 by , 10 years ago
I'm follow both, but the difference is one for siege units, other for all units. I recommend merge all.
comment:10 by , 10 years ago
i am busy doing grad school stuff so this patch might not be updated soon There's a bug that i can not make a group of unit in formation into guard mode (fixing FORMATIONCONTROLLER's Order.Guard) and i am wondering how to implement unit attacks units that attacks their vip when under INDIVIDUAL.GUARD.GUARDING
comment:11 by , 10 years ago
Is this still needed? Since we #2304 has been committed I'm not really sure if this ticket is still needed.
comment:12 by , 10 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 16 → Backlog |
Resolution: | → duplicate |
Status: | new → closed |
Thanks for the patch, but as it is already covered by #2304 which is commited, I put it as duplicate
comment:13 by , 10 years ago
Milestone: | Backlog |
---|
backup of /gui and /simulation before lobby was implemented