allowed items to set status flags on units
This commit is contained in:
parent
b64ce25d05
commit
e944987ff8
1 changed files with 11 additions and 0 deletions
11
src/unit.cpp
11
src/unit.cpp
|
@ -782,6 +782,17 @@ void unit::add_modification(const std::string& type,
|
|||
description << string_table["loyal_description"];
|
||||
if(upkeep_ > UPKEEP_LOYAL)
|
||||
upkeep_ = UPKEEP_LOYAL;
|
||||
} else if(apply_to == "status") {
|
||||
const std::string& add = (**i.first)["add"];
|
||||
const std::string& remove = (**i.first)["remove"];
|
||||
|
||||
if(add.empty() == false) {
|
||||
set_flag(add);
|
||||
}
|
||||
|
||||
if(remove.empty() == false) {
|
||||
remove_flag(remove);
|
||||
}
|
||||
}
|
||||
|
||||
const std::string desc = description.str();
|
||||
|
|
Loading…
Add table
Reference in a new issue