MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getRelationTo

Method getRelationTo

game/state/shared/organisation.cpp:758–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758float 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
779void Organisation::adjustRelationTo(GameState &state, StateRef<Organisation> other, float value)
780{

Callers 13

isRelatedToMethod · 0.95
isPositiveToMethod · 0.95
isNegativeToMethod · 0.95
costOfBribeByMethod · 0.95
diplomaticRiftOfferMethod · 0.95
bribedByMethod · 0.95
signTreatyWithMethod · 0.95
updateEndOfDayMethod · 0.80
executeMethod · 0.80
exitBattleMethod · 0.80
loadBattleBuildingFunction · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected