Files
Cataclysm-DDA/tests/start_location_test.cpp
Fris0uman 958b75f89b Offset spawn (#87342)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tektolnes <43859252+Tektolnes@users.noreply.github.com>
Co-authored-by: Fris0uman <fris0uman@users.noreply.github.com>
Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
2026-06-13 17:20:58 +02:00

27 lines
770 B
C++

#include <string>
#include <utility>
#include "cata_catch.h"
#include "coordinates.h"
#include "point.h"
#include "scenario.h"
#include "start_location.h"
#include "type_id.h"
static const start_location_id start_location_sloc_ocean_shore( "sloc_ocean_shore" );
static const string_id<scenario> scenario_beach_day( "beach_day" );
TEST_CASE( "Test_origin_offset" )
{
const point_rel_om &offset = scenario_beach_day.obj().get_origin_offset();
const start_location &beach = start_location_sloc_ocean_shore.obj();
const point_abs_om origin = point_abs_om::zero + offset;
tripoint_abs_omt omtstart = tripoint_abs_omt::invalid;
auto ret = beach.find_player_initial_location( origin );
omtstart = ret.first;
CHECK( !omtstart.is_invalid() );
}