Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions devel/export-dt-ini.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions devel/make-dt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion dwarf-op.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions fix/noexert-exhaustion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions immortal-cravings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion starvingdead.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down