Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3590 closed enhancement (fixed)

[PATCH] Undeletable entities

Reported by: leper Owned by: leper
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

For some maps having undeletable (and indestructible (which can be done by having a trigger using cmpArmour.SetInvulnerability() already) entities can enable some nice gameplay features.

Examples would be trade posts on the Silk Road map niektb is working on, or mercenary camps.

Below patch takes care of this, selecting entities and pressing del still opens up the delete dialog, but no deletion takes place.

Attachments (2)

undeletable.diff (5.4 KB ) - added by leper 8 years ago.
t3590_fix_tests_v1.patch (1.1 KB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (6)

by leper, 8 years ago

Attachment: undeletable.diff added

comment:1 by mimo, 8 years ago

Any reason for not doing as for mirages when pressing the del key, i.e. returning a tooltip explaining why you can't delete it and a different icon in the getinfo function, and adding a return in the execute function ? Apart from that, looks fine.

comment:2 by leper, 8 years ago

Resolution: fixed
Status: newclosed

In 17408:

Add support for undeletable entities. Fixes #3590.

comment:3 by leper, 8 years ago

Keywords: review removed

by elexis, 8 years ago

Attachment: t3590_fix_tests_v1.patch added

comment:4 by leper, 8 years ago

In 17416:

Fix test failure. Refs #3590.

Note: See TracTickets for help on using tickets.