rust/hwphysics/src/common.rs
author Wuzzy <Wuzzy2@mail.ru>
Mon, 08 Jul 2019 21:44:26 +0200
changeset 15220 ceb289e8a582
parent 15120 febccab419b1
child 15263 24828281c9c5
permissions -rw-r--r--
King Mode: Fix king placement phase not working correctly with multiple teams in a clan New king placement phase rules: * Before the game begins, each team can walk with their king and teleport for free, everything else is disabled * This special round does not count towards the round counter, like in gfPlaceHog * TotalRounds is set to -1 during this round, like in gfPlaceHog Under the old rules, this was much more hacky. The delay of all delay-less weapons was just set to 1 The problem with the old rules was that if any clan had more than 1 team, eventually the weapon delay will time out before all kings have been placed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15120
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     1
pub type GearId = u16;
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     2
pub trait GearData {}
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     3
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     4
pub trait GearDataProcessor<T: GearData> {
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     5
    fn add(&mut self, gear_id: GearId, gear_data: T);
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     6
}
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     7
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     8
pub trait GearDataAggregator<T: GearData> {
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
     9
    fn find_processor(&mut self) -> &mut GearDataProcessor<T>;
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 14179
diff changeset
    10
}