From 7aecffe0cd0681629f7ab9585f545dbbfa13c9ea Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 4 Apr 2014 22:34:39 +0400 Subject: [PATCH] Update structures and fix broken things. --- library/modules/Items.cpp | 2 +- library/xml | 2 +- plugins/autoSyndrome.cpp | 8 ++++---- plugins/autolabor.cpp | 4 ++-- plugins/devel/autolabor2.cpp | 4 ++-- plugins/strangemood.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/library/modules/Items.cpp b/library/modules/Items.cpp index ec01b3f61..6673e6f1b 100644 --- a/library/modules/Items.cpp +++ b/library/modules/Items.cpp @@ -705,7 +705,7 @@ static void resetUnitInvFlags(df::unit *unit, df::unit_inventory_item *inv_item) } else if (inv_item->mode == df::unit_inventory_item::StuckIn) { - unit->flags3.bits.unk2 = false; + unit->flags3.bits.stuck_weapon_computed = false; } } diff --git a/library/xml b/library/xml index a845f9c3d..ca15aeedf 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit a845f9c3da4835553cd756a3ecba70399d55dab5 +Subproject commit ca15aeedffdd48da752ba29bf4d1a8effbcffd75 diff --git a/plugins/autoSyndrome.cpp b/plugins/autoSyndrome.cpp index 0f388790a..6f91c8ca8 100644 --- a/plugins/autoSyndrome.cpp +++ b/plugins/autoSyndrome.cpp @@ -472,15 +472,15 @@ int32_t giveSyndrome(color_ostream& out, int32_t workerId, df::syndrome* syndrom unitSyndrome->year = DFHack::World::ReadCurrentYear(); unitSyndrome->year_time = DFHack::World::ReadCurrentTick(); unitSyndrome->ticks = 0; - unitSyndrome->unk1 = 0; + unitSyndrome->wound_id = -1; unitSyndrome->flags = 0; //TODO: typecast? for ( size_t a = 0; a < syndrome->ce.size(); a++ ) { df::unit_syndrome::T_symptoms* symptom = new df::unit_syndrome::T_symptoms(); - symptom->unk1 = 0; - symptom->unk2 = 0; + symptom->quantity = 0; + symptom->delay = 0; symptom->ticks = 0; - symptom->flags = 2; //TODO: ??? + symptom->flags.bits.active = true; //TODO: ??? unitSyndrome->symptoms.push_back(symptom); } unit->syndromes.active.push_back(unitSyndrome); diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 73e83bb8a..5b963c38a 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -1051,8 +1051,8 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { df::activity_info *act = ui->activities[i]; if (!act) continue; - bool p1 = act->person1 == dwarfs[dwarf]; - bool p2 = act->person2 == dwarfs[dwarf]; + bool p1 = act->unit_actor == dwarfs[dwarf]; + bool p2 = act->unit_noble == dwarfs[dwarf]; if (p1 || p2) { diff --git a/plugins/devel/autolabor2.cpp b/plugins/devel/autolabor2.cpp index ee5d9af0d..c328989a7 100644 --- a/plugins/devel/autolabor2.cpp +++ b/plugins/devel/autolabor2.cpp @@ -1808,8 +1808,8 @@ private: { df::activity_info *act = ui->activities[i]; if (!act) continue; - bool p1 = act->person1 == dwarf->dwarf; - bool p2 = act->person2 == dwarf->dwarf; + bool p1 = act->unit_actor == dwarf->dwarf; + bool p2 = act->unit_noble == dwarf->dwarf; if (p1 || p2) { diff --git a/plugins/strangemood.cpp b/plugins/strangemood.cpp index 9c9a86075..35d1e15b8 100644 --- a/plugins/strangemood.cpp +++ b/plugins/strangemood.cpp @@ -1278,7 +1278,7 @@ command_result df_strangemood (color_ostream &out, vector & parameters) unit->path.dest.x = -30000; unit->path.dest.y = -30000; unit->path.dest.z = -30000; - unit->path.unk_ae = -1; + unit->path.goal = unit_path_goal::None; unit->path.path.x.clear(); unit->path.path.y.clear(); unit->path.path.z.clear();