diff --git a/changelog.txt b/changelog.txt index ba51e4f81..a937e2fb2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -18,6 +18,7 @@ Template for new versions: ## Fixes - `gui/gm-unit`: remove reference to ``think_counter``, removed in v51.12 +- fixed references to removed ``unit.curse`` compound ## Misc Improvements diff --git a/devel/export-dt-ini.lua b/devel/export-dt-ini.lua index ad4d5bfbd..84e1da5cf 100644 --- a/devel/export-dt-ini.lua +++ b/devel/export-dt-ini.lua @@ -318,9 +318,9 @@ address('physical_attrs',df.unit,'body','physical_attrs') address('body_size',df.unit,'appearance','body_modifiers') address('size_info',df.unit,'body','size_info','size_cur') address('size_base',df.unit,'body','size_info','size_base') -address('curse',df.unit,'curse','name') -address('curse_add_flags1',df.unit,'curse','add_tags1') -address('turn_count',df.unit,'curse','interaction','time_on_site') +address('curse',df.unit,'uwss_display_name_string') +address('curse_add_flags1',df.unit,'uwss_add_caste_flag') +address('turn_count',df.unit,'usable_interaction','time_on_site') address('souls',df.unit,'status','souls') address('states',df.unit,'status','misc_traits') address('labors',df.unit,'status','labors') diff --git a/devel/make-dt.pl b/devel/make-dt.pl index 4bffeb0d5..9d8ba2c43 100755 --- a/devel/make-dt.pl +++ b/devel/make-dt.pl @@ -325,9 +325,9 @@ ($$$$) emit_addr 'physical_attrs',%all,'unit','body.physical_attrs'; emit_addr 'body_size',%all,'unit','appearance.body_modifiers'; emit_addr 'size_info',%all,'unit','body.size_info'; - emit_addr 'curse',%all,'unit','curse.name'; - emit_addr 'curse_add_flags1',%all,'unit','curse.add_tags1'; - emit_addr 'turn_count',%all,'unit','curse.time_on_site'; + emit_addr 'curse',%all,'unit','uwss_display_name_sing'; + emit_addr 'curse_add_flags1',%all,'unit','uwss_add_caste_flag'; + emit_addr 'turn_count',%all,'unit','usable_interaction.time_on_site'; emit_addr 'souls',%all,'unit','status.souls'; emit_addr 'states',%all,'unit','status.misc_traits'; emit_addr 'labors',%all,'unit','status.labors'; diff --git a/dwarf-op.lua b/dwarf-op.lua index 3581e3004..45b723326 100644 --- a/dwarf-op.lua +++ b/dwarf-op.lua @@ -733,7 +733,7 @@ local seasons = { 'winter', } function GetWave(dwf) - arrival_time = current_tick - dwf.curse.interaction.time_on_site; + arrival_time = current_tick - dwf.useable_interaction.time_on_site; --print(string.format("Current year %s, arrival_time = %s, ticks_per_year = %s", df.global.cur_year, arrival_time, ticks_per_year)) arrival_year = df.global.cur_year + (arrival_time // ticks_per_year); arrival_season = 1 + (arrival_time % ticks_per_year) // ticks_per_season; diff --git a/fix/noexert-exhaustion.lua b/fix/noexert-exhaustion.lua index 44ea9d506..eabfd965e 100644 --- a/fix/noexert-exhaustion.lua +++ b/fix/noexert-exhaustion.lua @@ -5,10 +5,10 @@ --Running this script on repeat approximately at least every 350 ticks should prevent NOEXERT units from becoming Tired as a result of Individual Combat Drill. function isNoExert(u) - if(u.curse.rem_tags1.NOEXERT) then --tag removal overrides tag addition, so if the NOEXERT tag is removed the unit cannot be NOEXERT. + if(u.uwss_remove_caste_flag.NOEXERT) then --tag removal overrides tag addition, so if the NOEXERT tag is removed the unit cannot be NOEXERT. return false end - if(u.curse.add_tags1.NOEXERT) then--if the tag hasn't been removed, and the unit has a curse that adds it, they must be NOEXERT. + if(u.uwss_add_caste_flag.NOEXERT) then--if the tag hasn't been removed, and the unit has a curse that adds it, they must be NOEXERT. return true end if(dfhack.units.casteFlagSet(u.race,u.caste, df.caste_raw_flags.NOEXERT)) then --if the tag hasn't been added or removed, but their race and caste has the tag, they're NOEXERT. diff --git a/immortal-cravings.lua b/immortal-cravings.lua index 2b76ee464..2162045fd 100644 --- a/immortal-cravings.lua +++ b/immortal-cravings.lua @@ -172,8 +172,8 @@ local function unit_loop() end local function is_active_caste_flag(unit, flag_name) - return not unit.curse.rem_tags1[flag_name] and - (unit.curse.add_tags1[flag_name] or dfhack.units.casteFlagSet(unit.race, unit.caste, df.caste_raw_flags[flag_name])) + return not unit.uwss_remove_caste_flag[flag_name] and + (unit.uwss_add_caste_flag[flag_name] or dfhack.units.casteFlagSet(unit.race, unit.caste, df.caste_raw_flags[flag_name])) end ---main loop: look for citizens with personality needs for food/drink but w/o physiological need diff --git a/starvingdead.lua b/starvingdead.lua index 5518676ad..b61db20de 100644 --- a/starvingdead.lua +++ b/starvingdead.lua @@ -43,7 +43,7 @@ local function do_decay() attribute.value = math.floor(attribute.value - (attribute.value * attribute_decay)) end - if unit.curse.interaction.time_on_site > (state.death_threshold * TICKS_PER_MONTH) then + if unit.usable_interaction.time_on_site > (state.death_threshold * TICKS_PER_MONTH) then unit.animal.vanish_countdown = 1 end end