| 756 | } |
| 757 | |
| 758 | float Organisation::getRelationTo(const StateRef<Organisation> &other) const |
| 759 | { |
| 760 | if (other == this) |
| 761 | { |
| 762 | // Assume maximum relations |
| 763 | return 100.0f; |
| 764 | } |
| 765 | float x; |
| 766 | |
| 767 | auto it = this->current_relations.find(other); |
| 768 | if (it == this->current_relations.end()) |
| 769 | { |
| 770 | x = 0; |
| 771 | } |
| 772 | else |
| 773 | { |
| 774 | x = it->second; |
| 775 | } |
| 776 | return x; |
| 777 | } |
| 778 | |
| 779 | void Organisation::adjustRelationTo(GameState &state, StateRef<Organisation> other, float value) |
| 780 | { |
no test coverage detected