Skip to content

Commit

Permalink
devel/dump-offsets: use new df.global._fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Aug 14, 2023
1 parent 01a8d46 commit b291421
Showing 1 changed file with 4 additions and 149 deletions.
153 changes: 4 additions & 149 deletions devel/dump-offsets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,155 +21,10 @@ addresses in-game. Passing "all" does this for all globals.
]====]

GLOBALS = {
version = "version",
min_load_version = "min_load_version",
movie_version = "movie_version",
basic_seed = "basic_seed",
enabler = "enabler",
cursor = "cursor",
point = "selection_rect",
gamemode = "gamemode",
gametype = "gametype",
menuposition = "ui_menu_width",
itemmade = "created_item_type",
itemmade_subtype = "created_item_subtype",
itemmade_subcat1 = "created_item_mattype",
itemmade_subcat2 = "created_item_matindex",
itemmade_number = "created_item_count",
mainview = "map_renderer",
d_init = "d_init",
title = "title",
title2 = "title_spaced",
event_flow = "flows",
gps = "gps",
gview = "gview",
init = "init",
texture = "texture",
plot_event = "timed_events",
plotinfo = "plotinfo",
adventure = "adventure",
buildreq = "buildreq",
buildjob_type = "ui_building_assign_type",
buildjob_selected = "ui_building_assign_is_marked",
buildjob_unit = "ui_building_assign_units",
buildjob_item = "ui_building_assign_items",
looklist = "ui_look_list",
game = "game",
world = "world",
year = "cur_year",
season_count = "cur_year_tick",
precise_phase = "cur_year_tick_advmode",
season_timer = "cur_season_tick",
season = "cur_season",
cur_weather = "current_weather",
assignbuildingjobs = "process_jobs",
assigndesjobs = "process_dig",
paused = "pause_state",
modeunit = "ui_selected_unit",
modeview = "ui_unit_view_mode",
modepage = "ui_look_cursor",
modeitem = "ui_building_item_cursor",
addingtask = "ui_workshop_in_add",
modejob = "ui_workshop_job_cursor",
buildjob_assignroom = "ui_building_in_assign",
buildjob_sizeroom = "ui_building_in_resize",
addingtask_sub = "ui_lever_target_type",
buildjob_sizerad = "ui_building_resize_radius",
scrollx = "window_x",
scrolly = "window_y",
scrollz = "window_z",
DEBUG_CONTINUOUS = "debug_nopause",
DEBUG_NOMOOD = "debug_nomoods",
DEBUG_SAFEDWARVES = "debug_combat",
DEBUG_NOANIMALS = "debug_wildlife",
DEBUG_NOTHIRST = "debug_nodrink",
DEBUG_NOHUNGER = "debug_noeat",
DEBUG_NOSLEEP = "debug_nosleep",
DEBUG_VISIBLEAMBUSHERS = "debug_showambush",
DEBUG_QUICKMODE_MINING = "debug_fastmining",
DEBUG_NEVERBERSERK = "debug_noberserk",
DEBUG_MEGAFAST = "debug_turbospeed",
gamemode_cansave = "save_on_exit",
standingorder_butcher = "standing_orders_auto_butcher",
standingorder_collect_web = "standing_orders_auto_collect_webs",
standingorder_fishery = "standing_orders_auto_fishery",
standingorder_kiln = "standing_orders_auto_kiln",
standingorder_kitchen = "standing_orders_auto_kitchen",
standingorder_loom = "standing_orders_auto_loom",
standingorder_other = "standing_orders_auto_other",
standingorder_slaughter = "standing_orders_auto_slaughter",
standingorder_smelter = "standing_orders_auto_smelter",
standingorder_tan = "standing_orders_auto_tan",
standingorder_gatherrefuse_chasm_bones = "standing_orders_dump_bones",
standingorder_gatherrefuse_chasm_corpses = "standing_orders_dump_corpses",
standingorder_gatherrefuse_chasm_strand_tissue = "standing_orders_dump_hair",
standingorder_gatherrefuse_chasm_othernonmetal = "standing_orders_dump_other",
standingorder_gatherrefuse_chasm_shell = "standing_orders_dump_shells",
standingorder_gatherrefuse_chasm_skins = "standing_orders_dump_skins",
standingorder_gatherrefuse_chasm_skulls = "standing_orders_dump_skulls",
standingorder_allharvest = "standing_orders_farmer_harvest",
standingorder_autoforbid_other_items = "standing_orders_forbid_other_dead_items",
standingorder_autoforbid_other_corpse = "standing_orders_forbid_other_nohunt",
standingorder_autoforbid_your_corpse = "standing_orders_forbid_own_dead",
standingorder_autoforbid_your_items = "standing_orders_forbid_own_dead_items",
standingorder_autoforbid_projectile = "standing_orders_forbid_used_ammo",
standingorder_gatheranimals = "standing_orders_gather_animals",
standingorder_gatherbodies = "standing_orders_gather_bodies",
standingorder_gatherfood = "standing_orders_gather_food",
standingorder_gatherfurniture = "standing_orders_gather_furniture",
standingorder_gatherstone = "standing_orders_gather_minerals",
standingorder_gatherrefuse = "standing_orders_gather_refuse",
standingorder_gatherrefuse_outside = "standing_orders_gather_refuse_outside",
standingorder_gatherrefuse_outside_vermin = "standing_orders_gather_vermin_remains",
standingorder_gatherwood = "standing_orders_gather_wood",
option_exceptions = "standing_orders_job_cancel_announce",
standingorder_mixfoods = "standing_orders_mix_food",
standingorder_dyed_clothes = "standing_orders_use_dyed_cloth",
standingorder_zone_drinking = "standing_orders_zoneonly_drink",
standingorder_zone_fishing = "standing_orders_zoneonly_fish",
next_activity_global_id = "activity_next_id",
next_agreement_global_id = "agreement_next_id",
next_army_controller_global_id = "army_controller_next_id",
next_army_global_id = "army_next_id",
next_army_tracking_info_global_id = "army_tracking_info_next_id",
next_art_imagechunk_global_id = "art_image_chunk_next_id",
next_artifact_global_id = "artifact_next_id",
next_belief_system_global_id = "belief_system_next_id",
next_building_global_id = "building_next_id",
next_crime_global_id = "crime_next_id",
next_cultural_identity_global_id = "cultural_identity_next_id",
next_dance_form_global_id = "dance_form_next_id",
next_civ_global_id = "entity_next_id",
next_flow_guide_global_id = "flow_guide_next_id",
next_formation_global_id = "formation_next_id",
next_histeventcol_global_id = "hist_event_collection_next_id",
next_histevent_global_id = "hist_event_next_id",
next_histfig_global_id = "hist_figure_next_id",
next_identity_global_id = "identity_next_id",
next_incident_global_id = "incident_next_id",
next_interaction_instance_global_id = "interaction_instance_next_id",
next_item_global_id = "item_next_id",
next_job_global_id = "job_next_id",
next_machine_global_id = "machine_next_id",
next_musical_form_global_id = "musical_form_next_id",
next_nem_global_id = "nemesis_next_id",
next_occupation_global_id = "occupation_next_id",
next_poetic_form_global_id = "poetic_form_next_id",
next_proj_global_id = "proj_next_id",
next_rhythm_global_id = "rhythm_next_id",
next_scale_global_id = "scale_next_id",
next_schedule_global_id = "schedule_next_id",
next_soul_global_id = "soul_next_id",
next_squad_global_id = "squad_next_id",
next_task_global_id = "task_next_id",
next_unitchunk_global_id = "unit_chunk_next_id",
next_unit_global_id = "unit_next_id",
next_vehicle_global_id = "vehicle_next_id",
next_written_content_global_id = "written_content_next_id",
next_divination_set_global_id = "divination_set_next_id",
next_image_set_global_id = "image_set_next_id",
}
GLOBALS = {}
for k, v in pairs(df.global._fields) do
GLOBALS[v.original_name] = k
end

function read_cstr(addr)
local s = ''
Expand Down

0 comments on commit b291421

Please sign in to comment.