Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2076 closed enhancement (fixed)

[PATCH] Let entities change the entitylimits

Reported by: sanderd17 Owned by: sanderd17
Priority: If Time Permits Milestone: Alpha 15
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by sanderd17)

In some cases, it's nice if entities can change the entity limits. I'm thinking of building a fortress before you may create another 5 battering rams, or something similar.

It was also discussed in the past that this could be a nice approach for celtic war dogs (it's strange in a way that the number of dogs gets limited by a population limit, while it's not a human population).

So I implemented a class that can change the entity limits of a player, and also implemented the example to have maximum 10 dogs per kennel.

Attachments (1)

entityLimits.diff (13.3 KB ) - added by sanderd17 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by sanderd17, 11 years ago

Description: modified (diff)

Updated the patch so now it supports changing multiple entity limits (e.g. a CC can change the tower and fortress limit).

comment:2 by sanderd17, 11 years ago

As the limit changer can be used as more general replacement than the old way to do a limit per CC. And as that limit per CC was never used anyway, I just removed that part of the code.

by sanderd17, 11 years ago

Attachment: entityLimits.diff added

comment:3 by sanderd17, 11 years ago

Also added an entity limit to the pillar of ashoka, so building is only allowed when ashoka is alive, but ashoka himself can't build any buildings (which looks strange anyway).

comment:4 by sanderd17, 11 years ago

Resolution: fixed
Status: newclosed

In 13850:

let entities change entity limits. Fixes #2076

comment:5 by sanderd17, 11 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.