Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: remove faction camps #4369

Merged
merged 70 commits into from
Mar 27, 2024

Conversation

Dread-Pirate-Hogarth
Copy link
Contributor

Purpose of change

#3866

Describe the solution

delete

didn't try to preserve savegames. discussion said we didn't need to, so I didn't. don't think you could find anyone that'd do that stupid amount of work.

should build but haven't done so yet

Describe alternatives you've considered

Testing

Additional context

Checklist

@scarf005 scarf005 self-requested a review March 21, 2024 16:27
@scarf005 scarf005 requested a review from Lamandus March 22, 2024 03:35
@scarf005 scarf005 requested a review from Coolthulhu March 22, 2024 07:01
@scarf005
Copy link
Member

one major save-breaking issue: npcs sent scavenging from faction camp before the faction camp removal will be lost. @Dread-Pirate-Hogarth maybe should we take care of this.

@Dread-Pirate-Hogarth
Copy link
Contributor Author

they should load now. will be placed wherever they were when sent on mission

will still have junk data for npc_companion_mission but this is not a big issue. data will not impact performance and can be removed later or kept for use in new systems

@scarf005
Copy link
Member

image

they do return correctly now.

scarf005
scarf005 previously approved these changes Mar 24, 2024
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it errors with invalid zone type on load but can be easily resolved by removing said zone. overall LGTM but would like to wait for @Coolthulhu's opinion.

@Lamandus
Copy link
Contributor

it errors with invalid zone type on load but can be easily resolved by removing said zone. overall LGTM but would like to wait for @Coolthulhu's opinion.

But only one error, or all the time?

@scarf005
Copy link
Member

scarf005 commented Mar 25, 2024

it'll keep error on load until all existing camp related zones are removed.

image

image

strangely, only CAMP_FOOD will error; basecamp: storage won't.

@Lamandus
Copy link
Contributor

Then loot-zones.json has to be changed, too

Copy link
Contributor

@Lamandus Lamandus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to the loot zones have to be made. Not only in the json, I suppose in the source code, too.

@Lamandus
Copy link
Contributor

it'll keep error on load until all existing camp related zones are removed.

image

image

strangely, only CAMP_FOOD will error; basecamp: storage won't.

I suppose it is because storage is "just food storage". While camp food is linked to a function.

@Dread-Pirate-Hogarth
Copy link
Contributor Author

ill take a look

@Dread-Pirate-Hogarth
Copy link
Contributor Author

simple preexisting error in implementation of iterator. if zone exists in loaded world, should error once and properly erase invalid zone now.

@Lamandus
Copy link
Contributor

simple preexisting error in implementation of iterator. if zone exists in loaded world, should error once and properly erase invalid zone now.

gonna take a look now, I am compiling it, will take a few minutes for testing.

@Dread-Pirate-Hogarth
Copy link
Contributor Author

i pushed another fix right after you posted. make sure you check that one

@Lamandus
Copy link
Contributor

i pushed another fix right after you posted. make sure you check that one

I did, looks fine to me now, no errors. If the tests go through, you have my blessing.

@Lamandus Lamandus merged commit 0e06d77 into cataclysmbnteam:main Mar 27, 2024
13 checks passed
@scarf005
Copy link
Member

scarf005 commented Mar 27, 2024

image

this causes segmentation fault on loading old save.

VERSION: HEAD-HASH
TYPE: Signal
MESSAGE: SIGSEGV: Segmentation fault
STACK TRACE:

    0x652,131,deb,cb2    …/src/debug.cpp:899    bt_full(backtrace_state*, int, std::function<int (unsigned long, char const*, int, char const*)> const&, std::function<void (char const*, int)> const&)
    0x652,131,deb,cb2    …/src/debug.cpp:1,164    debug_write_backtrace(std::ostream&)
    0x652,131,dc3,58a    …/src/crash.cpp:79    log_crash(char const*, char const*)
    0x652,131,dc3,1da    …/src/crash.cpp:122    signal_handler(int)
    0x758,77e,642,98f    ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0    [unknown func]
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:295    std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)0>::_M_release()
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1,071    std::__shared_count<(__gnu_cxx::_Lock_policy)0>::~__shared_count()
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1,524    std::__shared_ptr<zone_options, (__gnu_cxx::_Lock_policy)0>::~__shared_ptr()
    0x652,131,cb2,8f2    …/src/clzones.h:230    zone_data::~zone_data()
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/new_allocator.h:194    void std::__new_allocator<zone_data>::destroy<zone_data>(zone_data*)
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:557    void std::allocator_traits<std::allocator<zone_data> >::destroy<zone_data>(std::allocator<zone_data>&, zone_data*)
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/vector.tcc:187    std::vector<zone_data, std::allocator<zone_data> >::_M_erase(__gnu_cxx::__normal_iterator<zone_data*, std::vector<zone_data, std::allocator<zone_data> > >)
    0x652,131,cb2,8f2    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:1,532    std::vector<zone_data, std::allocator<zone_data> >::erase(__gnu_cxx::__normal_iterator<zone_data const*, std::vector<zone_data, std::allocator<zone_data> > >)
    0x652,131,cb2,8f2    …/src/clzones.cpp:1,119    zone_manager::deserialize(JsonIn&)
    0x652,131,cb4,f75    …/src/clzones.cpp:1,201    zone_manager::load_zones()::$_0::operator()(std::istream&) const
    0x652,131,cb4,f75    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61    void std::__invoke_impl<void, zone_manager::load_zones()::$_0&, std::istream&>(std::__invoke_other, zone_manager::load_zones()::$_0&, std::istream&)
    0x652,131,cb4,f75    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:111    std::enable_if<is_invocable_r_v<void, zone_manager::load_zones()::$_0&, std::istream&>, void>::type std::__invoke_r<void, zone_manager::load_zones()::$_0&, std::istream&>(zone_manager::load_zones()::$_0&, std::istream&)
    0x652,131,cb4,f75    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290    std::_Function_handler<void (std::istream&), zone_manager::load_zones()::$_0>::_M_invoke(std::_Any_data const&, std::istream&)
    0x652,131,3d8,d79    /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591    std::function<void (std::istream&)>::operator()(std::istream&) const
    0x652,131,3d8,d79    …/src/cata_utility.cpp:533    read_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (std::istream&)> const&)
    0x652,131,cb3,930    …/src/clzones.cpp:1,199    zone_manager::load_zones()
    0x652,131,f88,97c    …/src/game.cpp:2,577    game::load(save_t const&)
    0x652,132,3d3,02c    …/src/main_menu.cpp:1,024    main_menu::load_character_tab(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    0x652,132,3d1,89a    …/src/main_menu.cpp:811    main_menu::opening_screen()
    0x652,132,d05,519    …/src/main.cpp:779    main
    0x758,77e,628,14f    ../sysdeps/nptl/libc_start_call_main.h:58    __libc_start_call_main
    0x758,77e,628,208    ../csu/libc-start.c:360    __libc_start_main_impl
    0x652,131,18a,054    [unknown src]:0    [unknown func]
    0xf,fff,fff,fff,fff,fff    [unknown src]:0    [unknown func]
fish: Job 1, './build/src/cataclysm-tiles' terminated by signal SIGABRT (Abort)

Superior.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PRs releated to docs page JSON related to game datas in JSON format. mods PR changes related to mods. src changes related to source code. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants