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

Mark some specific furnitures/terrains examine as always allowed in faction territory #78631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/json/furniture_and_terrain/furniture-alien.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"move_cost_mod": 1,
"coverage": 35,
"required_str": -1,
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN", "FREE_TO_EXAMINE" ],
"deconstruct": { "items": [ { "item": "sheet_metal_small", "count": 2 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
"bash": {
"str_min": 6,
Expand Down
2 changes: 1 addition & 1 deletion data/json/furniture_and_terrain/furniture-signs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"move_cost_mod": 1,
"coverage": 35,
"required_str": -1,
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN", "SIGN_ALWAYS" ],
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN", "SIGN_ALWAYS", "FREE_TO_EXAMINE" ],
"deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
"bash": {
"str_min": 6,
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Magiclysm/furniture.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "A gate for translocation. Cast the translocation spell or use a translocator to choose this gate as a destination.",
"color": "light_gray",
"required_str": 25,
"flags": [ "TRANSLOCATOR", "MOUNTABLE", "ALLOW_FIELD_EFFECT" ],
"flags": [ "TRANSLOCATOR", "MOUNTABLE", "ALLOW_FIELD_EFFECT", "FREE_TO_EXAMINE" ],
"examine_action": "translocator"
},
{
Expand Down
1 change: 1 addition & 0 deletions doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ List of known flags, used in both `furniture` and `terrain`. Some work for both
- ```FLAT``` Player can build and move furniture on.
- ```FORAGE_HALLU``` This item can be found with the `HIDDEN_HALLU` flag when found through foraging.
- ```FORAGE_POISION``` This item can be found with the `HIDDEN_POISON` flag when found through foraging.
- ```FREE_TO_EXAMINE``` Examining this furniture/terrain won't upset the local faction (if any).
- ```FRESH_WATER``` Source of fresh water. Will spawn fresh water (once) on terrains with `SPAWN_WITH_LIQUID` flag.
- ```GOES_DOWN``` Can use <kbd>></kbd> to go down a level.
- ```GOES_UP``` Can use <kbd><</kbd> to go up a level.
Expand Down
6 changes: 4 additions & 2 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6131,14 +6131,16 @@ void game::examine( const tripoint_bub_ms &examp, bool with_pickup )

if( m.has_furn( examp ) ) {
if( !u.cant_do_mounted() ) {
if( !warn_player_maybe_anger_local_faction( false, true ) ) {
if( !m.has_flag( "FREE_TO_EXAMINE", examp ) &&
!warn_player_maybe_anger_local_faction( false, true ) ) {
return; // player declined to mess with faction's stuff
}
xfurn_t.examine( u, examp );
}
} else {
if( xter_t.can_examine( examp ) && !u.is_mounted() ) {
if( !warn_player_maybe_anger_local_faction( false, true ) ) {
if( !m.has_flag( "FREE_TO_EXAMINE", examp ) &&
!warn_player_maybe_anger_local_faction( false, true ) ) {
return; // player declined to mess with faction's stuff
}
xter_t.examine( u, examp );
Expand Down
Loading