Skip to content

Commit

Permalink
Move constant only used once into item.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Feb 29, 2020
1 parent 4b7dc0c commit c2ac85b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/game_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#ifndef GAME_CONSTANTS_H
#define GAME_CONSTANTS_H

#include "calendar.h"
#include "units.h"

// Fixed window sizes.
Expand Down Expand Up @@ -102,9 +101,6 @@ constexpr int freezer = 23; // -5 Celsius
constexpr int freezing = 32; // 0 Celsius
} // namespace temperatures

// Shelf life of corpse. This should be kept same as raw flesh.
constexpr time_duration CORPSE_ROT_TIME = 24_hours;

// Weight per level of LIFT/JACK tool quality.
#define TOOL_LIFT_FACTOR 500_kilogram // 500kg/level

Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4764,7 +4764,7 @@ time_duration item::get_shelf_life() const
if( is_food() ) {
return get_comestible()->spoils;
} else if( is_corpse() ) {
return CORPSE_ROT_TIME;
return 24_hours;
}
}
return 0_turns;
Expand Down

0 comments on commit c2ac85b

Please sign in to comment.