Skip to content

Commit

Permalink
construction: add dig pit variant for t_grave_new (#57998)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei8l authored May 30, 2022
1 parent edadd10 commit 3dbb7e9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -4752,6 +4752,24 @@
"activity_level": "EXTRA_EXERCISE",
"do_turn_special": "do_turn_exhume"
},
{
"type": "construction",
"id": "constr_exhume_new",
"skill": "survival",
"group": "dig_a_shallow_pit",
"category": "CONSTRUCT",
"difficulty": 0,
"time": "17m",
"on_display": true,
"qualities": [ { "id": "DIG", "level": 2 } ],
"pre_terrain": "t_grave_new",
"post_terrain": "t_pit_shallow",
"byproducts": [ { "group": "digging_soil_loam_50L", "count": 5 } ],
"post_special": "done_dig_grave_nospawn",
"post_flags": [ "keep_items" ],
"activity_level": "EXTRA_EXERCISE",
"do_turn_special": "do_turn_exhume"
},
{
"type": "construction",
"id": "constr_arcfurnace",
Expand Down
8 changes: 8 additions & 0 deletions src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void done_wiring( const tripoint &, Character & );
void done_deconstruct( const tripoint &, Character & );
void done_digormine_stair( const tripoint &, bool, Character & );
void done_dig_grave( const tripoint &p, Character & );
void done_dig_grave_nospawn( const tripoint &p, Character & );
void done_dig_stair( const tripoint &, Character & );
void done_mine_downstair( const tripoint &, Character & );
void done_mine_upstair( const tripoint &, Character & );
Expand Down Expand Up @@ -1655,6 +1656,12 @@ void construct::done_dig_grave( const tripoint &p, Character &who )
get_event_bus().send<event_type::exhumes_grave>( who.getID() );
}

void construct::done_dig_grave_nospawn( const tripoint &p, Character &who )
{
get_map().furn_set( p, f_coffin_c );
get_event_bus().send<event_type::exhumes_grave>( who.getID() );
}

void construct::done_dig_stair( const tripoint &p, Character &who )
{
done_digormine_stair( p, true, who );
Expand Down Expand Up @@ -1950,6 +1957,7 @@ void load_construction( const JsonObject &jo )
{ "done_wiring", construct::done_wiring },
{ "done_deconstruct", construct::done_deconstruct },
{ "done_dig_grave", construct::done_dig_grave },
{ "done_dig_grave_nospawn", construct::done_dig_grave_nospawn },
{ "done_dig_stair", construct::done_dig_stair },
{ "done_mine_downstair", construct::done_mine_downstair },
{ "done_mine_upstair", construct::done_mine_upstair },
Expand Down

0 comments on commit 3dbb7e9

Please sign in to comment.