HomeWildfire Games

Move undeletable tag to identity component, preparation for allowing units…

Description

Move undeletable tag to identity component, preparation for allowing units without health component.
Also fix a missing init from D750/rP19987

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D341

Event Timeline

elexis added a subscriber: elexis.Dec 3 2017, 10:04 PM
elexis added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

Whoever wrote this piece of code forgot to support an arbitrary amount of special filters, otherwise I would have suggested [specialFilter, templateName] = templateName.split("|");

bb added inline comments.Dec 3 2017, 10:08 PM
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

but we look for the lastindex of | right?, so we split of all specialfilters off, thus an arbitrary amount is allowed (there is no need for listing all special filters, they just need to be splitted from the templatename)

temple added a subscriber: temple.Dec 3 2017, 10:50 PM
temple added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

My mistake for not checking this carefully. lastIndexOf is correct, but L49 is wrong, it should be specialFilterPos + 1. Otherwise we have a | on the front and that won't match the replacements.

bb added inline comments.Dec 3 2017, 11:48 PM
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

then the check can be removed too right? so we leave with shorter code \0/

temple added inline comments.Dec 4 2017, 12:17 AM
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

right

bb added inline comments.Dec 4 2017, 12:28 AM
/ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
49

(already have the patch)

elexis added inline comments.Dec 4 2017, 4:41 AM
/ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
18

Shouldn't have been in this commit

/ps/trunk/binaries/data/mods/public/simulation/templates/special/filter/undeletable.xml
6

eol-style native

elexis added a comment.Dec 4 2017, 4:46 AM

Also someone might want to make the regicide hero undeletable. If players want to resign, they can click on the button (we have defeat reasons in alpha 23 in the chat too). So it would help clarifying the defeat reason and prevent unintentional deletes. If you want.

temple added a comment.EditedDec 4 2017, 5:02 AM

Also someone might want to make the regicide hero undeletable. If players want to resign, they can click on the button (we have defeat reasons in alpha 23 in the chat too). So it would help clarifying the defeat reason and prevent unintentional deletes. If you want.

Probably a good idea, could prevent some accidents.

(D1019 would've fixed the defeat reason when the hero's the last (conquest critical) unit to die.)