From daa7960522b09bf06b241d917c74e553aca75a7f Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Thu, 10 Oct 2019 07:35:30 -0400
Subject: [PATCH 01/86] get this centralized for me
---
.gitignore | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.gitignore b/.gitignore
index 024feb28c1a3a..609f7598ff008 100644
--- a/.gitignore
+++ b/.gitignore
@@ -183,3 +183,18 @@ Xcode/
/.flatpak-builder/
/repo/
/build-dir/
+/gettext/include
+/gfx/MSX++DeadPeopleEdition
+/licenses
+/lua-5.3.3/include
+/SDL2-2.0.9
+/SDL2_image-2.0.4
+/SDL2_mixer-2.0.4
+/SDL2_ttf-2.0.14
+/copy_dll_to_bin.bat
+/prebuild.cmd
+/stdafx.cpp
+/stdafx.h
+/style.bat
+/test.astylerc
+/WINDEPEND.props
From 98e88b3c6182d89ba3c2f8de983ab7100dd1ab81 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Thu, 10 Oct 2019 08:12:38 -0400
Subject: [PATCH 02/86] commit for me
---
msvc-full-features/Cataclysm-App.vcxproj | 16 ++++++++++++++--
msvc-full-features/Cataclysm-Lib.vcxproj | 15 +++++++++++++--
msvc-full-features/Cataclysm-Tests.vcxproj | 16 ++++++++++++++--
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index b5c685b21c473..c341735e9346c 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
@@ -58,6 +58,18 @@
false
+
+ C:\Users\Ramza\source\repos\Cataclysm-DDA\WinDepend\bin\x64;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_ttf-2.0.14\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_mixer-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_image-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2-2.0.9\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -132,4 +144,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 1beee68cb4286..34b88fac0688a 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v141
+ v142
MultiByte
@@ -58,6 +58,17 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -120,4 +131,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index a2ec8b9bc8447..6273d38fb8f1e 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
false
@@ -59,6 +59,18 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -136,4 +148,4 @@
-
+
\ No newline at end of file
From c5ba1eb81ebf8ce33bd8c3a2fe8f98f59bc5ab24 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 11:49:22 -0400
Subject: [PATCH 03/86] Disallow running with broken legs and slow walking if
you are on the ground
---
src/character.cpp | 5 -----
src/character.h | 4 +---
src/game.cpp | 9 +++++++--
src/player.cpp | 25 ++++++++++++++-----------
src/player.h | 1 +
5 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/character.cpp b/src/character.cpp
index 6fe9f231d5d5d..c2d9b8994d7fb 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -472,11 +472,6 @@ int Character::get_working_leg_count() const
return limb_count;
}
-bool Character::is_limb_hindered( hp_part limb ) const
-{
- return hp_cur[limb] < hp_max[limb] * .40;
-}
-
bool Character::is_limb_disabled( hp_part limb ) const
{
return hp_cur[limb] <= hp_max[limb] * .125;
diff --git a/src/character.h b/src/character.h
index 5a652bb8486e8..34f07364ed085 100644
--- a/src/character.h
+++ b/src/character.h
@@ -459,10 +459,8 @@ class Character : public Creature, public visitable
int get_working_arm_count() const;
/** Returns the number of functioning legs */
int get_working_leg_count() const;
- /** Returns true if the limb is disabled */
+ /** Returns true if the limb is disabled(12.5% or less hp)*/
bool is_limb_disabled( hp_part limb ) const;
- /** Returns true if the limb is hindered(40% or less hp) */
- bool is_limb_hindered( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
/**
diff --git a/src/game.cpp b/src/game.cpp
index 7149b9fa98e3c..d0e64af4ecfcb 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -9109,7 +9109,12 @@ bool game::walk_move( const tripoint &dest_loc )
modifier = -m.furn( dest_loc ).obj().movecost;
}
- const int mcost = m.combined_movecost( u.pos(), dest_loc, grabbed_vehicle, modifier );
+ int multiplier = 1;
+ if( u.is_on_ground() ) {
+ multiplier *= 3;
+ }
+
+ const int mcost = m.combined_movecost( u.pos(), dest_loc, grabbed_vehicle, modifier ) * multiplier;
if( grabbed_move( dest_loc - u.pos() ) ) {
return true;
} else if( mcost == 0 ) {
@@ -9944,7 +9949,7 @@ void game::on_move_effects()
}
if( u.movement_mode_is( PMM_RUN ) ) {
- if( u.stamina <= 0 ) {
+ if( !u.can_run() ) {
u.toggle_run_mode();
}
if( u.stamina < u.get_stamina_max() / 5 && one_in( u.stamina ) ) {
diff --git a/src/player.cpp b/src/player.cpp
index a886d4f5eae67..97af5f79b187b 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -1589,17 +1589,7 @@ int player::run_cost( int base_cost, bool diag ) const
75; // Mycal characters are faster on their home territory, even through things like shrubs
}
}
- if( is_limb_broken( hp_leg_l ) ) {
- movecost += 50;
- } else if( is_limb_hindered( hp_leg_l ) ) {
- movecost += 25;
- }
- if( is_limb_broken( hp_leg_r ) ) {
- movecost += 50;
- } else if( is_limb_hindered( hp_leg_r ) ) {
- movecost += 25;
- }
movecost *= Character::mutation_value( "movecost_modifier" );
if( flatground ) {
movecost *= Character::mutation_value( "movecost_flatground_modifier" );
@@ -2452,7 +2442,7 @@ void player::set_movement_mode( const player_movemode new_mode )
break;
}
case PMM_RUN: {
- if( stamina > 0 && !has_effect( effect_winded ) ) {
+ if( can_run() ) {
if( is_hauling() ) {
stop_hauling();
}
@@ -2469,9 +2459,12 @@ void player::set_movement_mode( const player_movemode new_mode )
if( is_mounted() ) {
// mounts dont currently have stamina, but may do in future.
add_msg( m_bad, _( "Your steed is too tired to go faster." ) );
+ } else if( get_working_leg_count() < 2 ) {
+ add_msg( m_bad, _( "You need two functional legs to run." ) );
} else {
add_msg( m_bad, _( "You're too tired to run." ) );
}
+ return;
}
break;
}
@@ -2508,6 +2501,11 @@ void player::toggle_run_mode()
}
}
+bool player::can_run()
+{
+ return stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2;
+}
+
void player::toggle_crouch_mode()
{
if( move_mode == PMM_CROUCH ) {
@@ -2529,6 +2527,11 @@ void player::cycle_move_mode()
unsigned char as_uchar = static_cast( move_mode );
as_uchar = ( as_uchar + 1 + PMM_COUNT ) % PMM_COUNT;
set_movement_mode( static_cast( as_uchar ) );
+ if( !movement_mode_is( static_cast( as_uchar ) ) ) {
+ as_uchar = ( as_uchar + 1 + PMM_COUNT ) % PMM_COUNT;
+ set_movement_mode( static_cast( as_uchar ) );
+ }
+
}
void player::search_surroundings()
diff --git a/src/player.h b/src/player.h
index 2730a135632a6..f46507cd7584d 100644
--- a/src/player.h
+++ b/src/player.h
@@ -450,6 +450,7 @@ class player : public Character
void cycle_move_mode(); // Cycles to the next move mode.
void reset_move_mode(); // Resets to walking.
void toggle_run_mode(); // Toggles running on/off.
+ bool can_run(); // source of truth of whether a player can run
void toggle_crouch_mode(); // Toggles crouching on/off.
// martialarts.cpp
From 3e564384faf70b39cdcb60ba8e14672d0c274954 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 12:27:08 -0400
Subject: [PATCH 04/86] Undo checking in .gitignore
---
.gitignore | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index 609f7598ff008..024feb28c1a3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -183,18 +183,3 @@ Xcode/
/.flatpak-builder/
/repo/
/build-dir/
-/gettext/include
-/gfx/MSX++DeadPeopleEdition
-/licenses
-/lua-5.3.3/include
-/SDL2-2.0.9
-/SDL2_image-2.0.4
-/SDL2_mixer-2.0.4
-/SDL2_ttf-2.0.14
-/copy_dll_to_bin.bat
-/prebuild.cmd
-/stdafx.cpp
-/stdafx.h
-/style.bat
-/test.astylerc
-/WINDEPEND.props
From d8bd80c1b7007a054cc042b7993a1bef14515fb0 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 12:30:55 -0400
Subject: [PATCH 05/86] Undo updating proj files
---
msvc-full-features/Cataclysm-App.vcxproj | 16 ++--------------
msvc-full-features/Cataclysm-Lib.vcxproj | 15 ++-------------
msvc-full-features/Cataclysm-Tests.vcxproj | 16 ++--------------
3 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index c341735e9346c..b5c685b21c473 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
@@ -58,18 +58,6 @@
false
-
- C:\Users\Ramza\source\repos\Cataclysm-DDA\WinDepend\bin\x64;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_ttf-2.0.14\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_mixer-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_image-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2-2.0.9\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -144,4 +132,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 34b88fac0688a..1beee68cb4286 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v142
+ v141
MultiByte
@@ -58,17 +58,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -131,4 +120,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index 6273d38fb8f1e..a2ec8b9bc8447 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
false
@@ -59,18 +59,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -148,4 +136,4 @@
-
\ No newline at end of file
+
From ed491eafd302bc6b622ed2aa9d68ce537490519e Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 21:56:00 -0400
Subject: [PATCH 06/86] Migrate method to character
---
msvc-full-features/Cataclysm-App.vcxproj | 12 ++++++++++--
msvc-full-features/Cataclysm-Lib.vcxproj | 11 +++++++++--
msvc-full-features/Cataclysm-Tests.vcxproj | 12 ++++++++++--
src/character.cpp | 6 ++++++
src/character.h | 3 +++
src/player.cpp | 5 -----
src/player.h | 1 -
7 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index b5c685b21c473..04d2bea7ab1a1 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
@@ -58,6 +58,14 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -132,4 +140,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 1beee68cb4286..47347ed934e7d 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v141
+ v142
MultiByte
@@ -58,6 +58,13 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
Level1
@@ -120,4 +127,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index a2ec8b9bc8447..cd9a16650fee5 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
false
@@ -59,6 +59,14 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
Level1
@@ -136,4 +144,4 @@
-
+
\ No newline at end of file
diff --git a/src/character.cpp b/src/character.cpp
index c2d9b8994d7fb..8c3ac8bb6c9d8 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -93,6 +93,7 @@ const efftype_id effect_riding( "riding" );
const efftype_id effect_sleep( "sleep" );
const efftype_id effect_slept_through_alarm( "slept_through_alarm" );
const efftype_id effect_webbed( "webbed" );
+const efftype_id effect_winded( "winded" );
const skill_id skill_dodge( "dodge" );
const skill_id skill_throw( "throw" );
@@ -477,6 +478,11 @@ bool Character::is_limb_disabled( hp_part limb ) const
return hp_cur[limb] <= hp_max[limb] * .125;
}
+bool Character::can_run() const
+{
+ return (stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2);
+}
+
// this is the source of truth on if a limb is broken so all code to determine
// if a limb is broken should point here to make any future changes to breaking easier
bool Character::is_limb_broken( hp_part limb ) const
diff --git a/src/character.h b/src/character.h
index 34f07364ed085..7642921bfc7e5 100644
--- a/src/character.h
+++ b/src/character.h
@@ -463,6 +463,9 @@ class Character : public Creature, public visitable
bool is_limb_disabled( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
+ /** Source of truth of whether a player can run*/
+ bool can_run() const;
+
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
diff --git a/src/player.cpp b/src/player.cpp
index 97af5f79b187b..edb2b81116148 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -2501,11 +2501,6 @@ void player::toggle_run_mode()
}
}
-bool player::can_run()
-{
- return stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2;
-}
-
void player::toggle_crouch_mode()
{
if( move_mode == PMM_CROUCH ) {
diff --git a/src/player.h b/src/player.h
index f46507cd7584d..2730a135632a6 100644
--- a/src/player.h
+++ b/src/player.h
@@ -450,7 +450,6 @@ class player : public Character
void cycle_move_mode(); // Cycles to the next move mode.
void reset_move_mode(); // Resets to walking.
void toggle_run_mode(); // Toggles running on/off.
- bool can_run(); // source of truth of whether a player can run
void toggle_crouch_mode(); // Toggles crouching on/off.
// martialarts.cpp
From 048b567504996ceef27d07b5d048044b465cceb9 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 21:56:43 -0400
Subject: [PATCH 07/86] Revert "Migrate method to character"
This reverts commit ed491eafd302bc6b622ed2aa9d68ce537490519e.
---
msvc-full-features/Cataclysm-App.vcxproj | 12 ++----------
msvc-full-features/Cataclysm-Lib.vcxproj | 11 ++---------
msvc-full-features/Cataclysm-Tests.vcxproj | 12 ++----------
src/character.cpp | 6 ------
src/character.h | 3 ---
src/player.cpp | 5 +++++
src/player.h | 1 +
7 files changed, 12 insertions(+), 38 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index 04d2bea7ab1a1..b5c685b21c473 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
@@ -58,14 +58,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -140,4 +132,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 47347ed934e7d..1beee68cb4286 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v142
+ v141
MultiByte
@@ -58,13 +58,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
Level1
@@ -127,4 +120,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index cd9a16650fee5..a2ec8b9bc8447 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
false
@@ -59,14 +59,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
Level1
@@ -144,4 +136,4 @@
-
\ No newline at end of file
+
diff --git a/src/character.cpp b/src/character.cpp
index 8c3ac8bb6c9d8..c2d9b8994d7fb 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -93,7 +93,6 @@ const efftype_id effect_riding( "riding" );
const efftype_id effect_sleep( "sleep" );
const efftype_id effect_slept_through_alarm( "slept_through_alarm" );
const efftype_id effect_webbed( "webbed" );
-const efftype_id effect_winded( "winded" );
const skill_id skill_dodge( "dodge" );
const skill_id skill_throw( "throw" );
@@ -478,11 +477,6 @@ bool Character::is_limb_disabled( hp_part limb ) const
return hp_cur[limb] <= hp_max[limb] * .125;
}
-bool Character::can_run() const
-{
- return (stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2);
-}
-
// this is the source of truth on if a limb is broken so all code to determine
// if a limb is broken should point here to make any future changes to breaking easier
bool Character::is_limb_broken( hp_part limb ) const
diff --git a/src/character.h b/src/character.h
index 7642921bfc7e5..34f07364ed085 100644
--- a/src/character.h
+++ b/src/character.h
@@ -463,9 +463,6 @@ class Character : public Creature, public visitable
bool is_limb_disabled( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
- /** Source of truth of whether a player can run*/
- bool can_run() const;
-
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
diff --git a/src/player.cpp b/src/player.cpp
index edb2b81116148..97af5f79b187b 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -2501,6 +2501,11 @@ void player::toggle_run_mode()
}
}
+bool player::can_run()
+{
+ return stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2;
+}
+
void player::toggle_crouch_mode()
{
if( move_mode == PMM_CROUCH ) {
diff --git a/src/player.h b/src/player.h
index 2730a135632a6..f46507cd7584d 100644
--- a/src/player.h
+++ b/src/player.h
@@ -450,6 +450,7 @@ class player : public Character
void cycle_move_mode(); // Cycles to the next move mode.
void reset_move_mode(); // Resets to walking.
void toggle_run_mode(); // Toggles running on/off.
+ bool can_run(); // source of truth of whether a player can run
void toggle_crouch_mode(); // Toggles crouching on/off.
// martialarts.cpp
From 5dd9f7825d764290d75b99e253076fd56036235a Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 22:08:02 -0400
Subject: [PATCH 08/86] Migrated can_run into Character per reviewer advice
---
src/character.cpp | 6 ++++++
src/character.h | 2 ++
src/player.cpp | 5 -----
src/player.h | 1 -
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/character.cpp b/src/character.cpp
index c2d9b8994d7fb..59f8405be1fe8 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -93,6 +93,7 @@ const efftype_id effect_riding( "riding" );
const efftype_id effect_sleep( "sleep" );
const efftype_id effect_slept_through_alarm( "slept_through_alarm" );
const efftype_id effect_webbed( "webbed" );
+const efftype_id effect_winded( "winded" );
const skill_id skill_dodge( "dodge" );
const skill_id skill_throw( "throw" );
@@ -484,6 +485,11 @@ bool Character::is_limb_broken( hp_part limb ) const
return hp_cur[limb] == 0;
}
+bool Character::can_run()
+{
+ return stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2;
+}
+
bool Character::move_effects( bool attacking )
{
if( has_effect( effect_downed ) ) {
diff --git a/src/character.h b/src/character.h
index 34f07364ed085..76387a1677612 100644
--- a/src/character.h
+++ b/src/character.h
@@ -463,6 +463,8 @@ class Character : public Creature, public visitable
bool is_limb_disabled( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
+ /** source of truth of whether a player can run */
+ bool can_run();
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
diff --git a/src/player.cpp b/src/player.cpp
index 97af5f79b187b..edb2b81116148 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -2501,11 +2501,6 @@ void player::toggle_run_mode()
}
}
-bool player::can_run()
-{
- return stamina > 0 && !has_effect( effect_winded ) && get_working_leg_count() >= 2;
-}
-
void player::toggle_crouch_mode()
{
if( move_mode == PMM_CROUCH ) {
diff --git a/src/player.h b/src/player.h
index f46507cd7584d..2730a135632a6 100644
--- a/src/player.h
+++ b/src/player.h
@@ -450,7 +450,6 @@ class player : public Character
void cycle_move_mode(); // Cycles to the next move mode.
void reset_move_mode(); // Resets to walking.
void toggle_run_mode(); // Toggles running on/off.
- bool can_run(); // source of truth of whether a player can run
void toggle_crouch_mode(); // Toggles crouching on/off.
// martialarts.cpp
From 4da1c2be778a21794c235f13d3b299f7ff6930e8 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 22:10:29 -0400
Subject: [PATCH 09/86] Update src/character.h
Co-Authored-By: anothersimulacrum
---
src/character.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/character.h b/src/character.h
index 76387a1677612..60bbf1a0d728b 100644
--- a/src/character.h
+++ b/src/character.h
@@ -463,7 +463,7 @@ class Character : public Creature, public visitable
bool is_limb_disabled( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
- /** source of truth of whether a player can run */
+ /** source of truth of whether a Character can run */
bool can_run();
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
From 88637aabc1ad24df5b805caac59664b6c51cb2e5 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 22:12:17 -0400
Subject: [PATCH 10/86] Astyled code
---
src/character.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/character.h b/src/character.h
index 76387a1677612..ae2c9750df78d 100644
--- a/src/character.h
+++ b/src/character.h
@@ -464,7 +464,7 @@ class Character : public Creature, public visitable
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
/** source of truth of whether a player can run */
- bool can_run();
+ bool can_run();
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
From 7750b7d28eb544e9682867006a59fbd8ac49f7b2 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 22:15:07 -0400
Subject: [PATCH 11/86] Revert "Astyled code"
This reverts commit 88637aabc1ad24df5b805caac59664b6c51cb2e5.
---
src/character.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/character.h b/src/character.h
index ae2c9750df78d..76387a1677612 100644
--- a/src/character.h
+++ b/src/character.h
@@ -464,7 +464,7 @@ class Character : public Creature, public visitable
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
/** source of truth of whether a player can run */
- bool can_run();
+ bool can_run();
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
From 2fc440719d9ccebf59df784f59371e2e564a910c Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sat, 12 Oct 2019 22:16:15 -0400
Subject: [PATCH 12/86] AStyle Merged version
---
src/character.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/character.h b/src/character.h
index 60bbf1a0d728b..1542885d61583 100644
--- a/src/character.h
+++ b/src/character.h
@@ -464,7 +464,7 @@ class Character : public Creature, public visitable
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
/** source of truth of whether a Character can run */
- bool can_run();
+ bool can_run();
/**
* Displays menu with body part hp, optionally with hp estimation after healing.
* Returns selected part.
From 5a77f9bab04ca2f143867742d2be6a9ffa0f602d Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sun, 13 Oct 2019 10:05:09 -0400
Subject: [PATCH 13/86] Upgraded debug damage self command to allow body part
choice
---
src/debug_menu.cpp | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp
index 713f057faafe1..cb7b7307412fa 100644
--- a/src/debug_menu.cpp
+++ b/src/debug_menu.cpp
@@ -1290,9 +1290,40 @@ void debug()
// Damage Self
case DEBUG_DAMAGE_SELF: {
+ uilist smenu;
+ smenu.addentry( 0, true, 'q', "%s: %d", _( "Torso" ), u.hp_cur[hp_torso] );
+ smenu.addentry( 1, true, 'w', "%s: %d", _( "Head" ), u.hp_cur[hp_head] );
+ smenu.addentry( 2, true, 'a', "%s: %d", _( "Left arm" ), u.hp_cur[hp_arm_l] );
+ smenu.addentry( 3, true, 's', "%s: %d", _( "Right arm" ), u.hp_cur[hp_arm_r] );
+ smenu.addentry( 4, true, 'z', "%s: %d", _( "Left leg" ), u.hp_cur[hp_leg_l] );
+ smenu.addentry( 5, true, 'x', "%s: %d", _( "Right leg" ), u.hp_cur[hp_leg_r] );
+ smenu.query();
+ body_part part;
int dbg_damage;
- if( query_int( dbg_damage, _( "Damage self for how much? hp: %d" ), u.hp_cur[hp_torso] ) ) {
- u.hp_cur[hp_torso] -= dbg_damage;
+ switch( smenu.ret ) {
+ case 0:
+ part = bp_torso;
+ break;
+ case 1:
+ part = bp_head;
+ break;
+ case 2:
+ part = bp_arm_l;
+ break;
+ case 3:
+ part = bp_arm_r;
+ break;
+ case 4:
+ part = bp_leg_l;
+ break;
+ case 5:
+ part = bp_leg_r;
+ break;
+ default:
+ break;
+ }
+ if( query_int( dbg_damage, _( "Damage self for how much? hp: %d" ), part ) ) {
+ u.apply_damage( nullptr, part, dbg_damage );
u.die( nullptr );
}
}
From de28e0d3ee79d85302119b593e9c3145a92f0272 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sun, 13 Oct 2019 10:06:10 -0400
Subject: [PATCH 14/86] Updated logic to prevent wielding with two broken arms
and force drop of item on arm break if it can't be wielded anymore
---
src/player.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/player.cpp b/src/player.cpp
index c3d4f557e9bda..29ad3006fbcb8 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -3142,6 +3142,9 @@ void player::apply_damage( Creature *source, body_part hurt, int dam, const bool
g->events().send( getID(), dam_to_bodypart );
if( hp_cur[hurtpart] <= 0 && ( source == nullptr || !source->is_hallucination() ) ) {
+ if( !can_wield( weapon ).success() ) {
+ put_into_vehicle_or_drop( *this, item_drop_reason::tumbling, { weapon } );
+ }
if( has_effect( effect_mending, hurt ) ) {
effect &e = get_effect( effect_mending, hurt );
float remove_mend = dam / 20.0f;
@@ -7490,6 +7493,11 @@ ret_val player::can_wield( const item &it ) const
return ret_val::make_failure( _( "Can't wield spilt liquids." ) );
}
+ if( get_working_arm_count() <= 0 ) {
+ return ret_val::make_failure(
+ _( "You need at least one arm to even consider wielding something." ) );
+ }
+
if( it.is_two_handed( *this ) && ( !has_two_arms() || worn_with_flag( "RESTRICT_HANDS" ) ) ) {
if( worn_with_flag( "RESTRICT_HANDS" ) ) {
return ret_val::make_failure(
From 9984bf4e7a524a0a8b826d2365a7e09ba308476b Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Mon, 14 Oct 2019 09:36:38 -0400
Subject: [PATCH 15/86] Prevent using martial arts while on the ground or with
two broken arms and reduce damage dealt as well
---
src/melee.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index 85c0b2f434865..cb1d9d364778d 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -469,7 +469,7 @@ void player::melee_attack( Creature &t, bool allow_special, const matec_id &forc
const bool seen = g->u.sees( t );
// Start of attacks.
damage_instance d;
- roll_all_damage( critical_hit, d, false, cur_weapon );
+ roll_all_damage( critical_hit, d, false, cur_weapon );
const bool has_force_technique = !force_technique.str().empty();
@@ -483,6 +483,13 @@ void player::melee_attack( Creature &t, bool allow_special, const matec_id &forc
technique_id = tec_none;
}
+ //if you are on the ground or have two broken arms you aren't doing any martial arts
+ // and your hits are not going to hurt very much
+ if (is_on_ground() || get_working_arm_count() < 1) {
+ technique_id = tec_none;
+ d.mult_damage(.1);
+ }
+
const ma_technique &technique = technique_id.obj();
// Handles effects as well; not done in melee_affect_*
From 452b617d1ad20277b4714b80fca1ee4dab1d81c8 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Thu, 10 Oct 2019 07:35:30 -0400
Subject: [PATCH 16/86] get this centralized for me
---
.gitignore | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.gitignore b/.gitignore
index 024feb28c1a3a..609f7598ff008 100644
--- a/.gitignore
+++ b/.gitignore
@@ -183,3 +183,18 @@ Xcode/
/.flatpak-builder/
/repo/
/build-dir/
+/gettext/include
+/gfx/MSX++DeadPeopleEdition
+/licenses
+/lua-5.3.3/include
+/SDL2-2.0.9
+/SDL2_image-2.0.4
+/SDL2_mixer-2.0.4
+/SDL2_ttf-2.0.14
+/copy_dll_to_bin.bat
+/prebuild.cmd
+/stdafx.cpp
+/stdafx.h
+/style.bat
+/test.astylerc
+/WINDEPEND.props
From 5c8fb320a75fbb6d1225bdffc71f74356880abcc Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Thu, 10 Oct 2019 08:12:38 -0400
Subject: [PATCH 17/86] commit for me
---
msvc-full-features/Cataclysm-App.vcxproj | 16 ++++++++++++++--
msvc-full-features/Cataclysm-Lib.vcxproj | 15 +++++++++++++--
msvc-full-features/Cataclysm-Tests.vcxproj | 16 ++++++++++++++--
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index b5c685b21c473..c341735e9346c 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
@@ -58,6 +58,18 @@
false
+
+ C:\Users\Ramza\source\repos\Cataclysm-DDA\WinDepend\bin\x64;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_ttf-2.0.14\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_mixer-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_image-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2-2.0.9\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -132,4 +144,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 1beee68cb4286..34b88fac0688a 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v141
+ v142
MultiByte
@@ -58,6 +58,17 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -120,4 +131,4 @@
-
+
\ No newline at end of file
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index a2ec8b9bc8447..6273d38fb8f1e 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v141
+ v142
MultiByte
false
@@ -59,6 +59,18 @@
false
+
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
+
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
+
Level1
@@ -136,4 +148,4 @@
-
+
\ No newline at end of file
From cddd68330f6533b6abb64827ab4c6dcb2994d0e0 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sun, 13 Oct 2019 22:08:17 -0400
Subject: [PATCH 18/86] Revert "commit for me"
This reverts commit 98e88b3c6182d89ba3c2f8de983ab7100dd1ab81.
---
msvc-full-features/Cataclysm-App.vcxproj | 16 ++--------------
msvc-full-features/Cataclysm-Lib.vcxproj | 15 ++-------------
msvc-full-features/Cataclysm-Tests.vcxproj | 16 ++--------------
3 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/msvc-full-features/Cataclysm-App.vcxproj b/msvc-full-features/Cataclysm-App.vcxproj
index c341735e9346c..b5c685b21c473 100644
--- a/msvc-full-features/Cataclysm-App.vcxproj
+++ b/msvc-full-features/Cataclysm-App.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
@@ -58,18 +58,6 @@
false
-
- C:\Users\Ramza\source\repos\Cataclysm-DDA\WinDepend\bin\x64;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_ttf-2.0.14\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_mixer-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2_image-2.0.4\include;C:\Users\Ramza\source\repos\Cataclysm-DDA\SDL2-2.0.9\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -144,4 +132,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Lib.vcxproj b/msvc-full-features/Cataclysm-Lib.vcxproj
index 34b88fac0688a..1beee68cb4286 100644
--- a/msvc-full-features/Cataclysm-Lib.vcxproj
+++ b/msvc-full-features/Cataclysm-Lib.vcxproj
@@ -28,7 +28,7 @@
StaticLibrary
- v142
+ v141
MultiByte
@@ -58,17 +58,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -131,4 +120,4 @@
-
\ No newline at end of file
+
diff --git a/msvc-full-features/Cataclysm-Tests.vcxproj b/msvc-full-features/Cataclysm-Tests.vcxproj
index 6273d38fb8f1e..a2ec8b9bc8447 100644
--- a/msvc-full-features/Cataclysm-Tests.vcxproj
+++ b/msvc-full-features/Cataclysm-Tests.vcxproj
@@ -28,7 +28,7 @@
Application
- v142
+ v141
MultiByte
false
@@ -59,18 +59,6 @@
false
-
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
-
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
-
-
- $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x86;$(LibraryPath)
-
Level1
@@ -148,4 +136,4 @@
-
\ No newline at end of file
+
From 882a9b75c1c7774c90f9dfbd1d98693e8ff9c805 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Sun, 13 Oct 2019 22:08:36 -0400
Subject: [PATCH 19/86] Revert "get this centralized for me"
This reverts commit daa7960522b09bf06b241d917c74e553aca75a7f.
---
.gitignore | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index 609f7598ff008..024feb28c1a3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -183,18 +183,3 @@ Xcode/
/.flatpak-builder/
/repo/
/build-dir/
-/gettext/include
-/gfx/MSX++DeadPeopleEdition
-/licenses
-/lua-5.3.3/include
-/SDL2-2.0.9
-/SDL2_image-2.0.4
-/SDL2_mixer-2.0.4
-/SDL2_ttf-2.0.14
-/copy_dll_to_bin.bat
-/prebuild.cmd
-/stdafx.cpp
-/stdafx.h
-/style.bat
-/test.astylerc
-/WINDEPEND.props
From 8bd32166cebe12b0723ae27914ae26b5acb90f67 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Tue, 15 Oct 2019 23:09:57 -0400
Subject: [PATCH 20/86] Added back penalty for hindered legs as it woul dstill
have effect and decided to still allow martial arts/normal attack damage
while on the ground
---
src/character.cpp | 5 +++++
src/character.h | 2 ++
src/melee.cpp | 4 ++--
src/player.cpp | 6 ++++++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/character.cpp b/src/character.cpp
index bcad599be8d93..2b0879a324bd5 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -476,6 +476,11 @@ int Character::get_working_leg_count() const
return limb_count;
}
+bool Character::is_limb_hindered( hp_part limb ) const
+{
+ return hp_cur[limb] < hp_max[limb] * .40;
+}
+
bool Character::is_limb_disabled( hp_part limb ) const
{
return hp_cur[limb] <= hp_max[limb] * .125;
diff --git a/src/character.h b/src/character.h
index 6613b452bf8f6..a64d384336fc3 100644
--- a/src/character.h
+++ b/src/character.h
@@ -466,6 +466,8 @@ class Character : public Creature, public visitable
int get_working_leg_count() const;
/** Returns true if the limb is disabled(12.5% or less hp)*/
bool is_limb_disabled( hp_part limb ) const;
+ /** Returns true if the limb is hindered(40% or less hp) */
+ bool is_limb_hindered( hp_part limb ) const;
/** Returns true if the limb is broken */
bool is_limb_broken( hp_part limb ) const;
/** source of truth of whether a Character can run */
diff --git a/src/melee.cpp b/src/melee.cpp
index 167fadb189820..024c2ddfc74e0 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -483,9 +483,9 @@ void player::melee_attack( Creature &t, bool allow_special, const matec_id &forc
technique_id = tec_none;
}
- //if you are on the ground or have two broken arms you aren't doing any martial arts
+ // if you have two broken arms you aren't doing any martial arts
// and your hits are not going to hurt very much
- if (is_on_ground() || get_working_arm_count() < 1) {
+ if (get_working_arm_count() < 1) {
technique_id = tec_none;
d.mult_damage(.1);
}
diff --git a/src/player.cpp b/src/player.cpp
index f72ccc2716e36..6856112da3dd4 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -1589,7 +1589,13 @@ int player::run_cost( int base_cost, bool diag ) const
75; // Mycal characters are faster on their home territory, even through things like shrubs
}
}
+ if( is_limb_hindered( hp_leg_l ) ) {
+ movecost += 25;
+ }
+ if( is_limb_hindered( hp_leg_r ) ) {
+ movecost += 25;
+ }
movecost *= Character::mutation_value( "movecost_modifier" );
if( flatground ) {
movecost *= Character::mutation_value( "movecost_flatground_modifier" );
From 9690ede12c88a0b49387ee6e466e87cec63ba901 Mon Sep 17 00:00:00 2001
From: Ramza13 <52087122+Ramza13@users.noreply.github.com>
Date: Tue, 15 Oct 2019 23:15:45 -0400
Subject: [PATCH 21/86] Astyle
---
src/melee.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index 024c2ddfc74e0..b9ea266f36b4d 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -469,7 +469,7 @@ void player::melee_attack( Creature &t, bool allow_special, const matec_id &forc
const bool seen = g->u.sees( t );
// Start of attacks.
damage_instance d;
- roll_all_damage( critical_hit, d, false, cur_weapon );
+ roll_all_damage( critical_hit, d, false, cur_weapon );
const bool has_force_technique = !force_technique.str().empty();
@@ -485,9 +485,9 @@ void player::melee_attack( Creature &t, bool allow_special, const matec_id &forc
// if you have two broken arms you aren't doing any martial arts
// and your hits are not going to hurt very much
- if (get_working_arm_count() < 1) {
+ if( get_working_arm_count() < 1 ) {
technique_id = tec_none;
- d.mult_damage(.1);
+ d.mult_damage( .1 );
}
const ma_technique &technique = technique_id.obj();
From bbd31db4d211bc219be88725fa0f75313a0e9104 Mon Sep 17 00:00:00 2001
From: Cyrano7
Date: Sun, 13 Oct 2019 19:56:40 -0700
Subject: [PATCH 22/86] Fix some typos (#34730)
Fix some more typos and delete some extra spaces
---
data/json/items/archery.json | 4 ++--
data/json/items/gun/32.json | 2 +-
data/json/items/resources/metal.json | 2 +-
data/json/mutations/mutations.json | 2 +-
data/json/npcs/Backgrounds/burger_flipper_1.json | 2 +-
data/json/npcs/Backgrounds/dreamer.json | 2 +-
data/json/npcs/TALK_TRUE_FOODPERSON.json | 4 ++--
data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json | 4 ++--
data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json | 2 +-
data/json/npcs/isherwood_farm/NPC_Claire_Isherwood.json | 2 +-
data/json/npcs/isherwood_farm/NPC_Jack_Isherwood.json | 6 +++---
data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json | 2 +-
data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json | 2 +-
data/json/scenarios.json | 2 +-
data/json/vehicleparts/lights.json | 2 +-
15 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/data/json/items/archery.json b/data/json/items/archery.json
index e1ac39d78e832..5855820f4bfbc 100644
--- a/data/json/items/archery.json
+++ b/data/json/items/archery.json
@@ -64,7 +64,7 @@
"name": "wooden broadhead arrow",
"symbol": "=",
"color": "green",
- "description": "A fletched wooden arrow shaft with a bladed tip. Useful for maximising damage to the target. Stands a decent chance of remaining intact once fired.",
+ "description": "A fletched wooden arrow shaft with a bladed tip. Useful for maximizing damage to the target. Stands a decent chance of remaining intact once fired.",
"material": [ "wood", "steel" ],
"volume": "250 ml",
"weight": "55 g",
@@ -163,7 +163,7 @@
"name": "aluminum broadhead arrow",
"symbol": "=",
"color": "green",
- "description": "A fletched aluminum arrow shaft with a bladed tip. Useful for maximising damage to the target. Stands a good chance of remaining intact once fired.",
+ "description": "A fletched aluminum arrow shaft with a bladed tip. Useful for maximizing damage to the target. Stands a good chance of remaining intact once fired.",
"material": [ "aluminum", "steel" ],
"volume": "250 ml",
"weight": "50 g",
diff --git a/data/json/items/gun/32.json b/data/json/items/gun/32.json
index 60a45d4b4f255..f5330ad300a07 100644
--- a/data/json/items/gun/32.json
+++ b/data/json/items/gun/32.json
@@ -117,7 +117,7 @@
"copy-from": "pistol_backup",
"type": "GUN",
"name": "Kel-Tec P32",
- "description": "One of Kel-tec's oldest designs, the P32 is a popular option for deep concealment and backup usage. Despite its extreme light weight and small size, its .32 ACP chambering makes for good handling and recoil control.",
+ "description": "One of Kel-tec's oldest designs, the P32 is a popular option for deep concealment and backup usage. Despite its extreme light weight and small size, its .32 ACP chambering makes for good handling and recoil control.",
"weight": "186 g",
"volume": "186ml",
"price": 14000,
diff --git a/data/json/items/resources/metal.json b/data/json/items/resources/metal.json
index 4df3613fbd346..4756d9097f2b5 100644
--- a/data/json/items/resources/metal.json
+++ b/data/json/items/resources/metal.json
@@ -332,7 +332,7 @@
"name": "tin powder",
"symbol": "=",
"color": "light_gray",
- "description": "A fine gray powder composed of tin, usable for making solder and lining containers to prevent corrosion.",
+ "description": "A fine gray powder composed of tin, usable for making solder and lining containers to prevent corrosion.",
"material": "tin",
"volume": "50ml",
"weight": "2 g",
diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json
index 7d8703dd1ec18..87859e566dea6 100644
--- a/data/json/mutations/mutations.json
+++ b/data/json/mutations/mutations.json
@@ -623,7 +623,7 @@
"id": "MARTIAL_ARTS5",
"name": "Melee Weapon Training",
"points": 3,
- "description": "You have practiced fighting with weapons. You start with your choice of Eskrima, Fencing, Fior Di Battaglia, Medieval Swordsmanship, Niten Ichi-Ryu, Pentjak Silat, or Sōjutsu.",
+ "description": "You have practiced fighting with weapons. You start with your choice of Eskrima, Fencing, Fior Di Battaglia, Medieval Swordsmanship, Niten Ichi-Ryu, Pentjak Silat, or Sōjutsu.",
"starting_trait": true,
"initial_ma_styles": [
"style_eskrima",
diff --git a/data/json/npcs/Backgrounds/burger_flipper_1.json b/data/json/npcs/Backgrounds/burger_flipper_1.json
index 7948d5d1d8249..532d2adb938ef 100644
--- a/data/json/npcs/Backgrounds/burger_flipper_1.json
+++ b/data/json/npcs/Backgrounds/burger_flipper_1.json
@@ -22,7 +22,7 @@
{
"id": "BGSS_BURGER_FLIPPER_1_STORY3",
"type": "talk_topic",
- "dynamic_line": "I haven't found them yet. Whenever I see a , a little part of me is afraid it's going to be one of them. But then, maybe not. Maybe they were evacuated, maybe they fought and tried to wait for me but the military took them anyway? I've heard that sort of thing happened. I don't know if I'll ever know.",
+ "dynamic_line": "I haven't found them yet. Whenever I see a , a little part of me is afraid it's going to be one of them. But then, maybe not. Maybe they were evacuated, maybe they fought and tried to wait for me but the military took them anyway? I've heard that sort of thing happened. I don't know if I'll ever know.",
"responses": [
{ "text": "So, did you evacuate?", "topic": "BGSS_BURGER_FLIPPER_1_STORY3" },
{ "text": "", "topic": "TALK_FRIEND" },
diff --git a/data/json/npcs/Backgrounds/dreamer.json b/data/json/npcs/Backgrounds/dreamer.json
index c2e7e823f4cd9..76fcd39c2c7ac 100644
--- a/data/json/npcs/Backgrounds/dreamer.json
+++ b/data/json/npcs/Backgrounds/dreamer.json
@@ -2,7 +2,7 @@
{
"id": "BGSS_DREAMER_STORY1",
"type": "talk_topic",
- "dynamic_line": "OK, this is gonna sound crazy but I, like, I knew this was going to happen. Like, before it did. You can even ask my psychic except, like, I think she's dead now. I told her about my dreams a week before the world ended. Serious!",
+ "dynamic_line": "OK, this is gonna sound crazy but I, like, I knew this was going to happen. Like, before it did. You can even ask my psychic except, like, I think she's dead now. I told her about my dreams a week before the world ended. Serious!",
"responses": [
{ "text": "What were your dreams?", "topic": "BGSS_DREAMER_STORY2" },
{ "text": "", "topic": "TALK_FRIEND" },
diff --git a/data/json/npcs/TALK_TRUE_FOODPERSON.json b/data/json/npcs/TALK_TRUE_FOODPERSON.json
index f91bd171d4325..b16e9ff8b1d0f 100644
--- a/data/json/npcs/TALK_TRUE_FOODPERSON.json
+++ b/data/json/npcs/TALK_TRUE_FOODPERSON.json
@@ -162,7 +162,7 @@
"dynamic_line": "Do not mock me, for my strength is quite real! Get out of here now!",
"responses": [
{ "text": "Sheesh, ok, calm down, I'm leaving!", "topic": "TALK_DONE" },
- { "text": "Forgive me, I didn't mean to disrespect you.", "topic": "TALK_FOODPERSON_MAIN" },
+ { "text": "Forgive me, I didn't mean to disrespect you.", "topic": "TALK_FOODPERSON_MAIN" },
{ "text": "Oh yeah? Show me what you can do!", "topic": "TALK_DONE", "effect": "hostile" }
]
},
@@ -531,7 +531,7 @@
{ "text": "I AM THE ONE!", "topic": "TALK_DONE", "effect": "hostile", "opinion": { "trust": -20, "value": -20 } },
{
"condition": { "not": { "u_has_trait": "PROF_FOODP" } },
- "text": "Wow calm down, it's just a prank bro.",
+ "text": "Wow calm down, it's just a prank bro.",
"topic": "TALK_DONE",
"opinion": { "trust": -20, "value": -20 }
},
diff --git a/data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json
index f982b0d777dbf..fb0e5f11e6f76 100644
--- a/data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json
+++ b/data/json/npcs/isherwood_farm/NPC_Carlos_Isherwood.json
@@ -88,7 +88,7 @@
{
"type": "talk_topic",
"id": "TALK_ISHERWOOD_CARLOS_TALK1",
- "dynamic_line": "It is coming together. I want to make our own tools, repair our items and even create some weapons and ammuntion reloading.",
+ "dynamic_line": "It is coming together. I want to make our own tools, repair our items and even create some weapons and ammunition reloading.",
"responses": [
{ "text": "What do you need?", "topic": "TALK_MISSION_LIST" },
{
@@ -108,7 +108,7 @@
{
"type": "talk_topic",
"id": "TALK_CARLOS_BARRY",
- "dynamic_line": "It was pink and really fast, it had lots of limbs, definitly not human. It easily kept up with us when we tried to escape, horrifying stuff. Barry just dropped to the ground, and the thing swept him away.",
+ "dynamic_line": "It was pink and really fast, it had lots of limbs, definitely not human. It easily kept up with us when we tried to escape, horrifying stuff. Barry just dropped to the ground, and the thing swept him away.",
"responses": [
{ "text": "You all just gonna leave him out there to his fate?", "topic": "TALK_CARLOS_BARRY2" },
{ "text": "Let's talk about something else.", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
diff --git a/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json
index 7e0b94829f1d5..13d8f130b9fbf 100644
--- a/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json
+++ b/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json
@@ -41,7 +41,7 @@
"id": "TALK_ISHERWOOD_CHRIS",
"dynamic_line": {
"u_is_wearing": "badge_marshal",
- "yes": "I see that badge, You need to leave our land, my relatives have no fondess for Marshals.",
+ "yes": "I see that badge, You need to leave our land, my relatives have no fondness for Marshals.",
"no": "Hi, what's up?"
},
"responses": [
diff --git a/data/json/npcs/isherwood_farm/NPC_Claire_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Claire_Isherwood.json
index 678b595f475ab..5b26763428cc3 100644
--- a/data/json/npcs/isherwood_farm/NPC_Claire_Isherwood.json
+++ b/data/json/npcs/isherwood_farm/NPC_Claire_Isherwood.json
@@ -346,7 +346,7 @@
"describe": "I could use a barn cat to keep the mice down.",
"offer": "I saw some feral cats out by the old cabin. Can you capture one for me?",
"accepted": "Thank you! Please hurry back! Take this cage so you have a chance of capturing one.",
- "rejected": "I did't want to use chemicals on these rats.",
+ "rejected": "I didn't want to use chemicals on these rats.",
"advice": "Take this pet carrier; if you can get close to a cat, you can put it inside. If you're having problems, try befriending it with cat food.",
"inquire": "Have you found a cat?",
"success": "Thank you so much, I want you to have this copy of my natural remedy journal. I'll name this handsome fellow Joshua.",
diff --git a/data/json/npcs/isherwood_farm/NPC_Jack_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Jack_Isherwood.json
index 3f0fac9afa615..822e82354df7d 100644
--- a/data/json/npcs/isherwood_farm/NPC_Jack_Isherwood.json
+++ b/data/json/npcs/isherwood_farm/NPC_Jack_Isherwood.json
@@ -116,7 +116,7 @@
"dynamic_line": {
"u_is_wearing": "badge_marshal",
"yes": "Is that a U.S. Marshal's badge you're wearing?",
- "no": { "u_male": true, "yes": "Hello travler, what brings you here?", "no": "Hello traveler, what brings you here?" }
+ "no": { "u_male": true, "yes": "Hello traveler, what brings you here?", "no": "Hello traveler, what brings you here?" }
},
"responses": [
{
@@ -188,7 +188,7 @@
{
"type": "talk_topic",
"id": "TALK_ISHERWOOD_JACK2",
- "dynamic_line": "We've had our losses... now we stay close to home, preparing for trouble. We've always taken disaster prepardness seriously, but we didn't expect anything like this though.",
+ "dynamic_line": "We've had our losses... now we stay close to home, preparing for trouble. We've always taken disaster preparedness seriously, but we didn't expect anything like this though.",
"responses": [
{ "text": "Let's talk about something else.", "topic": "TALK_ISHERWOOD_JACK_TOPICS" },
{ "text": "I'd better get going.", "topic": "TALK_DONE" }
@@ -250,7 +250,7 @@
{
"type": "talk_topic",
"id": "TALK_LEAVE_NOW",
- "dynamic_line": "You should get off my land, the governemnt proved its incompetence with this catastrophe.",
+ "dynamic_line": "You should get off my land, the government proved its incompetence with this catastrophe.",
"responses": [ { "text": "...", "topic": "TALK_DONE" } ]
},
{
diff --git a/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json
index 09ee12edfefff..118f082bcdde6 100644
--- a/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json
+++ b/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json
@@ -192,7 +192,7 @@
"dialogue": {
"describe": "I need more knowledge to get better pottery.",
"offer": "I could really use the book, DIY Compendium. With the internet gone, I don't have any handy references.",
- "accepted": "Fantasic, I'm not supposed to leave our land.",
+ "accepted": "Fantastic, I'm not supposed to leave our land.",
"rejected": "Oh well, figured I'd have to do a lot of practice anyway.",
"advice": "A library, bookstore should have one, schools are another good idea.",
"inquire": "Do you have the book?",
diff --git a/data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json b/data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json
index 1a975cdf204bf..30586efeef7d6 100644
--- a/data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json
+++ b/data/json/npcs/robofac/NPC_ROBOFAC_INTERCOM.json
@@ -152,7 +152,7 @@
"id": "MISSION_ROBOFAC_INTERCOM_3",
"type": "mission_definition",
"name": "Light retrieval",
- "description": "Reach the collapsed tower basement, and search the ruins for a photonic circuitry template. The intercom warned you about heavy enemy prescence, and of the existence of a hazardous enviroment.",
+ "description": "Reach the collapsed tower basement, and search the ruins for a photonic circuitry template. The intercom warned you about heavy enemy presence, and of the existence of a hazardous environment.",
"goal": "MGOAL_FIND_ITEM",
"difficulty": 5,
"item": "template_photonics",
diff --git a/data/json/scenarios.json b/data/json/scenarios.json
index c00e6ea846a10..fef1b49af8f61 100644
--- a/data/json/scenarios.json
+++ b/data/json/scenarios.json
@@ -258,7 +258,7 @@
"ident": "ambushed",
"name": "Ambush",
"points": -3,
- "description": "It is the winter after zero hour. As you were scavenging for food and a warm place to stay at, you heard the sound of lots of movement nearby.",
+ "description": "It is the winter after zero hour. As you were scavenging for food and a warm place to stay at, you heard the sound of lots of movement nearby.",
"allowed_locs": [
"cabin",
"forest",
diff --git a/data/json/vehicleparts/lights.json b/data/json/vehicleparts/lights.json
index 02ca0c611f32b..8826fef8febc5 100644
--- a/data/json/vehicleparts/lights.json
+++ b/data/json/vehicleparts/lights.json
@@ -87,7 +87,7 @@
"item": "directed_floodlight",
"copy-from": "floodlight",
"looks_like": "floodlight",
- "description": "A very bright, directed light that illuminates a half-circular area outside the vehicle when turned on. During installation, you can choose what direction to point the light.",
+ "description": "A very bright, directed light that illuminates a half-circular area outside the vehicle when turned on. During installation, you can choose what direction to point the light.",
"//": "8000lm 100W LED floodlight",
"epower": -100,
"flags": [ "HALF_CIRCLE_LIGHT", "FOLDABLE", "ENABLED_DRAINS_EPOWER" ]
From 48d38fefd2443d8c9a36ccc615ee5c41ea85ecbe Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 08:40:27 -0500
Subject: [PATCH 23/86] Add a strong antibiotic.
very not healthy for a body.
---
data/json/items/comestibles/med.json | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index 7271c66145381..a267dadcb7f56 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1437,5 +1437,23 @@
"move_cost": 100,
"effects": [ { "id": "pkill1", "duration": 720 } ]
}
+ },
+ {
+ "id": "strong_antibiotic",
+ "type": "COMESTIBLE",
+ "comestible_type": "MED",
+ "name": "trioxycycline",
+ "name_plural": "trioxycyclines",
+ "description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any infections you may encounter. One dose lasts twelve hours.",
+ "weight": "1 g",
+ "volume": "250 ml",
+ "price": 9000,
+ "charges": 5,
+ "stack_size": 200,
+ "symbol": "!",
+ "color": "white",
+ "healthy": -10,
+ "flags": "NPC_SAFE",
+ "use_action": { "type": "ANTIBIOTIC", }
}
]
From 8d57919e0b591cad92196fa4f5949f10d11def34 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 08:44:25 -0500
Subject: [PATCH 24/86] Less than half the chance of antibiotics
---
data/json/itemgroups/drugs.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/json/itemgroups/drugs.json b/data/json/itemgroups/drugs.json
index 9c75e9970983c..ccb941e8d8c58 100644
--- a/data/json/itemgroups/drugs.json
+++ b/data/json/itemgroups/drugs.json
@@ -53,6 +53,7 @@
"items": [
[ "adderall", 100 ],
[ "antibiotics", 100 ],
+ [ "strong_antibiotic", 45 ],
[ "antifungal", 100 ],
[ "antiparasitic", 100 ],
[ "diazepam", 100 ],
From b09fe69baa9089001cda7c779354f051c57cf8e1 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 08:51:42 -0500
Subject: [PATCH 25/86] Add to hospital_lab and hard_drugs itemgroups
Also added antibiotics to hospital_lab itemgroup.
---
data/json/itemgroups/item_groups.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json
index 7d91a1f5d2e86..29725dd76dc0b 100644
--- a/data/json/itemgroups/item_groups.json
+++ b/data/json/itemgroups/item_groups.json
@@ -1763,6 +1763,7 @@
[ "thorazine", 7 ],
[ "prozac", 10 ],
[ "antibiotics", 25 ],
+ [ "strong_antibiotic", 5 ],
[ "antifungal", 2 ],
[ "antiparasitic", 3 ],
[ "survnote", 1 ],
@@ -3571,6 +3572,8 @@
[ "jar_3l_glass", 15 ],
[ "magnifying_glass", 5 ],
[ "chem_hydrogen_peroxide", 5 ],
+ [ "strong_antibiotic", 1 ],
+ [ "antibiotics", 5 ],
[ "weak_antibiotic", 15 ]
]
},
From 7137c7477e82736ec443e7c33f4e685ca0540b04 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 09:02:43 -0500
Subject: [PATCH 26/86] Use the STRONG_ANTIBIOTIC flag
change antibiotics to reflect their mid-tier status.
---
data/json/items/comestibles/med.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index a267dadcb7f56..7d7f48a68a1fe 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -56,7 +56,7 @@
"comestible_type": "MED",
"name": "antibiotics",
"name_plural": "antibiotics",
- "description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It's the quickest and most reliable way to cure any infections you might have. One dose lasts twelve hours.",
+ "description": "A strong antibacterial medication designed to prevent or stop the spread of infection. It's the safest way to cure any infections you might have. One dose lasts twelve hours.",
"weight": "1 g",
"volume": "250 ml",
"price": 9000,
@@ -1454,6 +1454,6 @@
"color": "white",
"healthy": -10,
"flags": "NPC_SAFE",
- "use_action": { "type": "ANTIBIOTIC", }
+ "use_action": { "type": "STRONG_ANTIBIOTIC", }
}
]
From fe23abbea9aca49393cf58da6316644d67b037b6 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 09:27:57 -0500
Subject: [PATCH 27/86] Commas!
argh
---
data/json/items/comestibles/med.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index 7d7f48a68a1fe..3781a9ecab62a 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1454,6 +1454,6 @@
"color": "white",
"healthy": -10,
"flags": "NPC_SAFE",
- "use_action": { "type": "STRONG_ANTIBIOTIC", }
+ "use_action": { "type": "STRONG_ANTIBIOTIC" }
}
]
From 5e50a3a447ba37a28483abf60d541dab01dbd778 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 09:58:15 -0500
Subject: [PATCH 28/86] Remove redundant field
---
data/json/items/comestibles/med.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index 3781a9ecab62a..246d25766037d 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1443,7 +1443,6 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": "trioxycycline",
- "name_plural": "trioxycyclines",
"description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any infections you may encounter. One dose lasts twelve hours.",
"weight": "1 g",
"volume": "250 ml",
From df3d1f0be4bf847c7eb9107850c3b9f6a93ffa18 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 18:09:22 -0500
Subject: [PATCH 29/86] renamed to dapterocozamin
in the absence of alternatives...
little clarification in the description
bumped up the price point.
---
data/json/items/comestibles/med.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index 246d25766037d..b0c20b30cd278 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1442,11 +1442,11 @@
"id": "strong_antibiotic",
"type": "COMESTIBLE",
"comestible_type": "MED",
- "name": "trioxycycline",
- "description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any infections you may encounter. One dose lasts twelve hours.",
+ "name": "dapterocozamin",
+ "description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any bacterial infections you may encounter. One dose lasts twelve hours.",
"weight": "1 g",
"volume": "250 ml",
- "price": 9000,
+ "price": 15000,
"charges": 5,
"stack_size": 200,
"symbol": "!",
From 5155089a3672e6863e741a61387360a3b9044fec Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 21:31:36 -0500
Subject: [PATCH 30/86] Dapterocozamin was too damned long
I kept forgetting how to spell it.
---
data/json/items/comestibles/med.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index b0c20b30cd278..161b8ba8811cf 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1442,7 +1442,8 @@
"id": "strong_antibiotic",
"type": "COMESTIBLE",
"comestible_type": "MED",
- "name": "dapterocozamin",
+ "name": "destragon",
+ "name_plural": "destrogies",
"description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any bacterial infections you may encounter. One dose lasts twelve hours.",
"weight": "1 g",
"volume": "250 ml",
From c6a96f16466d9288bde7c7fb61762949526e2138 Mon Sep 17 00:00:00 2001
From: Malkeus
Date: Sat, 12 Oct 2019 21:34:46 -0500
Subject: [PATCH 31/86] too slang like
per discussion.
---
data/json/items/comestibles/med.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json
index 161b8ba8811cf..58102534481ea 100644
--- a/data/json/items/comestibles/med.json
+++ b/data/json/items/comestibles/med.json
@@ -1443,7 +1443,6 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": "destragon",
- "name_plural": "destrogies",
"description": "A prescription-strength antibacterial medication designed to prevent or stop the spread of infection. It contains nearly toxic levels of antibiotics, but can treat any bacterial infections you may encounter. One dose lasts twelve hours.",
"weight": "1 g",
"volume": "250 ml",
From 3ce4fc0a5987ffe2d7712edd1ff94d54a981d101 Mon Sep 17 00:00:00 2001
From: KorGgenT
Date: Sun, 13 Oct 2019 17:04:08 -0400
Subject: [PATCH 32/86] translocation ignores fall damage
---
data/json/effects.json | 6 ++++++
src/magic_teleporter_list.cpp | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/data/json/effects.json b/data/json/effects.json
index 154e692dde1ef..93cf3d1dec72c 100644
--- a/data/json/effects.json
+++ b/data/json/effects.json
@@ -1780,5 +1780,11 @@
{
"type": "effect_type",
"id": "has_prospectus"
+ },
+ {
+ "type": "effect_type",
+ "id": "ignore_fall_damage",
+ "//": "Used for translocation via teleporter_list as a way to avoid fall damage by teleporting Z levels",
+ "flags": [ "EFFECT_FEATHER_FALL" ]
}
]
diff --git a/src/magic_teleporter_list.cpp b/src/magic_teleporter_list.cpp
index a20b7203dc956..f0cd293e87ca0 100644
--- a/src/magic_teleporter_list.cpp
+++ b/src/magic_teleporter_list.cpp
@@ -68,7 +68,7 @@ static cata::optional find_valid_teleporters_omt( const tripoint &omt_
return cata::nullopt;
}
-bool teleporter_list::place_avatar_overmap( avatar &, const tripoint &omt_pt ) const
+bool teleporter_list::place_avatar_overmap( avatar &you, const tripoint &omt_pt ) const
{
tinymap omt_dest( 2, true );
tripoint sm_dest = omt_to_sm_copy( omt_pt );
@@ -78,6 +78,7 @@ bool teleporter_list::place_avatar_overmap( avatar &, const tripoint &omt_pt ) c
return false;
}
tripoint local_dest = omt_dest.getlocal( *global_dest ) + point( 60, 60 );
+ you.add_effect( efftype_id( "ignore_fall_damage" ), 1_seconds, num_bp, false, 0, true );
g->place_player_overmap( omt_pt );
g->place_player( local_dest );
return true;
From a0c4d1e177491857e1329793590a1422ec719ad9 Mon Sep 17 00:00:00 2001
From: Curtis Merrill
Date: Mon, 14 Oct 2019 03:21:28 -0400
Subject: [PATCH 33/86] move spores() and blossoms() from player:: to
Character:: (#34736)
* change scpoe of spores() and blossoms() to Character
* move spores() and blossoms() to character.cpp
---
src/character.cpp | 23 +++++++++++++++++++++++
src/character.h | 3 +++
src/player.cpp | 22 ----------------------
src/player.h | 3 ---
4 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/src/character.cpp b/src/character.cpp
index 2b0879a324bd5..ad1a74db5982c 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -19,6 +19,7 @@
#include "effect.h"
#include "event_bus.h"
#include "field.h"
+#include "fungal_effects.h"
#include "game.h"
#include "game_constants.h"
#include "itype.h"
@@ -4688,3 +4689,25 @@ void Character::on_hurt( Creature *source, bool disturb /*= true*/ )
set_killer( source );
}
}
+
+void Character::spores()
+{
+ fungal_effects fe( *g, g->m );
+ //~spore-release sound
+ sounds::sound( pos(), 10, sounds::sound_t::combat, _( "Pouf!" ), false, "misc", "puff" );
+ for( const tripoint &sporep : g->m.points_in_radius( pos(), 1 ) ) {
+ if( sporep == pos() ) {
+ continue;
+ }
+ fe.fungalize( sporep, this, 0.25 );
+ }
+}
+
+void Character::blossoms()
+{
+ // Player blossoms are shorter-ranged, but you can fire much more frequently if you like.
+ sounds::sound( pos(), 10, sounds::sound_t::combat, _( "Pouf!" ), false, "misc", "puff" );
+ for( const tripoint &tmp : g->m.points_in_radius( pos(), 2 ) ) {
+ g->m.add_field( tmp, fd_fungal_haze, rng( 1, 2 ) );
+ }
+}
diff --git a/src/character.h b/src/character.h
index a64d384336fc3..4e2cf09a97740 100644
--- a/src/character.h
+++ b/src/character.h
@@ -1065,6 +1065,9 @@ class Character : public Creature, public visitable
std::array healed_total;
std::map mutation_category_level;
+
+ void spores();
+ void blossoms();
protected:
Character();
Character( Character && );
diff --git a/src/player.cpp b/src/player.cpp
index 6856112da3dd4..21cf364ec2021 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -11272,28 +11272,6 @@ std::vector player::get_overlay_ids() const
return rval;
}
-void player::spores()
-{
- fungal_effects fe( *g, g->m );
- //~spore-release sound
- sounds::sound( pos(), 10, sounds::sound_t::combat, _( "Pouf!" ), false, "misc", "puff" );
- for( const tripoint &sporep : g->m.points_in_radius( pos(), 1 ) ) {
- if( sporep == pos() ) {
- continue;
- }
- fe.fungalize( sporep, this, 0.25 );
- }
-}
-
-void player::blossoms()
-{
- // Player blossoms are shorter-ranged, but you can fire much more frequently if you like.
- sounds::sound( pos(), 10, sounds::sound_t::combat, _( "Pouf!" ), false, "misc", "puff" );
- for( const tripoint &tmp : g->m.points_in_radius( pos(), 2 ) ) {
- g->m.add_field( tmp, fd_fungal_haze, rng( 1, 2 ) );
- }
-}
-
float player::power_rating() const
{
int dmg = std::max( { weapon.damage_melee( DT_BASH ),
diff --git a/src/player.h b/src/player.h
index 8d2f2de3b726d..d2bbe35cb94df 100644
--- a/src/player.h
+++ b/src/player.h
@@ -1632,9 +1632,6 @@ class player : public Character
*/
std::vector get_overlay_ids() const;
- void spores();
- void blossoms();
-
/**
* Called when a mutation is gained
*/
From 5c6cfc025cf83a7b4dca98b3b9ae61fab7c26d51 Mon Sep 17 00:00:00 2001
From: curstwist <39442864+curstwist@users.noreply.github.com>
Date: Mon, 14 Oct 2019 03:22:23 -0400
Subject: [PATCH 34/86] add some domestic furniture and terrain (#34734)
* add some domestic furniture and terrain
---
data/json/construction.json | 46 +++++++++
.../furniture-storage.json | 29 ++++++
.../furniture-surfaces.json | 31 ++++++
.../terrain-fences-gates.json | 98 +++++++++++++++++++
.../terrain-liquids.json | 24 +++++
data/json/itemgroups/supplies.json | 2 +
.../items/resources/home_improvement.json | 15 +++
7 files changed, 245 insertions(+)
diff --git a/data/json/construction.json b/data/json/construction.json
index 317e885fdb418..14d91d948b651 100644
--- a/data/json/construction.json
+++ b/data/json/construction.json
@@ -1257,6 +1257,30 @@
"pre_special": "check_empty",
"post_terrain": "t_chaingate_c"
},
+ {
+ "type": "construction",
+ "description": "Build Screen Door",
+ "category": "CONSTRUCT",
+ "required_skills": [ [ "fabrication", 2 ] ],
+ "time": "60 m",
+ "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 2 } ] ],
+ "components": [ [ [ "screen_mesh", 1 ] ], [ [ "2x4", 4 ] ], [ [ "nail", 20 ] ], [ [ "hinge", 2 ] ] ],
+ "pre_note": "Needs to be supported on both sides by fencing, walls, etc.",
+ "pre_special": "check_empty",
+ "post_terrain": "t_screen_door_c"
+ },
+ {
+ "type": "construction",
+ "description": "Build Screen Mesh Wall",
+ "category": "CONSTRUCT",
+ "required_skills": [ [ "fabrication", 2 ] ],
+ "time": "60 m",
+ "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 2 } ] ],
+ "components": [ [ [ "screen_mesh", 1 ] ], [ [ "2x4", 4 ] ], [ [ "nail", 10 ] ] ],
+ "pre_note": "Needs to be supported on both sides by fencing, walls, etc.",
+ "pre_special": "check_empty",
+ "post_terrain": "t_screened_porch_wall"
+ },
{
"type": "construction",
"description": "Build Chickenwire Fence",
@@ -1390,6 +1414,17 @@
"pre_special": "check_empty",
"post_terrain": "f_bookcase"
},
+ {
+ "type": "construction",
+ "description": "Build Entertainment Center",
+ "category": "FURN",
+ "required_skills": [ [ "fabrication", 2 ] ],
+ "time": "80 m",
+ "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 1 } ] ],
+ "components": [ [ [ "2x4", 14 ] ], [ [ "wood_sheet", 1 ], [ "wood_panel", 2 ] ], [ [ "nail", 20 ] ] ],
+ "pre_special": "check_empty",
+ "post_terrain": "f_entertainment_center"
+ },
{
"type": "construction",
"description": "Build Locker",
@@ -1477,6 +1512,17 @@
"pre_special": "check_empty",
"post_terrain": "f_table"
},
+ {
+ "type": "construction",
+ "description": "Build Coffee Table",
+ "category": "FURN",
+ "required_skills": [ [ "fabrication", 1 ] ],
+ "time": "30 m",
+ "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 1 } ] ],
+ "components": [ [ [ "2x4", 2 ] ], [ [ "wood_sheet", 1 ], [ "wood_panel", 1 ] ], [ [ "nail", 8 ] ] ],
+ "pre_special": "check_empty",
+ "post_terrain": "f_coffee_table"
+ },
{
"type": "construction",
"description": "Build Workbench",
diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json
index bffd0a434d8c7..4b214ebbbb044 100644
--- a/data/json/furniture_and_terrain/furniture-storage.json
+++ b/data/json/furniture_and_terrain/furniture-storage.json
@@ -26,6 +26,35 @@
"items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 4, 12 ] }, { "item": "splinter", "count": 1 } ]
}
},
+ {
+ "type": "furniture",
+ "id": "f_entertainment_center",
+ "name": "entertainment center",
+ "symbol": "{",
+ "description": "Stores audio visual equipment, books and collectible.",
+ "color": "brown",
+ "looks_like": "f_bookcase",
+ "move_cost_mod": -1,
+ "coverage": 80,
+ "required_str": 10,
+ "flags": [ "FLAMMABLE", "PLACE_ITEM", "ORGANIC", "BLOCKSDOOR" ],
+ "deconstruct": {
+ "items": [ { "item": "2x4", "count": 14 }, { "item": "wood_panel", "count": 2 }, { "item": "nail", "charges": [ 12, 20 ] } ]
+ },
+ "max_volume": 8000,
+ "bash": {
+ "str_min": 6,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 2, 12 ] },
+ { "item": "nail", "charges": [ 4, 20 ] },
+ { "item": "splinter", "count": [ 6, 10 ] },
+ { "item": "wood_panel", "count": [ 0, 1 ] }
+ ]
+ }
+ },
{
"type": "furniture",
"id": "f_coffin_c",
diff --git a/data/json/furniture_and_terrain/furniture-surfaces.json b/data/json/furniture_and_terrain/furniture-surfaces.json
index 1c8c062db2946..1d5772db58a54 100644
--- a/data/json/furniture_and_terrain/furniture-surfaces.json
+++ b/data/json/furniture_and_terrain/furniture-surfaces.json
@@ -220,5 +220,36 @@
},
"examine_action": "workbench",
"workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_coffee_table",
+ "name": "table",
+ "description": "a low table for livingrooms.",
+ "symbol": "#",
+ "color": "red",
+ "looks_like": "f_table",
+ "move_cost_mod": 2,
+ "coverage": 50,
+ "required_str": 5,
+ "max_volume": 4000,
+ "flags": [ "TRANSPARENT", "FLAMMABLE", "ORGANIC", "MOUNTABLE", "SHORT", "FLAT_SURF" ],
+ "deconstruct": {
+ "items": [ { "item": "2x4", "count": 2 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 8 ] } ]
+ },
+ "bash": {
+ "str_min": 10,
+ "str_max": 50,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 1, 2 ] },
+ { "item": "wood_panel", "count": [ 0, 1 ] },
+ { "item": "nail", "charges": [ 4, 8 ] },
+ { "item": "splinter", "count": 1 }
+ ]
+ },
+ "examine_action": "workbench",
+ "workbench": { "multiplier": 0.85, "mass": 200000, "volume": "75L" }
}
]
diff --git a/data/json/furniture_and_terrain/terrain-fences-gates.json b/data/json/furniture_and_terrain/terrain-fences-gates.json
index 6b6db529e89f9..bec48b64573e9 100644
--- a/data/json/furniture_and_terrain/terrain-fences-gates.json
+++ b/data/json/furniture_and_terrain/terrain-fences-gates.json
@@ -198,6 +198,76 @@
]
}
},
+ {
+ "type": "terrain",
+ "id": "t_screen_door_c",
+ "name": "closed screen door",
+ "description": "A simple wooden doorway with screen mesh.",
+ "symbol": "+",
+ "color": "brown",
+ "looks_like": "t_chickenwire_gate_c",
+ "move_cost": 0,
+ "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE", "CONNECT_TO_WALL" ],
+ "open": "t_screen_door_o",
+ "deconstruct": {
+ "ter_set": "t_floor",
+ "items": [
+ { "item": "2x4", "count": 4 },
+ { "item": "screen_mesh", "count": 1 },
+ { "item": "nail", "charges": 20 },
+ { "item": "hinge", "count": [ 1, 2 ] }
+ ]
+ },
+ "bash": {
+ "str_min": 5,
+ "str_max": 12,
+ "str_min_blocked": 5,
+ "str_max_blocked": 15,
+ "sound": "rattle!",
+ "sound_fail": "thump!",
+ "ter_set": "t_floor",
+ "items": [
+ { "item": "screen_mesh", "count": [ 0, 1 ] },
+ { "item": "2x4", "count": [ 2, 4 ] },
+ { "item": "hinge", "count": [ 1, 2 ] }
+ ]
+ }
+ },
+ {
+ "type": "terrain",
+ "id": "t_screen_door_o",
+ "name": "closed screen door",
+ "description": "A simple wooden doorway with screen mesh.",
+ "symbol": "+",
+ "color": "brown",
+ "looks_like": "t_chickenwire_gate_o",
+ "move_cost": 0,
+ "flags": [ "TRANSPARENT", "DOOR", "PERMEABLE", "BURROWABLE", "CONNECT_TO_WALL" ],
+ "close": "t_screen_door_c",
+ "deconstruct": {
+ "ter_set": "t_floor",
+ "items": [
+ { "item": "2x4", "count": 4 },
+ { "item": "screen_mesh", "count": 1 },
+ { "item": "nail", "charges": 20 },
+ { "item": "hinge", "count": [ 1, 2 ] }
+ ]
+ },
+ "bash": {
+ "str_min": 5,
+ "str_max": 12,
+ "str_min_blocked": 5,
+ "str_max_blocked": 15,
+ "sound": "rattle!",
+ "sound_fail": "thump!",
+ "ter_set": "t_floor",
+ "items": [
+ { "item": "screen_mesh", "count": [ 0, 1 ] },
+ { "item": "2x4", "count": [ 2, 4 ] },
+ { "item": "hinge", "count": [ 1, 2 ] }
+ ]
+ }
+ },
{
"type": "terrain",
"id": "t_chickenwire_gate_c",
@@ -357,6 +427,34 @@
"items": [ { "item": "wire", "count": [ 5, 10 ] } ]
}
},
+ {
+ "type": "terrain",
+ "id": "t_screened_porch_wall",
+ "name": "screen mesh wall",
+ "description": "A rather flimsy tall wall made of 2x4s and screen mesh, suitable for keeping the bugs out.",
+ "symbol": "LINE_OXOX",
+ "color": "brown",
+ "looks_like": "t_chickenwire_fence",
+ "move_cost": 0,
+ "flags": [ "TRANSPARENT", "NOITEM", "PERMEABLE", "AUTO_WALL_SYMBOL", "BURROWABLE", "AUTO_WALL_SYMBOL" ],
+ "examine_action": "chainfence",
+ "deconstruct": {
+ "ter_set": "t_null",
+ "items": [ { "item": "screen_mesh", "count": 1 }, { "item": "nail", "charges": 10 }, { "item": "2x4", "charges": 4 } ]
+ },
+ "bash": {
+ "str_min": 5,
+ "str_max": 12,
+ "sound": "metal rattling!",
+ "sound_fail": "whack!",
+ "ter_set": "t_floor",
+ "items": [
+ { "item": "screen_mesh", "count": [ 0, 1 ] },
+ { "item": "nail", "charges": [ 5, 10 ] },
+ { "item": "2x4", "count": [ 1, 3 ] }
+ ]
+ }
+ },
{
"type": "terrain",
"id": "t_chickenwire_fence_post",
diff --git a/data/json/furniture_and_terrain/terrain-liquids.json b/data/json/furniture_and_terrain/terrain-liquids.json
index 21ada254267b2..7cf06cd99df57 100644
--- a/data/json/furniture_and_terrain/terrain-liquids.json
+++ b/data/json/furniture_and_terrain/terrain-liquids.json
@@ -213,6 +213,30 @@
"flags": [ "TRANSPARENT", "LIQUID", "SWIMMABLE", "INDOORS" ],
"examine_action": "water_source"
},
+ {
+ "type": "terrain",
+ "id": "t_water_pool_outdoors",
+ "name": "pool water",
+ "description": "A deep pool full of water. Never swim without a lifeguard present. Even though monsters probably ate them.",
+ "symbol": "~",
+ "looks_like": "t_water_pool",
+ "color": "light_blue",
+ "move_cost": 5,
+ "flags": [ "TRANSPARENT", "LIQUID", "SWIMMABLE", "DEEP_WATER" ],
+ "examine_action": "water_source"
+ },
+ {
+ "type": "terrain",
+ "id": "t_water_pool_shallow_outdoors",
+ "name": "shallow pool water",
+ "description": "A shallow pool of water.",
+ "symbol": "~",
+ "looks_like": "t_water_pool_shallow",
+ "color": "light_blue",
+ "move_cost": 5,
+ "flags": [ "TRANSPARENT", "LIQUID", "SWIMMABLE" ],
+ "examine_action": "water_source"
+ },
{
"type": "terrain",
"id": "t_sewage",
diff --git a/data/json/itemgroups/supplies.json b/data/json/itemgroups/supplies.json
index ae996fb4cd618..da9defc5f5cda 100644
--- a/data/json/itemgroups/supplies.json
+++ b/data/json/itemgroups/supplies.json
@@ -75,6 +75,7 @@
{ "item": "brick", "prob": 40, "count": [ 5, 10 ] },
{ "item": "pipe", "prob": 40, "count": [ 5, 10 ] },
{ "item": "wire", "prob": 40, "count": [ 5, 10 ] },
+ { "item": "screen_mesh", "prob": 40, "count": [ 5, 10 ] },
{ "item": "spike", "prob": 40, "count": [ 5, 10 ] },
{ "item": "nail", "prob": 60, "count": [ 5, 20 ] },
{ "item": "hinge", "prob": 60, "count": [ 5, 10 ] }
@@ -179,6 +180,7 @@
[ "frame", 20 ],
[ "hdframe", 10 ],
[ "metal_tank", 10 ],
+ [ "screen_mesh", 10 ],
[ "metal_tank_little", 10 ],
[ "water_faucet", 10 ],
[ "wood_panel", 10 ],
diff --git a/data/json/items/resources/home_improvement.json b/data/json/items/resources/home_improvement.json
index fa83df19b998a..461febfa50716 100644
--- a/data/json/items/resources/home_improvement.json
+++ b/data/json/items/resources/home_improvement.json
@@ -168,5 +168,20 @@
"weight": "5 g",
"volume": "250 ml",
"to_hit": -3
+ },
+ {
+ "type": "GENERIC",
+ "id": "screen_mesh",
+ "symbol": "#",
+ "color": "brown",
+ "looks_like": "r_carpet",
+ "name": "mesh screen",
+ "category": "spare_parts",
+ "description": "A roll of fine mesh screen for bug barriers on porches.",
+ "price": 1200,
+ "material": [ "plastic" ],
+ "weight": "25 g",
+ "volume": "1000 ml",
+ "to_hit": -3
}
]
From 488d4d678e81593b7fc77a23051e414c715c3cfd Mon Sep 17 00:00:00 2001
From: Eric <52087122+Ramza13@users.noreply.github.com>
Date: Mon, 14 Oct 2019 03:23:17 -0400
Subject: [PATCH 35/86] Vertical move effects (#34732)
---
src/game.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/game.cpp b/src/game.cpp
index a0cbaa1316eb2..56c8eabb767db 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -10161,6 +10161,11 @@ void game::vertical_move( int movez, bool force )
}
}
}
+
+ if( !u.move_effects( false ) ) {
+ return;
+ }
+
// Check if there are monsters are using the stairs.
bool slippedpast = false;
if( !m.has_zlevels() && !coming_to_stairs.empty() && !force ) {
From 8d710ec3cfa9f6e8cae5e4518be40e7b10b7d98b Mon Sep 17 00:00:00 2001
From: curstwist <39442864+curstwist@users.noreply.github.com>
Date: Sun, 13 Oct 2019 19:17:54 -0400
Subject: [PATCH 36/86] add roof, landscaping, cosmetic changes to house_w_1
---
data/json/mapgen/house/house_w_1.json | 96 ++++++++++---
data/json/mapgen/nested/house_nested.json | 45 +++++-
.../json/mapgen_palettes/house_w_palette.json | 136 +++++++++++++++++-
.../overmap/multitile_city_buildings.json | 10 ++
.../overmap_terrain_residential.json | 8 ++
5 files changed, 267 insertions(+), 28 deletions(-)
diff --git a/data/json/mapgen/house/house_w_1.json b/data/json/mapgen/house/house_w_1.json
index fdd0d031ba932..cb7814bc0ddc4 100644
--- a/data/json/mapgen/house/house_w_1.json
+++ b/data/json/mapgen/house/house_w_1.json
@@ -7,31 +7,32 @@
"fill_ter": "t_floor",
"rows": [
"..........Gss...........",
- ".||oooo||CsssssC........",
- ".|5 +sssssssss......",
- ".| ||o|oo||.s......",
- ".o |4 |.s......",
- ".| | |.s......",
- ".| o.ss.....",
- ".o7 o..s.....",
- ".| | |..s.....",
- ".| | |..s.....",
- ".|||||| | ||||||.ss.....",
- ".|1 | | yJJl|ssss.....",
- ".| | | +ssss.....",
- ".o | | AJ Yoss.......",
- ".| + + AJ K|.........",
- ".||+||| | i|.........",
- ".|OO| + |yKKnK|.........",
- ".|||| |+||||o||.........",
- ".|2 | TT|.............",
- ".| |j o.............",
- ".| |||+|.............",
- ".| +O|t|.............",
- ".|||o||||||.............",
+ ".##oooo##CsssssC........",
+ ".#5 *sssssssss......",
+ ".# ##o#oo##ps......",
+ ".o |4 #ps......",
+ ".# | #ps......",
+ ".# opss.....",
+ ".o7 opXs.....",
+ ".# | #p.s.....",
+ ".# | #p.s.....",
+ ".#||||| | ||||##pss.....",
+ ".#1 | | yJJl#ssss.....",
+ ".# | | *ssss.....",
+ ".o | | AJ Yossps.....",
+ ".# + + AJ K###ps.....",
+ ".#|+||| | i#g*ss.....",
+ ".#OO| + |yKKnK###.s.....",
+ ".#||| |+||##o##.........",
+ ".#2 | TT#^............",
+ ".# |j o.............",
+ ".# |||+#.............",
+ ".# +O|t#.............",
+ ".###o######.............",
"........................"
],
"palettes": [ "house_w_foundation_palette" ],
+ "terrain": { "#": "t_brick_wall" },
"nested": {
"1": {
"chunks": [
@@ -77,7 +78,56 @@
[ "bonus_room_3x3_W_8", 50 ]
]
}
- }
+ },
+ "place_nested": [
+ {
+ "chunks": [
+ [ "null", 40 ],
+ [ "roof_6x6_garden_4", 5 ],
+ [ "roof_6x6_garden_1", 15 ],
+ [ "greenhouse_6x6_herbal", 10 ],
+ [ "pond_6x6", 15 ]
+ ],
+ "x": 16,
+ "y": 17
+ }
+ ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "om_terrain": "house_w_1_roof",
+ "object": {
+ "fill_ter": "t_shingle_flat_roof",
+ "rows": [
+ " ",
+ " |2222223 ",
+ " |......3 ",
+ " |......32222223 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |............-3 ",
+ " |............3 ",
+ " |............3 ",
+ " |............3 ",
+ " |............323 ",
+ " |..............3 ",
+ " |............--3 ",
+ " |........5---- ",
+ " |........3 ",
+ " |........3 ",
+ " |........3 ",
+ " |........3 ",
+ " |--------3 ",
+ " "
+ ],
+ "palettes": [ "roof_palette" ],
+ "terrain": { ".": "t_shingle_flat_roof" }
}
}
]
diff --git a/data/json/mapgen/nested/house_nested.json b/data/json/mapgen/nested/house_nested.json
index 5e15d1aa9634f..fc0dce63a0c84 100644
--- a/data/json/mapgen/nested/house_nested.json
+++ b/data/json/mapgen/nested/house_nested.json
@@ -765,7 +765,7 @@
"rotation": [ 0, 3 ],
"rows": [
"C ",
- "RH"
+ "R "
],
"palettes": [ "house_w_nest_palette" ],
"items": { "R": [ { "item": "homebooks", "chance": 30 } ] }
@@ -1122,5 +1122,48 @@
"palettes": [ "house_w_nest_palette" ],
"items": { "E": [ { "item": "bed", "chance": 30 } ], "L": [ { "item": "bedroom", "chance": 30 } ] }
}
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "greenhouse_6x6_herbal",
+ "object": {
+ "mapgensize": [ 6, 6 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " ",
+ "BBCBB ",
+ "D4R4Dc",
+ "B5R2Bc",
+ "D2R3Dc",
+ "BBCBB "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ],
+ "place_items": [
+ { "item": "farming_tools", "x": 2, "y": [ 2, 4 ], "chance": 25, "repeat": [ 1, 3 ] },
+ { "item": "farming_seeds", "x": 2, "y": [ 2, 4 ], "chance": 25, "repeat": [ 1, 3 ] },
+ { "item": "flower_pots", "x": 5, "y": [ 2, 4 ], "chance": 55, "repeat": [ 1, 4 ] }
+ ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "pond_6x6",
+ "object": {
+ "mapgensize": [ 6, 6 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " N ",
+ " Kk ",
+ "kKkKK ",
+ "NKKK ",
+ " Kcc ",
+ " cZ "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ]
+ }
}
]
diff --git a/data/json/mapgen_palettes/house_w_palette.json b/data/json/mapgen_palettes/house_w_palette.json
index 8bf756f78828d..b4c495bcafdae 100644
--- a/data/json/mapgen_palettes/house_w_palette.json
+++ b/data/json/mapgen_palettes/house_w_palette.json
@@ -72,7 +72,8 @@
"9": "t_carpet_yellow",
"?": "t_console_broken"
},
- "toilets": { "t": { } }
+ "toilets": { "t": { } },
+ "liquids": { "g": { "liquid": "water_clean", "amount": [ 0, 100 ] } }
},
{
"type": "palette",
@@ -107,6 +108,20 @@
"k": "f_woodstove",
"l": "f_fridge",
"m": "f_glass_fridge",
+ "p": [
+ "f_datura",
+ "f_bluebell",
+ "f_mutpoppy",
+ "f_dahlia",
+ "f_flower_tulip",
+ "f_chamomile",
+ "f_flower_spurge",
+ "f_lily",
+ "f_sunflower",
+ "f_chicory",
+ "f_black_eyed_susan",
+ "f_dandelion"
+ ],
"r": "f_wood_keg",
"v": [ "f_gun_safe_el", "f_safe_l", "f_cardboard_box" ],
"w": "f_rack_wood",
@@ -114,23 +129,34 @@
"z": "f_metal_butcher_rack"
},
"terrain": {
- ".": [ [ "t_grass", 5 ], [ "t_grass_long", 2 ], "t_dirt", "t_shrub" ],
+ ".": [ [ "t_grass", 10 ], [ "t_grass_long", 5 ], [ "t_dirt", 2 ], "t_shrub" ],
"G": "t_grass",
+ "p": "t_grass",
+ "X": "t_grass",
" ": "t_floor",
"|": "t_wall_w",
"<": "t_stairs_up",
">": "t_stairs_down",
- "o": [ "t_window_domestic", "t_window_no_curtains", "t_window_no_curtains_open", "t_window_open", "t_curtains" ],
- "+": "t_door_c",
+ "o": [
+ [ "t_window_domestic", 5 ],
+ "t_window_no_curtains",
+ "t_window_no_curtains_open",
+ [ "t_window_open", 2 ],
+ [ "t_curtains", 3 ]
+ ],
+ "+": [ [ "t_door_c", 10 ], [ "t_door_locked_interior", 3 ] ],
+ "*": [ [ "t_door_locked_peep", 2 ], "t_door_locked_alarm", [ "t_door_locked", 10 ], "t_door_c" ],
"s": "t_concrete",
"~": "t_thconc_floor",
"u": "t_gates_mech_control",
"x": "t_door_metal_locked",
"C": "t_column",
+ "^": "t_gutter_downspout",
",": "t_linoleum_white",
";": "t_linoleum_gray"
},
"toilets": { "t": { } },
+ "liquids": { "g": { "liquid": "water_clean", "amount": [ 0, 100 ] } },
"items": {
"O": [
{ "item": "victoria_shop", "chance": 40 },
@@ -180,5 +206,107 @@
"Y": { "item": "trash", "chance": 30, "repeat": [ 1, 2 ] },
"R": { "item": "homebooks", "chance": 30, "repeat": [ 1, 2 ] }
}
+ },
+ {
+ "type": "palette",
+ "id": "house_w_nest_garden_palette",
+ "terrain": {
+ ".": [ [ "t_grass", 5 ], [ "t_grass_long", 2 ], "t_dirt" ],
+ "A": [ "t_shrub", "t_fern" ],
+ "B": "t_reinforced_glass_shutter_open",
+ "C": "t_reinforced_door_glass_c",
+ "D": "t_reinforced_glass_shutter",
+ "E": "t_chickenwire_gate_c",
+ "F": "t_chickenwire_fence",
+ "G": "t_sandbox",
+ "H": "t_slide",
+ "I": "t_monkey_bars",
+ "J": "t_water_pump",
+ "K": "t_water_sh",
+ "k": "t_water_sh",
+ "L": "t_water_pool",
+ "M": "t_water_pool_shallow",
+ "N": [ "t_shrub_lilac", "t_shrub_hydrangea", "t_shrub_rose" ],
+ "O": [
+ "t_shrub_grape",
+ "t_shrub_raspberry",
+ "t_shrub_huckleberry",
+ "t_shrub_blackberry",
+ "t_shrub_strawberry",
+ "t_shrub_blueberry"
+ ],
+ "P": "t_dirtmound",
+ "Q": "t_dirt",
+ "R": "t_dirtfloor",
+ "Z": [
+ "t_tree_blackjack",
+ "t_tree_walnut",
+ "t_tree_chestnut",
+ "t_tree_beech",
+ "t_tree_hazelnut",
+ "t_tree_cottonwood",
+ "t_tree",
+ "t_tree_elm",
+ "t_tree_dead",
+ "t_tree_apple",
+ "t_tree_pear",
+ "t_tree_cherry",
+ "t_tree_peach",
+ "t_tree_apricot",
+ "t_tree_plum",
+ "t_tree_mulberry",
+ "t_tree_elderberry",
+ "t_tree_pine",
+ "t_tree_birch",
+ "t_tree_willow",
+ "t_tree_maple",
+ "t_tree_hickory",
+ "t_tree_almond",
+ "t_tree_pecan"
+ ],
+ "g": "t_sandbox",
+ "1": "t_dirtfloor",
+ "2": "t_dirtfloor",
+ "3": "t_dirtfloor",
+ "4": "t_dirtfloor",
+ "5": "t_dirtfloor",
+ "6": "t_dirtfloor"
+ },
+ "furniture": {
+ "a": "f_stool",
+ "b": "f_camp_chair",
+ "c": "f_bench",
+ "d": "f_tourist_table",
+ "e": "f_bookcase",
+ "f": "f_statue",
+ "g": [ "f_boulder_medium", "f_boulder_large" ],
+ "h": [ "f_indoor_plant", "f_indoor_plant_y" ],
+ "i": "f_firering",
+ "j": "f_brazier",
+ "k": [ "f_cattails", "f_lotus", "f_lilypad" ],
+ "l": "f_birdbath",
+ "p": [
+ "f_datura",
+ "f_bluebell",
+ "f_mutpoppy",
+ "f_dahlia",
+ "f_flower_tulip",
+ "f_chamomile",
+ "f_flower_spurge",
+ "f_lily",
+ "f_sunflower",
+ "f_chicory",
+ "f_black_eyed_susan",
+ "f_dandelion"
+ ]
+ },
+ "sealed_item": {
+ "1": { "item": { "item": "seed_rose" }, "furniture": "f_planter_seedling" },
+ "2": { "item": { "item": "seed_chamomile" }, "furniture": "f_planter_harvest" },
+ "3": { "item": { "item": "seed_thyme" }, "furniture": "f_planter_harvest" },
+ "4": { "item": { "item": "seed_bee_balm" }, "furniture": "f_planter_harvest" },
+ "5": { "item": { "item": "seed_mugwort" }, "furniture": "f_planter_harvest" },
+ "6": { "item": { "item": "seed_tomato" }, "furniture": "f_planter_harvest" }
+ }
}
]
diff --git a/data/json/overmap/multitile_city_buildings.json b/data/json/overmap/multitile_city_buildings.json
index 687d4de1f26de..758d79af84534 100644
--- a/data/json/overmap/multitile_city_buildings.json
+++ b/data/json/overmap/multitile_city_buildings.json
@@ -15,6 +15,16 @@
{ "point": [ 0, 0, -1 ], "overmap": "basement" }
]
},
+ {
+ "type": "city_building",
+ "id": "house_w_1",
+ "locations": [ "land" ],
+ "overmaps": [
+ { "point": [ 0, 0, 0 ], "overmap": "house_w_1_north" },
+ { "point": [ 0, 0, 1 ], "overmap": "house_w_1_roof_north" },
+ { "point": [ 0, 0, -1 ], "overmap": "basement" }
+ ]
+ },
{
"type": "city_building",
"id": "s_electronics",
diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
index 37e780595c692..b50faa860dc22 100644
--- a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
+++ b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
@@ -435,5 +435,13 @@
"color": "light_green",
"see_cost": 2,
"flags": [ "SIDEWALK", "GENERIC_LOOT" ]
+ },
+ {
+ "type": "overmap_terrain",
+ "id": "house_w_1_roof",
+ "name": "house",
+ "copy-from": "generic_city_building",
+ "color": "light_green",
+ "see_cost": 2
}
]
From ecb383f92f1e02e6b12164476f2712228cfedbfa Mon Sep 17 00:00:00 2001
From: KorGgenT
Date: Sun, 13 Oct 2019 17:31:38 -0400
Subject: [PATCH 37/86] player::position to Character
---
src/character.h | 24 ++++++++++++++++++++++++
src/player.h | 24 +-----------------------
src/savegame_json.cpp | 26 +++++++++++++-------------
3 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/src/character.h b/src/character.h
index 4e2cf09a97740..3d84a9988ba58 100644
--- a/src/character.h
+++ b/src/character.h
@@ -518,6 +518,27 @@ class Character : public Creature, public visitable
WT_GOOD,
NUM_WATER_TOLERANCE
};
+ inline int posx() const override {
+ return position.x;
+ }
+ inline int posy() const override {
+ return position.y;
+ }
+ inline int posz() const override {
+ return position.z;
+ }
+ inline void setx( int x ) {
+ setpos( tripoint( x, position.y, position.z ) );
+ }
+ inline void sety( int y ) {
+ setpos( tripoint( position.x, y, position.z ) );
+ }
+ inline void setz( int z ) {
+ setpos( tripoint( position.xy(), z ) );
+ }
+ inline void setpos( const tripoint &p ) override {
+ position = p;
+ }
private:
/** Retrieves a stat mod of a mutation. */
int get_mod( const trait_id &mut, const std::string &arg ) const;
@@ -1087,6 +1108,9 @@ class Character : public Creature, public visitable
void deserialize( JsonIn &jsin );
};
+ // The player's position on the local map.
+ tripoint position;
+
/** Bonuses to stats, calculated each turn */
int str_bonus;
int dex_bonus;
diff --git a/src/player.h b/src/player.h
index d2bbe35cb94df..1f0747a8e742f 100644
--- a/src/player.h
+++ b/src/player.h
@@ -1489,27 +1489,7 @@ class player : public Character
tripoint global_omt_location() const;
// ---------------VALUES-----------------
- inline int posx() const override {
- return position.x;
- }
- inline int posy() const override {
- return position.y;
- }
- inline int posz() const override {
- return position.z;
- }
- inline void setx( int x ) {
- setpos( tripoint( x, position.y, position.z ) );
- }
- inline void sety( int y ) {
- setpos( tripoint( position.x, y, position.z ) );
- }
- inline void setz( int z ) {
- setpos( tripoint( position.xy(), z ) );
- }
- inline void setpos( const tripoint &p ) override {
- position = p;
- }
+
tripoint view_offset;
// Means player sit inside vehicle on the tile he is now
bool in_vehicle;
@@ -1705,8 +1685,6 @@ class player : public Character
known_magic magic;
protected:
- // The player's position on the local map.
- tripoint position;
trap_map known_traps;
diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp
index d434fb8235d7a..f30f373d52c2d 100644
--- a/src/savegame_json.cpp
+++ b/src/savegame_json.cpp
@@ -365,6 +365,13 @@ void Character::load( JsonObject &data )
{
Creature::load( data );
+ if( !data.read( "posx", position.x ) ) { // uh-oh.
+ debugmsg( "BAD PLAYER/NPC JSON: no 'posx'?" );
+ }
+ data.read( "posy", position.y );
+ if( !data.read( "posz", position.z ) && g != nullptr ) {
+ position.z = g->get_levz();
+ }
// stats
data.read( "str_cur", str_cur );
data.read( "str_max", str_max );
@@ -524,6 +531,12 @@ void Character::store( JsonOut &json ) const
{
Creature::store( json );
+ // assumes already in Character object
+ // positional data
+ json.member( "posx", position.x );
+ json.member( "posy", position.y );
+ json.member( "posz", position.z );
+
// stat
json.member( "str_cur", str_cur );
json.member( "str_max", str_max );
@@ -591,12 +604,6 @@ void player::store( JsonOut &json ) const
{
Character::store( json );
- // assumes already in player object
- // positional data
- json.member( "posx", position.x );
- json.member( "posy", position.y );
- json.member( "posz", position.z );
-
// energy
json.member( "stim", stim );
json.member( "last_sleep_check", last_sleep_check );
@@ -705,13 +712,6 @@ void player::load( JsonObject &data )
JsonArray parray;
character_id tmpid;
- if( !data.read( "posx", position.x ) ) { // uh-oh.
- debugmsg( "BAD PLAYER/NPC JSON: no 'posx'?" );
- }
- data.read( "posy", position.y );
- if( !data.read( "posz", position.z ) && g != nullptr ) {
- position.z = g->get_levz();
- }
data.read( "stim", stim );
data.read( "pkill", pkill );
data.read( "tank_plut", tank_plut );
From e5cf9a7ac091b55a4d85ab95c4eb34d47e4dfc62 Mon Sep 17 00:00:00 2001
From: Mark Langsdorf
Date: Sun, 13 Oct 2019 07:30:41 -0500
Subject: [PATCH 38/86] npctrade: use drop_invalid_inventory() instead of
drop_items()
Fixes #34614
NPC trading was broken because drop_items() would sometimes randomly
crash on some kind of item.is_null() error in npc::drop_items().
Replace drop_items() with character::drop_invalid_inventory() which
does roughly the same thing but works.
Also, switch the sign of changes to NPC available weight and volume
when trading, so that selling items to them reduces the amount of space
for further items in this trade, while buying items from them increases
the amount of space.
---
src/npcmove.cpp | 11 +++++++++--
src/npctrade.cpp | 9 +++++----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/npcmove.cpp b/src/npcmove.cpp
index f1c48e83b3036..77bec741114ca 100644
--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -1013,8 +1013,11 @@ void npc::execute_action( npc_action action )
case npc_drop_items:
/* NPCs cant choose this action anymore, but at least it works */
- drop_items( weight_carried() - weight_capacity(),
- volume_carried() - volume_capacity() );
+ drop_invalid_inventory();
+ /* drop_items is still broken
+ * drop_items( weight_carried() - weight_capacity(),
+ * volume_carried() - volume_capacity() );
+ */
move_pause();
break;
@@ -2966,8 +2969,12 @@ struct ratio_index {
ratio_index( double R, int I ) : ratio( R ), index( I ) {}
};
+/* As of October 2019, this is buggy, do not use!! */
void npc::drop_items( units::mass drop_weight, units::volume drop_volume, int min_val )
{
+ /* Remove this when someone debugs it back to functionality */
+ return;
+
add_msg( m_debug, "%s is dropping items-%3.2f kg, %3.2f L (%d items, wgt %3.2f/%3.2f kg, "
"vol %3.2f/%3.2f L)",
name, units::to_kilogram( drop_weight ), units::to_liter( drop_volume ), inv.size(),
diff --git a/src/npctrade.cpp b/src/npctrade.cpp
index 1b3d37c25a11e..be21f2a5f316c 100644
--- a/src/npctrade.cpp
+++ b/src/npctrade.cpp
@@ -542,8 +542,8 @@ bool trading_window::perform_trade( npc &np, const std::string &deal )
your_balance -= delta_price;
}
if( ip.loc.where() == item_location::type::character ) {
- volume_left -= ip.vol * change_amount;
- weight_left -= ip.weight * change_amount;
+ volume_left += ip.vol * change_amount;
+ weight_left += ip.weight * change_amount;
}
}
ch = 0;
@@ -588,8 +588,9 @@ void trading_window::update_npc_owed( npc &np )
bool npc_trading::trade( npc &np, int cost, const std::string &deal )
{
np.shop_restock();
- np.drop_items( np.weight_carried() - np.weight_capacity(),
- np.volume_carried() - np.volume_capacity() );
+ //np.drop_items( np.weight_carried() - np.weight_capacity(),
+ // np.volume_carried() - np.volume_capacity() );
+ np.drop_invalid_inventory();
trading_window trade_win;
trade_win.setup_win( np );
From ca1af9ffce38cba350cb6222ff47b5f7a49de0b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jianxiang=20Wang=20=28=E7=8E=8B=E5=81=A5=E7=BF=94=29?=
Date: Mon, 14 Oct 2019 15:27:26 +0800
Subject: [PATCH 39/86] Update clang-tidy text style check (#34716)
* Single space after semicolon
* Fix comment
* Update test
* Disable ellipsis space check in the middle of lines
* Remove spaces after ellipses that start a line
* Remove spaces before punctuations
* Ignore ter_bind and furn_bind strings
---
tools/clang-tidy-plugin/TextStyleCheck.cpp | 161 ++++++++++++--------
tools/clang-tidy-plugin/test/text-style.cpp | 19 ++-
2 files changed, 114 insertions(+), 66 deletions(-)
diff --git a/tools/clang-tidy-plugin/TextStyleCheck.cpp b/tools/clang-tidy-plugin/TextStyleCheck.cpp
index a478f9866f46d..10ec869a6cdac 100644
--- a/tools/clang-tidy-plugin/TextStyleCheck.cpp
+++ b/tools/clang-tidy-plugin/TextStyleCheck.cpp
@@ -44,7 +44,7 @@ void TextStyleCheck::registerMatchers( MatchFinder *Finder )
callExpr(
callee(
functionDecl(
- hasName( "formatted_set_simple" )
+ hasAnyName( "formatted_set_simple", "ter_bind", "furn_bind" )
)
)
)
@@ -108,6 +108,12 @@ void TextStyleCheck::check( const MatchFinder::MatchResult &Result )
size_t fix_end_max = 0;
// remove unnecessary spaces at line end (before '\n')
size_t fix_line_end_max = 0;
+ // remove unnecessary spaces after a symbol that starts a string
+ size_t fix_start_max = 0;
+ // remove unnecessary spaces after a symbol that starts a line (after '\n')
+ size_t fix_line_start_max = 0;
+ // remove unnecessary spaces before the symbol
+ size_t fix_before_max = 0;
} spaces;
struct {
bool yes;
@@ -121,21 +127,21 @@ void TextStyleCheck::check( const MatchFinder::MatchResult &Result )
// and search for them in this order.
// *INDENT-OFF*
static const std::array punctuations = {{
- // symbol,follow, spaces, replace,
- // check, len, num spc end yes, string, escaped symbol desc, replc desc
- { U"...", U"", { true, 0, 1, 1, 3, 2, 2, 2 }, { true, "\u2026", R"(\u2026)", "three dots", "ellipsis" } },
- { U"::", U"", { false, }, { false, } },
- { U"\r\n", U"", { false, }, { true, R"(\n)", R"(\n)", "carriage return", "new line" } },
- { U"\u2026", U"", { true, 0, 1, 1, 3, 2, 2, 2 }, { false, } },
- { U".", U"", { true, 0, 3, 1, 3, 2, 0, 2 }, { false, } },
- { U";", U"", { true, 0, 1, 1, 3, 2, 2, 2 }, { false, } },
- { U"!", U"!?", { true, 0, 1, 1, 3, 2, 2, 2 }, { false, } },
- { U"?", U"!?", { true, 0, 1, 1, 3, 2, 2, 2 }, { false, } },
- { U":", U"", { true, 0, 1, 1, 1, 1, 0, 1 }, { false, } },
- { U",", U"", { true, 0, 1, 1, 2, 1, 0, 1 }, { false, } },
- { U"\r", U"", { false, }, { true, R"(\n)", R"(\n)", "carriage return", "new line" } },
- { U"\n", U"", { true, 0, 0, 0, 0, 0, 1, 1 }, { false, } },
- { U"\t", U"", { false, }, { true, " ", " ", "tab", "spaces" } },
+ // symbol,follow, spaces, replace,
+ // check, len, num spc, end,start,before yes, string, escaped, symbol desc, replc desc
+ { U"...", U"", { true, 0, 1, 0, 0, 0, 2, 2, 2, 2, 1 }, { true, "\u2026", R"(\u2026)", "three dots", "ellipsis" } },
+ { U"::", U"", { false, }, { false, } },
+ { U"\r\n", U"", { false, }, { true, R"(\n)", R"(\n)", "carriage return", "new line" } },
+ { U"\u2026", U"", { true, 0, 1, 1, 3, 2, 2, 2, 2, 2, 1 }, { false, } },
+ { U".", U"", { true, 0, 3, 1, 3, 2, 0, 2, 0, 0, 1 }, { false, } },
+ { U";", U"", { true, 0, 1, 1, 2, 1, 1, 1, 0, 0, 1 }, { false, } },
+ { U"!", U"!?", { true, 0, 1, 1, 3, 2, 2, 2, 0, 0, 1 }, { false, } },
+ { U"?", U"!?", { true, 0, 1, 1, 3, 2, 2, 2, 0, 0, 1 }, { false, } },
+ { U":", U"", { true, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1 }, { false, } },
+ { U",", U"", { true, 0, 1, 1, 2, 1, 0, 1, 0, 0, 1 }, { false, } },
+ { U"\r", U"", { false, }, { true, R"(\n)", R"(\n)", "carriage return", "new line" } },
+ { U"\n", U"", { true, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1 }, { false, } },
+ { U"\t", U"", { false, }, { true, " ", " ", "tab", "spaces" } },
}};
// *INDENT-ON*
@@ -181,6 +187,22 @@ void TextStyleCheck::check( const MatchFinder::MatchResult &Result )
}
}
if( punc->spaces.check && text_length >= punc->spaces.min_string_length ) {
+ size_t spacesbefore = 0;
+ auto itspacebefore = itpunc;
+ for( ; itspacebefore > beg; --itspacebefore, ++spacesbefore ) {
+ const uint32_t ch = *( itspacebefore - 1 );
+ if( ch != U' ' ) {
+ break;
+ }
+ }
+ if( spacesbefore > 0 && spacesbefore <= punc->spaces.fix_before_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( itspacebefore ), location( itpunc ) );
+ auto diags = diag( location( itpunc ), "unnecessary spaces before this location." );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
+ }
+ }
size_t wordlen = 0;
for( auto itword = itpunc; itword > beg; --itword, ++wordlen ) {
const uint32_t ch = *( itword - 1 );
@@ -189,57 +211,74 @@ void TextStyleCheck::check( const MatchFinder::MatchResult &Result )
break;
}
}
- if( wordlen >= punc->spaces.min_word_length ) {
- auto itspaceend = it;
- size_t spacelen = 0;
- for( ; itspaceend < end && *itspaceend == U' '; ++itspaceend, ++spacelen ) {
+ bool after_word = wordlen >= punc->spaces.min_word_length;
+ auto itspaceend = it;
+ size_t spacelen = 0;
+ for( ; itspaceend < end && *itspaceend == U' '; ++itspaceend, ++spacelen ) {
+ }
+ if( after_word && itspaceend >= end ) {
+ // treat spaces at the end of strings in concat expressions (+, += or <<) as deliberate
+ if( !in_concat_expr && spacelen > 0 && spacelen <= punc->spaces.fix_end_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( it ), location( itspaceend ) );
+ auto diags = diag( location( it ), "unnecessary spaces at end of string." );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
+ }
+ }
+ } else if( after_word && *itspaceend == U'\n' ) {
+ if( spacelen > 0 && spacelen <= punc->spaces.fix_line_end_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( it ), location( itspaceend ) );
+ auto diags = diag( location( it ), "unnecessary spaces at end of line." );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
+ }
}
- if( itspaceend >= end ) {
- // treat spaces at the end of strings in concat expressions (+, += or <<) as deliberate
- if( !in_concat_expr && spacelen > 0 && spacelen <= punc->spaces.fix_end_max ) {
- const CharSourceRange range = CharSourceRange::getCharRange(
- location( it ), location( itspaceend ) );
- auto diags = diag( location( it ), "unnecessary spaces at end of string." );
- if( fixit ) {
- diags << FixItHint::CreateRemoval( range );
- }
+ } else if( itpunc <= beg ) {
+ if( spacelen > 0 && spacelen <= punc->spaces.fix_line_start_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( it ), location( itspaceend ) );
+ auto diags = diag( location( it ), "undesired spaces after a punctuation that starts a string." );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
}
- } else if( *itspaceend == U'\n' ) {
- if( spacelen > 0 && spacelen <= punc->spaces.fix_line_end_max ) {
- const CharSourceRange range = CharSourceRange::getCharRange(
- location( it ), location( itspaceend ) );
- auto diags = diag( location( it ), "unnecessary spaces at end of line." );
- if( fixit ) {
- diags << FixItHint::CreateRemoval( range );
- }
+ }
+ } else if( itpunc > beg && *( itpunc - 1 ) == U'\n' ) {
+ if( spacelen > 0 && spacelen <= punc->spaces.fix_start_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( it ), location( itspaceend ) );
+ auto diags = diag( location( it ), "undesired spaces after a punctuation that starts a line." );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
+ }
+ }
+ } else if( after_word ) {
+ if( spacelen >= punc->spaces.fix_spaces_min &&
+ spacelen < punc->spaces.fix_spaces_to ) {
+ auto diags = diag( location( it ),
+ "insufficient spaces at this location. %0 required, but only %1 found." )
+ << static_cast( punc->spaces.fix_spaces_to )
+ << static_cast( spacelen );
+ if( fixit ) {
+ diags << FixItHint::CreateInsertion( location( it ),
+ std::string( punc->spaces.fix_spaces_to - spacelen, ' ' ) );
}
- } else {
- if( spacelen >= punc->spaces.fix_spaces_min &&
- spacelen < punc->spaces.fix_spaces_to ) {
- auto diags = diag( location( it ),
- "insufficient spaces at this location. %0 required, but only %1 found." )
- << static_cast( punc->spaces.fix_spaces_to )
- << static_cast( spacelen );
- if( fixit ) {
- diags << FixItHint::CreateInsertion( location( it ),
- std::string( punc->spaces.fix_spaces_to - spacelen, ' ' ) );
- }
- } else if( spacelen > punc->spaces.fix_spaces_to &&
- spacelen <= punc->spaces.fix_spaces_max ) {
- const CharSourceRange range = CharSourceRange::getCharRange(
- location( itspaceend - ( spacelen - punc->spaces.fix_spaces_to ) ),
- location( itspaceend ) );
- auto diags = diag( location( it ),
- "excessive spaces at this location. %0 required, but %1 found." )
- << static_cast( punc->spaces.fix_spaces_to )
- << static_cast( spacelen );
- if( fixit ) {
- diags << FixItHint::CreateRemoval( range );
- }
+ } else if( spacelen > punc->spaces.fix_spaces_to &&
+ spacelen <= punc->spaces.fix_spaces_max ) {
+ const CharSourceRange range = CharSourceRange::getCharRange(
+ location( itspaceend - ( spacelen - punc->spaces.fix_spaces_to ) ),
+ location( itspaceend ) );
+ auto diags = diag( location( it ),
+ "excessive spaces at this location. %0 required, but %1 found." )
+ << static_cast( punc->spaces.fix_spaces_to )
+ << static_cast( spacelen );
+ if( fixit ) {
+ diags << FixItHint::CreateRemoval( range );
}
}
- it = itspaceend;
}
+ it = itspaceend;
}
}
}
diff --git a/tools/clang-tidy-plugin/test/text-style.cpp b/tools/clang-tidy-plugin/test/text-style.cpp
index 56374fe24886b..190146d4e1e1e 100644
--- a/tools/clang-tidy-plugin/test/text-style.cpp
+++ b/tools/clang-tidy-plugin/test/text-style.cpp
@@ -95,15 +95,24 @@ static void bar()
// CHECK-MESSAGES: [[@LINE-1]]:17: warning: insufficient spaces at this location. 2 required, but only 1 found.
// CHECK-FIXES: foo( "Three! Two! One!" );
foo( "Three; Two; One;" );
- // CHECK-MESSAGES: [[@LINE-1]]:17: warning: insufficient spaces at this location. 2 required, but only 1 found.
- // CHECK-FIXES: foo( "Three; Two; One;" );
+ // CHECK-MESSAGES: [[@LINE-1]]:22: warning: excessive spaces at this location. 1 required, but 2 found.
+ // CHECK-FIXES: foo( "Three; Two; One;" );
foo( "Three? Two? One?" );
// CHECK-MESSAGES: [[@LINE-1]]:17: warning: insufficient spaces at this location. 2 required, but only 1 found.
// CHECK-FIXES: foo( "Three? Two? One?" );
- foo( "Three\u2026 Two\u2026 One\u2026" );
- // CHECK-MESSAGES: [[@LINE-1]]:22: warning: insufficient spaces at this location. 2 required, but only 1 found.
- // CHECK-FIXES: foo( "Three\u2026 Two\u2026 One\u2026" );
foo( "Three?! Two!? One!!" );
// CHECK-MESSAGES: [[@LINE-1]]:18: warning: insufficient spaces at this location. 2 required, but only 1 found.
// CHECK-FIXES: foo( "Three?! Two!? One!!" );
+ foo( "\u2026 foo." );
+ // CHECK-MESSAGES: [[@LINE-1]]:17: warning: undesired spaces after a punctuation that starts a string.
+ // CHECK-FIXES: foo( "\u2026foo." );
+ foo( "foo.\n\u2026 bar." );
+ // CHECK-MESSAGES: [[@LINE-1]]:23: warning: undesired spaces after a punctuation that starts a line.
+ // CHECK-FIXES: foo( "foo.\n\u2026bar." );
+ foo( "foo : bar" );
+ // CHECK-MESSAGES: [[@LINE-1]]:15: warning: unnecessary spaces before this location.
+ // CHECK-FIXES: foo( "foo: bar" );
+ foo( "foo \nbar" );
+ // CHECK-MESSAGES: [[@LINE-1]]:15: warning: unnecessary spaces before this location.
+ // CHECK-FIXES: foo( "foo\nbar" );
}
From 4620bac76c5ce8be31ef2f24f31cb116b60ac214 Mon Sep 17 00:00:00 2001
From: Fris0uman <41293484+Fris0uman@users.noreply.github.com>
Date: Mon, 14 Oct 2019 09:34:24 +0200
Subject: [PATCH 40/86] Autoclave menu gives more information about denials
(#34722)
* More helpful denials
* mounted autoclave also gives info
---
src/game_inventory.cpp | 12 +++++++-----
src/vehicle_use.cpp | 13 +++++++++----
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp
index a23a574afae7d..fe045742ecfa9 100644
--- a/src/game_inventory.cpp
+++ b/src/game_inventory.cpp
@@ -1921,14 +1921,16 @@ class bionic_sterilize_preset : public inventory_selector_preset
std::string get_denial( const item_location &loc ) const override {
auto reqs = *requirement_id( "autoclave_item" );
-
- if( !reqs.can_make_with_inventory( p.crafting_inventory(), is_crafting_component ) ) {
- return pgettext( "volume of water", "2 L" );
- }
-
if( loc.get_item()->has_flag( "FILTHY" ) ) {
return _( "CBM is filthy. Wash it first." );
}
+ if( loc.get_item()->has_flag( "NO_PACKED" ) ) {
+ return _( "You should put this CBM in an autoclave pouch to keep it sterile." );
+ }
+ if( !reqs.can_make_with_inventory( p.crafting_inventory(), is_crafting_component ) ) {
+ return _( "You need at least 2L of water." );
+ }
+
return std::string();
}
diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp
index 2e41d4f40daa9..b3bcd06ec0365 100644
--- a/src/vehicle_use.cpp
+++ b/src/vehicle_use.cpp
@@ -1414,10 +1414,15 @@ void vehicle::use_autoclave( int p )
{
auto items = get_items( p );
static const std::string filthy( "FILTHY" );
+ static const std::string no_packed( "NO_PACKED" );
bool filthy_items = std::any_of( items.begin(), items.end(), []( const item & i ) {
return i.has_flag( filthy );
} );
+ bool unpacked_items = std::any_of( items.begin(), items.end(), []( const item & i ) {
+ return i.has_flag( no_packed );
+ } );
+
bool cbms = std::all_of( items.begin(), items.end(), []( const item & i ) {
return i.is_bionic();
} );
@@ -1427,8 +1432,7 @@ void vehicle::use_autoclave( int p )
add_msg( m_bad,
_( "You turn the autoclave off before it's finished the program, and open its door." ) );
} else if( items.empty() ) {
- add_msg( m_bad,
- _( "The autoclave is empty, there's no point in starting it." ) );
+ add_msg( m_bad, _( "The autoclave is empty, there's no point in starting it." ) );
} else if( fuel_left( "water" ) < 8 && fuel_left( "water_clean" ) < 8 ) {
add_msg( m_bad, _( "You need 8 charges of water in tanks of the %s for the autoclave to run." ),
name );
@@ -1436,8 +1440,9 @@ void vehicle::use_autoclave( int p )
add_msg( m_bad,
_( "You need to remove all filthy items from the autoclave to start the sterilizing cycle." ) );
} else if( !cbms ) {
- add_msg( m_bad,
- _( "Only CBMs can be sterilized in an autoclave." ) );
+ add_msg( m_bad, _( "Only CBMs can be sterilized in an autoclave." ) );
+ } else if( unpacked_items ) {
+ add_msg( m_bad, _( "You should put your CBMs in autoclave pouches to keep them sterile." ) );
} else {
parts[p].enabled = true;
for( auto &n : items ) {
From 716f60683cd71e951dfb00687a3ab6c36e1eda6b Mon Sep 17 00:00:00 2001
From: Knightos
Date: Sun, 13 Oct 2019 20:28:52 +0200
Subject: [PATCH 41/86] Fix furniture door pathfinding
---
src/npcmove.cpp | 2 +-
src/pathfinding.cpp | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/npcmove.cpp b/src/npcmove.cpp
index 77bec741114ca..986df7898078e 100644
--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -2300,7 +2300,7 @@ void npc::move_to( const tripoint &pt, bool no_bashing, std::set *nomo
}
moves -= 100;
moved = true;
- } else if( g->m.passable( p ) ) {
+ } else if( g->m.passable( p ) && !g->m.has_flag( "DOOR", p ) ) {
bool diag = trigdist && posx() != p.x && posy() != p.y;
if( is_mounted() ) {
const double base_moves = run_cost( g->m.combined_movecost( pos(), p ),
diff --git a/src/pathfinding.cpp b/src/pathfinding.cpp
index 4b1c6b3d3544b..dfc489513fa7a 100644
--- a/src/pathfinding.cpp
+++ b/src/pathfinding.cpp
@@ -319,7 +319,8 @@ std::vector map::route( const tripoint &f, const tripoint &t,
const int rating = ( bash == 0 || cost != 0 ) ? -1 :
bash_rating_internal( bash, furniture, terrain, false, veh, part );
- if( cost == 0 && rating <= 0 && ( !doors || !terrain.open ) && veh == nullptr && climb_cost <= 0 ) {
+ if( cost == 0 && rating <= 0 && ( !doors || !terrain.open || !furniture.open ) && veh == nullptr &&
+ climb_cost <= 0 ) {
layer.state[index] = ASL_CLOSED; // Close it so that next time we won't try to calculate costs
continue;
}
@@ -329,8 +330,9 @@ std::vector map::route( const tripoint &f, const tripoint &t,
if( climb_cost > 0 && p_special & PF_CLIMBABLE ) {
// Climbing fences
newg += climb_cost;
- } else if( doors && terrain.open &&
- ( !terrain.has_flag( "OPENCLOSE_INSIDE" ) || !is_outside( cur ) ) ) {
+ } else if( doors && ( terrain.open || furniture.open ) &&
+ ( !terrain.has_flag( "OPENCLOSE_INSIDE" ) || !furniture.has_flag( "OPENCLOSE_INSIDE" ) ||
+ !is_outside( cur ) ) ) {
// Only try to open INSIDE doors from the inside
// To open and then move onto the tile
newg += 4;
@@ -374,7 +376,7 @@ std::vector map::route( const tripoint &f, const tripoint &t,
newg += 500;
} else {
// Unbashable and unopenable from here
- if( !doors || !terrain.open ) {
+ if( !doors || !terrain.open || !furniture.open ) {
// Or anywhere else for that matter
layer.state[index] = ASL_CLOSED;
}
From 5ceffdfc6605a2f014df6483d463e9c2eb9f543c Mon Sep 17 00:00:00 2001
From: ZhilkinSerg
Date: Mon, 14 Oct 2019 18:27:47 +0300
Subject: [PATCH 42/86] Get rid of auto in favor of proper types
---
src/pixel_minimap.cpp | 68 ++++++++++++++++----------------
src/pixel_minimap_projectors.cpp | 6 +--
src/sdl_utils.cpp | 12 +++---
src/sdlsound.cpp | 10 ++---
src/sdltiles.cpp | 4 +-
src/vitamin.cpp | 4 +-
src/weather.cpp | 8 ++--
src/weather_data.cpp | 2 +-
src/wish.cpp | 12 +++---
9 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/src/pixel_minimap.cpp b/src/pixel_minimap.cpp
index 8d9a1cc07dac6..d40476fb51c7d 100644
--- a/src/pixel_minimap.cpp
+++ b/src/pixel_minimap.cpp
@@ -81,7 +81,7 @@ SDL_Texture_Ptr create_cache_texture( const SDL_Renderer_Ptr &renderer, int tile
SDL_Color get_map_color_at( const tripoint &p )
{
- const auto &m = g->m;
+ const map &m = g->m;
if( const auto vp = m.veh_at( p ) ) {
return curses_color_to_SDL( vp->vehicle().part_color( vp->part_index() ) );
@@ -96,14 +96,14 @@ SDL_Color get_map_color_at( const tripoint &p )
SDL_Color get_critter_color( Creature *critter, int flicker, int mixture )
{
- auto result = curses_color_to_SDL( critter->symbol_color() );
+ SDL_Color result = curses_color_to_SDL( critter->symbol_color() );
- if( const auto m = dynamic_cast( critter ) ) {
+ if( const monster *m = dynamic_cast( critter ) ) {
//faction status (attacking or tracking) determines if red highlights get applied to creature
- const auto matt = m->attitude( &g->u );
+ const monster_attitude matt = m->attitude( &g->u );
if( MATT_ATTACK == matt || MATT_FOLLOW == matt ) {
- const auto red_pixel = SDL_Color{ 0xFF, 0x0, 0x0, 0xFF };
+ const SDL_Color red_pixel = SDL_Color{ 0xFF, 0x0, 0x0, 0xFF };
result = adjust_color_brightness( mix_colors( result, red_pixel, mixture ), flicker );
}
}
@@ -220,8 +220,8 @@ void pixel_minimap::set_settings( const pixel_minimap_settings &settings )
void pixel_minimap::prepare_cache_for_updates( const tripoint ¢er )
{
- const auto new_center_sm = g->m.get_abs_sub() + ms_to_sm_copy( center );
- const auto center_sm_diff = cached_center_sm - new_center_sm;
+ const tripoint new_center_sm = g->m.get_abs_sub() + ms_to_sm_copy( center );
+ const tripoint center_sm_diff = cached_center_sm - new_center_sm;
//invalidate the cache if the game shifted more than one submap in the last update, or if z-level changed.
if( std::abs( center_sm_diff.x ) > 1 ||
@@ -265,10 +265,10 @@ void pixel_minimap::flush_cache_updates()
for( int y = 0; y < SEEY; ++y ) {
for( int x = 0; x < SEEX; ++x ) {
- const auto tile_pos = projector->get_tile_pos( { x, y }, { SEEX, SEEY } );
- const auto tile_size = projector->get_tile_size();
+ const point tile_pos = projector->get_tile_pos( { x, y }, { SEEX, SEEY } );
+ const point tile_size = projector->get_tile_size();
- const auto rect = SDL_Rect{ tile_pos.x, tile_pos.y, tile_size.x, tile_size.y };
+ const SDL_Rect rect = SDL_Rect{ tile_pos.x, tile_pos.y, tile_size.x, tile_size.y };
render_fill_rect( renderer, rect, 0x00, 0x00, 0x00 );
}
@@ -276,14 +276,14 @@ void pixel_minimap::flush_cache_updates()
}
for( const point &p : mcp.second.update_list ) {
- const auto tile_pos = projector->get_tile_pos( p, { SEEX, SEEY } );
- const auto tile_color = mcp.second.color_at( p );
+ const point tile_pos = projector->get_tile_pos( p, { SEEX, SEEY } );
+ const SDL_Color tile_color = mcp.second.color_at( p );
if( pixel_size.x == 1 && pixel_size.y == 1 ) {
SetRenderDrawColor( renderer, tile_color.r, tile_color.g, tile_color.b, tile_color.a );
RenderDrawPoint( renderer, tile_pos.x, tile_pos.y );
} else {
- const auto rect = SDL_Rect{ tile_pos.x, tile_pos.y, pixel_size.x, pixel_size.y };
+ const SDL_Rect rect = SDL_Rect{ tile_pos.x, tile_pos.y, pixel_size.x, pixel_size.y };
render_fill_rect( renderer, rect, tile_color.r, tile_color.g, tile_color.b );
}
}
@@ -294,18 +294,18 @@ void pixel_minimap::flush_cache_updates()
void pixel_minimap::update_cache_at( const tripoint &sm_pos )
{
- const auto &access_cache = g->m.access_cache( sm_pos.z );
+ const level_cache &access_cache = g->m.access_cache( sm_pos.z );
const bool nv_goggle = g->u.get_vision_modes()[NV_GOGGLES];
- auto &cache_item = get_cache_at( g->m.get_abs_sub() + sm_pos );
- const auto ms_pos = sm_to_ms_copy( sm_pos );
+ submap_cache &cache_item = get_cache_at( g->m.get_abs_sub() + sm_pos );
+ const tripoint ms_pos = sm_to_ms_copy( sm_pos );
cache_item.touched = true;
for( int y = 0; y < SEEY; ++y ) {
for( int x = 0; x < SEEX; ++x ) {
- const auto p = ms_pos + tripoint{ x, y, 0 };
- const auto lighting = access_cache.visibility_cache[p.x][p.y];
+ const tripoint p = ms_pos + tripoint{ x, y, 0 };
+ const lit_level lighting = access_cache.visibility_cache[p.x][p.y];
SDL_Color color;
@@ -374,7 +374,7 @@ void pixel_minimap::set_screen_rect( const SDL_Rect &screen_rect )
projector = create_projector( screen_rect );
pixel_size = get_pixel_size( projector->get_tile_size(), settings.mode );
- const auto size_on_screen = projector->get_tiles_size( total_tiles_count );
+ const point size_on_screen = projector->get_tiles_size( total_tiles_count );
if( settings.scale_to_fit ) {
main_tex_clip_rect = SDL_Rect{ 0, 0, size_on_screen.x, size_on_screen.y };
@@ -407,10 +407,10 @@ void pixel_minimap::set_screen_rect( const SDL_Rect &screen_rect )
cache.clear();
- const auto chunk_size = projector->get_tiles_size( { SEEX, SEEY } );
+ const point chunk_size = projector->get_tiles_size( { SEEX, SEEY } );
const auto chunk_texture_generator = [&chunk_size, this]() {
- auto result = create_cache_texture( renderer, chunk_size.x, chunk_size.y );
+ SDL_Texture_Ptr result = create_cache_texture( renderer, chunk_size.x, chunk_size.y );
SetTextureBlendMode( result, SDL_BLENDMODE_BLEND );
return result;
};
@@ -444,13 +444,13 @@ void pixel_minimap::render( const tripoint ¢er )
void pixel_minimap::render_cache( const tripoint ¢er )
{
- const auto sm_center = g->m.get_abs_sub() + ms_to_sm_copy( center );
- const auto sm_offset = tripoint{
+ const tripoint sm_center = g->m.get_abs_sub() + ms_to_sm_copy( center );
+ const tripoint sm_offset = tripoint{
total_tiles_count.x / SEEX / 2,
total_tiles_count.y / SEEY / 2, 0
};
- auto ms_offset = center.xy();
+ point ms_offset = center.xy();
ms_to_sm_remain( ms_offset );
ms_offset = point{ SEEX / 2, SEEY / 2 } - ms_offset;
@@ -459,7 +459,7 @@ void pixel_minimap::render_cache( const tripoint ¢er )
continue; // What you gonna do with all that junk?
}
- const auto rel_pos = elem.first - sm_center;
+ const tripoint rel_pos = elem.first - sm_center;
if( std::abs( rel_pos.x ) > sm_offset.x + 1 ||
std::abs( rel_pos.y ) > sm_offset.y + 1 ||
@@ -467,10 +467,10 @@ void pixel_minimap::render_cache( const tripoint ¢er )
continue;
}
- const auto sm_pos = rel_pos + sm_offset;
- const auto ms_pos = sm_to_ms_copy( sm_pos ) + ms_offset;
+ const tripoint sm_pos = rel_pos + sm_offset;
+ const tripoint ms_pos = sm_to_ms_copy( sm_pos ) + ms_offset;
- const auto chunk_rect = projector->get_chunk_rect( ms_pos.xy(), { SEEX, SEEY } );
+ const SDL_Rect chunk_rect = projector->get_chunk_rect( ms_pos.xy(), { SEEX, SEEY } );
RenderCopy( renderer, elem.second.chunk_tex, nullptr, &chunk_rect );
}
@@ -493,7 +493,7 @@ void pixel_minimap::render_critters( const tripoint ¢er )
mixture = lerp_clamped( 0, 100, std::max( s, 0.0f ) );
}
- const auto &access_cache = g->m.access_cache( center.z );
+ const level_cache &access_cache = g->m.access_cache( center.z );
const int start_x = center.x - total_tiles_count.x / 2;
const int start_y = center.y - total_tiles_count.y / 2;
@@ -504,8 +504,8 @@ void pixel_minimap::render_critters( const tripoint ¢er )
for( int y = 0; y < total_tiles_count.y; y++ ) {
for( int x = 0; x < total_tiles_count.x; x++ ) {
- const auto p = tripoint{ start_x + x, start_y + y, center.z };
- const auto lighting = access_cache.visibility_cache[p.x][p.y];
+ const tripoint p = tripoint{ start_x + x, start_y + y, center.z };
+ const lit_level lighting = access_cache.visibility_cache[p.x][p.y];
if( lighting == LL_DARK || lighting == LL_BLANK ) {
continue;
@@ -517,9 +517,9 @@ void pixel_minimap::render_critters( const tripoint ¢er )
continue;
}
- const auto critter_pos = projector->get_tile_pos( { x, y }, total_tiles_count );
- const auto critter_rect = SDL_Rect{ critter_pos.x, critter_pos.y, beacon_size.x, beacon_size.y };
- const auto critter_color = get_critter_color( critter, flicker, mixture );
+ const point critter_pos = projector->get_tile_pos( { x, y }, total_tiles_count );
+ const SDL_Rect critter_rect = SDL_Rect{ critter_pos.x, critter_pos.y, beacon_size.x, beacon_size.y };
+ const SDL_Color critter_color = get_critter_color( critter, flicker, mixture );
draw_beacon( critter_rect, critter_color );
}
diff --git a/src/pixel_minimap_projectors.cpp b/src/pixel_minimap_projectors.cpp
index b49a3fb63ba55..b9166231234fb 100644
--- a/src/pixel_minimap_projectors.cpp
+++ b/src/pixel_minimap_projectors.cpp
@@ -67,9 +67,9 @@ SDL_Rect pixel_minimap_iso_projector::get_chunk_rect(
const point &p,
const point &tiles_count ) const
{
- const auto size = get_tiles_size( tiles_count );
- const auto offset = point{ 0, tile_size.y *tiles_count.y / 2 };
- const auto pos = get_tile_pos( p, total_tiles_count ) - offset;
+ const point size = get_tiles_size( tiles_count );
+ const point offset = point{ 0, tile_size.y *tiles_count.y / 2 };
+ const point pos = get_tile_pos( p, total_tiles_count ) - offset;
return { pos.x, pos.y, size.x, size.y };
}
diff --git a/src/sdl_utils.cpp b/src/sdl_utils.cpp
index 7f8fd0ae1b1dd..cdd776328baae 100644
--- a/src/sdl_utils.cpp
+++ b/src/sdl_utils.cpp
@@ -54,12 +54,12 @@ std::vector color_linear_interpolate( const SDL_Color &start_color,
const float step = 1.0f / ( steps - 1 );
for( unsigned i = 0; i < steps - 2; i++ ) {
const float percent = ( i + 1 ) * step;
- const auto r = static_cast( start_color.r + static_cast( percent *
- ( end_color.r - start_color.r ) ) );
- const auto g = static_cast( start_color.g + static_cast( percent *
- ( end_color.g - start_color.g ) ) );
- const auto b = static_cast( start_color.b + static_cast( percent *
- ( end_color.b - start_color.b ) ) );
+ const Uint8 r = static_cast( start_color.r + static_cast( percent *
+ ( end_color.r - start_color.r ) ) );
+ const Uint8 g = static_cast( start_color.g + static_cast( percent *
+ ( end_color.g - start_color.g ) ) );
+ const Uint8 b = static_cast( start_color.b + static_cast( percent *
+ ( end_color.b - start_color.b ) ) );
colors.push_back( { r, g, b, 255 } );
}
colors.push_back( end_color );
diff --git a/src/sdlsound.cpp b/src/sdlsound.cpp
index e930a97f97f78..153cb6cceb250 100644
--- a/src/sdlsound.cpp
+++ b/src/sdlsound.cpp
@@ -182,7 +182,7 @@ void musicFinished()
current_playlist_at = playlist_indexes.at( absolute_playlist_at );
- const auto &next = list.entries[current_playlist_at];
+ const music_playlist::entry &next = list.entries[current_playlist_at];
play_music_file( next.file, next.volume );
}
@@ -214,7 +214,7 @@ void play_music( const std::string &playlist )
current_playlist = playlist;
current_playlist_at = playlist_indexes.at( absolute_playlist_at );
- const auto &next = list.entries[current_playlist_at];
+ const music_playlist::entry &next = list.entries[current_playlist_at];
current_music_track_volume = next.volume;
play_music_file( next.file, next.volume );
}
@@ -280,7 +280,7 @@ static Mix_Chunk *load_chunk( const std::string &path )
// - Not Loaded: Load chunk from stored resource path
static inline Mix_Chunk *get_sfx_resource( int resource_id )
{
- auto &resource = sfx_resources.resource[ resource_id ];
+ sound_effect_resource &resource = sfx_resources.resource[ resource_id ];
if( !resource.chunk ) {
std::string path = ( current_soundpack_path + "/" + resource.path );
resource.chunk.reset( load_chunk( path ) );
@@ -377,7 +377,7 @@ static const sound_effect *find_random_effect( const id_and_variant &id_variants
// Same as above, but with fallback to "default" variant. May still return `nullptr`
static const sound_effect *find_random_effect( const std::string &id, const std::string &variant )
{
- const auto eff = find_random_effect( id_and_variant( id, variant ) );
+ const sound_effect *eff = find_random_effect( id_and_variant( id, variant ) );
if( eff != nullptr ) {
return eff;
}
@@ -581,7 +581,7 @@ void load_soundset()
}
// Preload sound effects
- for( const auto &preload : sfx_preload ) {
+ for( const id_and_variant &preload : sfx_preload ) {
const auto find_result = sfx_resources.sound_effects.find( preload );
if( find_result != sfx_resources.sound_effects.end() ) {
for( const auto &sfx : find_result->second ) {
diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp
index 5c35d8ee49182..6507e06318f88 100644
--- a/src/sdltiles.cpp
+++ b/src/sdltiles.cpp
@@ -932,7 +932,7 @@ static void invalidate_framebuffer( std::vector &framebuffer, int x,
static void invalidate_framebuffer( std::vector &framebuffer )
{
- for( auto &i : framebuffer ) {
+ for( curseline &i : framebuffer ) {
std::fill_n( i.chars.begin(), i.chars.size(), cursecell( "" ) );
}
}
@@ -3144,7 +3144,7 @@ static bool ends_with( const std::string &text, const std::string &suffix )
static void font_folder_list( std::ostream &fout, const std::string &path,
std::set &bitmap_fonts )
{
- for( const auto &f : get_files_from_path( "", path, true, false ) ) {
+ for( const std::string &f : get_files_from_path( "", path, true, false ) ) {
TTF_Font_Ptr fnt( TTF_OpenFont( f.c_str(), 12 ) );
if( !fnt ) {
continue;
diff --git a/src/vitamin.cpp b/src/vitamin.cpp
index 8fede53975677..c77070e470f6a 100644
--- a/src/vitamin.cpp
+++ b/src/vitamin.cpp
@@ -61,9 +61,9 @@ void vitamin::load_vitamin( JsonObject &jo )
jo.throw_error( "vitamin consumption rate cannot be negative", "rate" );
}
- auto def = jo.get_array( "disease" );
+ JsonArray def = jo.get_array( "disease" );
while( def.has_more() ) {
- auto e = def.next_array();
+ JsonArray e = def.next_array();
vit.disease_.emplace_back( e.get_int( 0 ), e.get_int( 1 ) );
}
diff --git a/src/weather.cpp b/src/weather.cpp
index daf435f520599..10a5c4219b6a2 100644
--- a/src/weather.cpp
+++ b/src/weather.cpp
@@ -176,7 +176,7 @@ void retroactively_fill_from_funnel( item &it, const trap &tr, const time_point
// bday == last fill check
it.set_birthday( end );
- auto data = sum_conditions( start, end, pos );
+ weather_sum data = sum_conditions( start, end, pos );
// Technically 0.0 division is OK, but it will be cleaner without it
if( data.rain_amount > 0 ) {
@@ -305,15 +305,15 @@ static void fill_funnels( int rain_depth_mm_per_hour, bool acid, const trap &tr
{
const double turns_per_charge = tr.funnel_turns_per_charge( rain_depth_mm_per_hour );
// Give each funnel on the map a chance to collect the rain.
- const auto &funnel_locs = g->m.trap_locations( tr.loadid );
- for( auto loc : funnel_locs ) {
+ const std::vector &funnel_locs = g->m.trap_locations( tr.loadid );
+ for( const tripoint &loc : funnel_locs ) {
units::volume maxcontains = 0_ml;
if( one_in( turns_per_charge ) ) { // FIXME:
//add_msg("%d mm/h %d tps %.4f: fill",int(calendar::turn),rain_depth_mm_per_hour,turns_per_charge);
// This funnel has collected some rain! Put the rain in the largest
// container here which is either empty or contains some mixture of
// impure water and acid.
- auto items = g->m.i_at( loc );
+ map_stack items = g->m.i_at( loc );
auto container = items.end();
for( auto candidate_container = items.begin(); candidate_container != items.end();
++candidate_container ) {
diff --git a/src/weather_data.cpp b/src/weather_data.cpp
index d11afa00843f5..fc5c1ffea40ff 100644
--- a/src/weather_data.cpp
+++ b/src/weather_data.cpp
@@ -103,7 +103,7 @@ static weather_result weather_data_internal( weather_type const type )
}
}};
- const auto i = static_cast( type );
+ const size_t i = static_cast( type );
if( i < NUM_WEATHER_TYPES ) {
return { data[i], i > 0 };
}
diff --git a/src/wish.cpp b/src/wish.cpp
index 6bd73fb1ecb2d..b218cd02ddb9f 100644
--- a/src/wish.cpp
+++ b/src/wish.cpp
@@ -96,7 +96,7 @@ class wish_mutate_callback: public uilist_callback
if( !mdata.prereqs.empty() ) {
line2++;
mvwprintz( menu->window, point( startx, line2 ), c_light_gray, _( "Prereqs:" ) );
- for( auto &j : mdata.prereqs ) {
+ for( const trait_id &j : mdata.prereqs ) {
mvwprintz( menu->window, point( startx + 11, line2 ), mcolor( j ),
mutation_branch::get_name( j ) );
line2++;
@@ -106,7 +106,7 @@ class wish_mutate_callback: public uilist_callback
if( !mdata.prereqs2.empty() ) {
line2++;
mvwprintz( menu->window, point( startx, line2 ), c_light_gray, _( "Prereqs, 2d:" ) );
- for( auto &j : mdata.prereqs2 ) {
+ for( const trait_id &j : mdata.prereqs2 ) {
mvwprintz( menu->window, point( startx + 15, line2 ), mcolor( j ),
mutation_branch::get_name( j ) );
line2++;
@@ -116,7 +116,7 @@ class wish_mutate_callback: public uilist_callback
if( !mdata.threshreq.empty() ) {
line2++;
mvwprintz( menu->window, point( startx, line2 ), c_light_gray, _( "Thresholds required:" ) );
- for( auto &j : mdata.threshreq ) {
+ for( const trait_id &j : mdata.threshreq ) {
mvwprintz( menu->window, point( startx + 21, line2 ), mcolor( j ),
mutation_branch::get_name( j ) );
line2++;
@@ -126,7 +126,7 @@ class wish_mutate_callback: public uilist_callback
if( !mdata.cancels.empty() ) {
line2++;
mvwprintz( menu->window, point( startx, line2 ), c_light_gray, _( "Cancels:" ) );
- for( auto &j : mdata.cancels ) {
+ for( const trait_id &j : mdata.cancels ) {
mvwprintz( menu->window, point( startx + 11, line2 ), mcolor( j ),
mutation_branch::get_name( j ) );
line2++;
@@ -136,7 +136,7 @@ class wish_mutate_callback: public uilist_callback
if( !mdata.replacements.empty() ) {
line2++;
mvwprintz( menu->window, point( startx, line2 ), c_light_gray, _( "Becomes:" ) );
- for( auto &j : mdata.replacements ) {
+ for( const trait_id &j : mdata.replacements ) {
mvwprintz( menu->window, point( startx + 11, line2 ), mcolor( j ),
mutation_branch::get_name( j ) );
line2++;
@@ -390,7 +390,7 @@ void debug_menu::wishmonster( const cata::optional &p )
wmenu.callback = &cb;
int i = 0;
- for( const auto &montype : MonsterGenerator::generator().get_all_mtypes() ) {
+ for( const mtype &montype : MonsterGenerator::generator().get_all_mtypes() ) {
wmenu.addentry( i, true, 0, montype.nname() );
wmenu.entries[i].extratxt.txt = montype.sym;
wmenu.entries[i].extratxt.color = montype.color;
From 838e6172663446b28186a0e94db353a97cdc5e27 Mon Sep 17 00:00:00 2001
From: Reed Schrier
Date: Mon, 14 Oct 2019 18:12:33 -0700
Subject: [PATCH 43/86] Fix pull request template misleading formatting
(#34763)
The purpose of change section has triple backticks around the "Fixes #XXXXX" in the comments. This causes misformatting of PRs.
---
.github/pull_request_template.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 31f3cceeb769d..aae7c6a86c06f 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -32,9 +32,9 @@ See the [Changelog Guidelines](https://github.com/CleverRaven/Cataclysm-DDA/blob
#### Purpose of change
From b4ab731ee8f5e2164b8693e475021b267778100f Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Sun, 13 Oct 2019 08:42:35 -0500
Subject: [PATCH 44/86] Martial Arts Rebalance for Taekwondo
---
data/json/martialarts.json | 51 +++++++++++++++++++-------------
data/json/techniques.json | 60 +++++++++++++++++++++++---------------
doc/MARTIALART_JSON.md | 1 +
src/martialarts.cpp | 6 ++++
src/martialarts.h | 1 +
src/melee.cpp | 15 ++++++++++
6 files changed, 89 insertions(+), 45 deletions(-)
diff --git a/data/json/martialarts.json b/data/json/martialarts.json
index 57b09db2767bf..5cda1ec73b63c 100644
--- a/data/json/martialarts.json
+++ b/data/json/martialarts.json
@@ -1258,6 +1258,36 @@
"spear_wood"
]
},
+ {
+ "type": "martial_art",
+ "id": "style_taekwondo",
+ "name": "Taekwondo",
+ "description": "Taekwondo is the national sport of Korea, and was used by the South Korean army in the 20th century. Focused on kicks and so it does not benefit from wielded weapons. It also includes strength training; your blocks absorb extra damage and your attacks do more damage if you are not holding anything.",
+ "initiate": [ "You adopt a narrow fighting stance.", "You adopts a narrow fighting stance." ],
+ "learn_difficulty": 5,
+ "arm_block": 1,
+ "leg_block": 3,
+ "force_unarmed": true,
+ "static_buffs": [
+ {
+ "id": "buff_taekwondo_static",
+ "name": "Taekwondo Stance",
+ "description": "Using your legs to attack allows your hands to be free for better defense.\n\nBlocked damage decreased by 50%% of Strength.",
+ "unarmed_allowed": true,
+ "flat_bonuses": [ [ "block", "str", 0.5 ] ]
+ },
+ {
+ "id": "buff_taekwondo_static2",
+ "name": "Unhindered",
+ "description": "Your attacks are stronger if you are not holding anything in your hands.\n\n+33% bash damage when not using a weapon.",
+ "unarmed_allowed": true,
+ "min_unarmed": 0,
+ "strictly_unarmed": true,
+ "mult_bonuses": [ [ "damage", "bash", 1.33 ] ]
+ }
+ ],
+ "techniques": [ "tec_taekwondo_disarm", "tec_taekwondo_precise", "tec_taekwondo_push", "tec_taekwondo_sweep" ]
+ },
{
"type": "martial_art",
"id": "style_tai_chi",
@@ -1281,27 +1311,6 @@
],
"techniques": [ "tec_taichi_disarm", "tec_taichi_precise" ]
},
- {
- "type": "martial_art",
- "id": "style_taekwondo",
- "name": "Taekwondo",
- "description": "Taekwondo is the national sport of Korea, and was used by the South Korean army in the 20th century. Focused on kicks and so it does not benefit from wielded weapons. It also includes strength training; your blocks absorb extra damage the stronger you are.",
- "initiate": [ "You adopt a narrow fighting stance.", "You adopts a narrow fighting stance." ],
- "learn_difficulty": 5,
- "arm_block": 2,
- "leg_block": 3,
- "force_unarmed": true,
- "static_buffs": [
- {
- "id": "taekwondo_static",
- "name": "Taekwondo",
- "unarmed_allowed": true,
- "flat_bonuses": [ [ "block", "str", 0.5 ] ],
- "description": "Strength decreases damage when blocking."
- }
- ],
- "techniques": [ "tec_taekwondo_precise", "tec_taekwondo_push", "tec_taekwondo_sweep" ]
- },
{
"type": "martial_art",
"id": "style_zui_quan",
diff --git a/data/json/techniques.json b/data/json/techniques.json
index 997d8616a94fd..5ead98b55832e 100644
--- a/data/json/techniques.json
+++ b/data/json/techniques.json
@@ -1353,51 +1353,63 @@
},
{
"type": "technique",
- "id": "tec_taichi_disarm",
- "name": "disarm",
- "min_unarmed": 3,
+ "id": "tec_taekwondo_disarm",
+ "name": "Snatch Weapon",
+ "messages": [ "You snatch %s's weapon", " snatches %s's weapon" ],
+ "min_unarmed": 4,
"unarmed_allowed": true,
- "disarms": true,
- "messages": [ "You disarm %s", " disarms %s" ]
+ "strictly_unarmed": true,
+ "weighting": 2,
+ "take_weapon": true,
+ "mult_bonuses": [ [ "damage", "bash", 0.5 ] ]
},
{
"type": "technique",
- "id": "tec_taichi_precise",
- "name": "precise strike",
- "min_unarmed": 4,
+ "id": "tec_taekwondo_precise",
+ "name": "Axe-kick",
+ "messages": [ "You raise your heel and axe-kick %s", " raises their heel and axe-kicks %s" ],
+ "min_unarmed": 5,
"unarmed_allowed": true,
"crit_tec": true,
- "stun_dur": 2,
- "messages": [ "You strike %s", " strikes %s" ]
+ "stun_dur": 2
},
{
"type": "technique",
- "id": "tec_taekwondo_precise",
- "name": "axe-kick",
+ "id": "tec_taekwondo_push",
+ "name": "Side Kick",
+ "min_unarmed": 0,
+ "unarmed_allowed": true,
+ "messages": [ "You turn slightly and side-kick %s", " turns slightly and side-kicks %s" ],
+ "knockback_dist": 1
+ },
+ {
+ "type": "technique",
+ "id": "tec_taekwondo_sweep",
+ "name": "Sweep Kick",
+ "messages": [ "You crouch low and sweep-kick %s", " crouches low and sweep-kicks %s" ],
"min_unarmed": 2,
"unarmed_allowed": true,
- "crit_tec": true,
- "stun_dur": 2,
- "messages": [ "You axe-kick %s", " axe-kicks %s" ]
+ "crit_ok": true,
+ "down_dur": 1
},
{
"type": "technique",
- "id": "tec_taekwondo_push",
- "name": "side kick",
+ "id": "tec_taichi_disarm",
+ "name": "disarm",
"min_unarmed": 3,
"unarmed_allowed": true,
- "messages": [ "You side-kick %s", " side-kicks %s" ],
- "stun_dur": 1,
- "knockback_dist": 1
+ "disarms": true,
+ "messages": [ "You disarm %s", " disarms %s" ]
},
{
"type": "technique",
- "id": "tec_taekwondo_sweep",
- "name": "sweep kick",
+ "id": "tec_taichi_precise",
+ "name": "precise strike",
"min_unarmed": 4,
"unarmed_allowed": true,
- "messages": [ "You sweep-kick %s", " sweep-kicks %s" ],
- "down_dur": 2
+ "crit_tec": true,
+ "stun_dur": 2,
+ "messages": [ "You strike %s", " strikes %s" ]
},
{
"type": "technique",
diff --git a/doc/MARTIALART_JSON.md b/doc/MARTIALART_JSON.md
index 3c8ed512d54be..34d35f6e51ca2 100644
--- a/doc/MARTIALART_JSON.md
+++ b/doc/MARTIALART_JSON.md
@@ -55,6 +55,7 @@
"down_dur": 2, // Duration that target is downed for
"side_switch": true, // Technique moves the target behind user
"disarms": true, // This technique can disarm the opponent
+"take_weapon": true, // Technique will disarm and equip target's weapon if hands are free
"grab_break": true, // This technique may break a grab against the user
"aoe": "spin", // This technique has an area-of-effect; doesn't work against solo targets
"block_counter": true, // This technique may automatically counterattack on a successful block
diff --git a/src/martialarts.cpp b/src/martialarts.cpp
index e56bf8ea21218..9642909c496af 100644
--- a/src/martialarts.cpp
+++ b/src/martialarts.cpp
@@ -116,6 +116,7 @@ void ma_technique::load( JsonObject &jo, const std::string &src )
optional( jo, was_loaded, "defensive", defensive, false );
optional( jo, was_loaded, "disarms", disarms, false );
+ optional( jo, was_loaded, "take_weapon", take_weapon, false );
optional( jo, was_loaded, "side_switch", side_switch, false );
optional( jo, was_loaded, "dummy", dummy, false );
optional( jo, was_loaded, "dodge_counter", dodge_counter, false );
@@ -516,6 +517,7 @@ ma_technique::ma_technique()
// offensive
disarms = false; // like tec_disarm
+ take_weapon = false; // disarms and equips weapon if hands are free
dodge_counter = false; // like tec_grab
block_counter = false; // like tec_counter
@@ -1309,6 +1311,10 @@ std::string ma_technique::get_description() const
if( disarms ) {
dump << _( "* Will disarm the target" ) << std::endl;
}
+
+ if( take_weapon ) {
+ dump << _( "* Will disarm the target and take their weapon" ) << std::endl;
+ }
return dump.str();
}
diff --git a/src/martialarts.h b/src/martialarts.h
index 43c04ab1c12dc..9b57bc34e307e 100644
--- a/src/martialarts.h
+++ b/src/martialarts.h
@@ -102,6 +102,7 @@ class ma_technique
// offensive
bool disarms; // like tec_disarm
+ bool take_weapon; // disarms and equips weapon if hands are free
bool dodge_counter; // counter move activated on a dodge
bool block_counter; // counter move activated on a block
diff --git a/src/melee.cpp b/src/melee.cpp
index b9ea266f36b4d..f1c119c17cce2 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -1094,6 +1094,10 @@ matec_id player::pick_technique( Creature &t, const item &weap,
continue;
}
+ if( ( tec.take_weapon && ( has_weapon() || !t.has_weapon() ) ) ) {
+ continue;
+ }
+
// Don't apply humanoid-only techniques to non-humanoids
if( tec.human_target && !t.in_species( HUMAN ) ) {
continue;
@@ -1380,6 +1384,17 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
}
}
+ if( technique.take_weapon && !has_weapon() && p != nullptr && p->is_armed() ) {
+ if( p->is_player() ) {
+ add_msg_if_npc( _( " disarms you and takes your weapon!" ) );
+ } else {
+ add_msg_player_or_npc( _( "You disarm %s and take their weapon!" ),
+ _( " disarms %s and takes their weapon!" ),
+ p->name );
+ }
+ wield( p->remove_weapon() );
+ }
+
//AOE attacks, feel free to skip over this lump
if( technique.aoe.length() > 0 ) {
// Remember out moves and stamina
From 53a2ab1342a2e5121fddbf26f3c093192e7627ca Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Sun, 13 Oct 2019 13:52:35 -0500
Subject: [PATCH 45/86] take_weapon has priority over disarm
---
src/melee.cpp | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index f1c119c17cce2..50b8722e2d498 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -1373,16 +1373,6 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
}
player *p = dynamic_cast( &t );
- if( technique.disarms && p != nullptr && p->is_armed() ) {
- g->m.add_item_or_charges( p->pos(), p->remove_weapon() );
- if( p->is_player() ) {
- add_msg_if_npc( _( " disarms you!" ) );
- } else {
- add_msg_player_or_npc( _( "You disarm %s!" ),
- _( " disarms %s!" ),
- p->name );
- }
- }
if( technique.take_weapon && !has_weapon() && p != nullptr && p->is_armed() ) {
if( p->is_player() ) {
@@ -1392,7 +1382,19 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
_( " disarms %s and takes their weapon!" ),
p->name );
}
- wield( p->remove_weapon() );
+ item &it = p->remove_weapon();
+ wield( it );
+ }
+
+ if( technique.disarms && p != nullptr && p->is_armed() ) {
+ g->m.add_item_or_charges( p->pos(), p->remove_weapon() );
+ if( p->is_player() ) {
+ add_msg_if_npc( _( " disarms you!" ) );
+ } else {
+ add_msg_player_or_npc( _( "You disarm %s!" ),
+ _( " disarms %s!" ),
+ p->name );
+ }
}
//AOE attacks, feel free to skip over this lump
From fc169a7759f983d95d75996f7a9349c2a13c8fc4 Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Mon, 14 Oct 2019 09:10:11 -0500
Subject: [PATCH 46/86] Fix for item variable
---
src/melee.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index 50b8722e2d498..bf2781ef3645f 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -1382,7 +1382,7 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
_( " disarms %s and takes their weapon!" ),
p->name );
}
- item &it = p->remove_weapon();
+ item it = p->remove_weapon();
wield( it );
}
From f3efabec3b853079410c020a361504de3ea859a8 Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Mon, 14 Oct 2019 13:44:55 -0500
Subject: [PATCH 47/86] Astyle fix
---
src/melee.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index bf2781ef3645f..cd49069bb8958 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -1379,8 +1379,8 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
add_msg_if_npc( _( " disarms you and takes your weapon!" ) );
} else {
add_msg_player_or_npc( _( "You disarm %s and take their weapon!" ),
- _( " disarms %s and takes their weapon!" ),
- p->name );
+ _( " disarms %s and takes their weapon!" ),
+ p->name );
}
item it = p->remove_weapon();
wield( it );
From c224dbbfb1845b098cc7f1b342704042a013a2c8 Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Mon, 14 Oct 2019 21:27:50 -0500
Subject: [PATCH 48/86] Astyle fix again
---
src/martialarts.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/martialarts.cpp b/src/martialarts.cpp
index 9642909c496af..5a138850d8227 100644
--- a/src/martialarts.cpp
+++ b/src/martialarts.cpp
@@ -1313,7 +1313,8 @@ std::string ma_technique::get_description() const
}
if( take_weapon ) {
- dump << _( "* Will disarm the target and take their weapon" ) << std::endl;
+ dump << _( "* Will disarm the target and take their weapon" ) <<
+ std::endl;
}
return dump.str();
From 2224555f78cc4bb9637e0bec1de0dac4c76242c4 Mon Sep 17 00:00:00 2001
From: barsoosayque
Date: Tue, 15 Oct 2019 10:46:12 +0700
Subject: [PATCH 49/86] mon_centipede looks like mon_centipede_giant
---
data/json/monsters/obsolete.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/json/monsters/obsolete.json b/data/json/monsters/obsolete.json
index bb8bafdb36263..a12dcc9c8cef5 100644
--- a/data/json/monsters/obsolete.json
+++ b/data/json/monsters/obsolete.json
@@ -13,6 +13,7 @@
"material": [ "iflesh" ],
"symbol": ".",
"color": "brown",
+ "looks_like": "mon_centipede_giant",
"melee_cut": 0,
"dodge": 1,
"harvest": "arachnid",
From 9a289d18bd8b221f8d6468a628e569dba1a134fd Mon Sep 17 00:00:00 2001
From: NotFuji <38316883+NotFuji@users.noreply.github.com>
Date: Tue, 15 Oct 2019 04:47:39 -0500
Subject: [PATCH 50/86] Fuji's Military Professions Mod (#34767)
---
data/mods/Fuji_Mil_Prof/modinfo.json | 11 +
data/mods/Fuji_Mil_Prof/npc/NC_ARMY.json | 138 ++++++++++++
data/mods/Fuji_Mil_Prof/npc/NC_OPS.json | 155 ++++++++++++++
data/mods/Fuji_Mil_Prof/npc/classes.json | 38 ++++
data/mods/Fuji_Mil_Prof/prof/army.json | 183 ++++++++++++++++
.../Fuji_Mil_Prof/prof/itemgroups_prof.json | 53 +++++
data/mods/Fuji_Mil_Prof/prof/spc.json | 197 ++++++++++++++++++
7 files changed, 775 insertions(+)
create mode 100644 data/mods/Fuji_Mil_Prof/modinfo.json
create mode 100644 data/mods/Fuji_Mil_Prof/npc/NC_ARMY.json
create mode 100644 data/mods/Fuji_Mil_Prof/npc/NC_OPS.json
create mode 100644 data/mods/Fuji_Mil_Prof/npc/classes.json
create mode 100644 data/mods/Fuji_Mil_Prof/prof/army.json
create mode 100644 data/mods/Fuji_Mil_Prof/prof/itemgroups_prof.json
create mode 100644 data/mods/Fuji_Mil_Prof/prof/spc.json
diff --git a/data/mods/Fuji_Mil_Prof/modinfo.json b/data/mods/Fuji_Mil_Prof/modinfo.json
new file mode 100644
index 0000000000000..aabdbbe256f01
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/modinfo.json
@@ -0,0 +1,11 @@
+[
+ {
+ "type": "MOD_INFO",
+ "ident": "fuji_mpp",
+ "name": "Fuji's Military Profession Pack",
+ "authors": [ "Fuji" ],
+ "description": "Numerous military themed professions",
+ "category": "rebalance",
+ "dependencies": [ "dda" ]
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/npc/NC_ARMY.json b/data/mods/Fuji_Mil_Prof/npc/NC_ARMY.json
new file mode 100644
index 0000000000000..5ee4d145154a0
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/npc/NC_ARMY.json
@@ -0,0 +1,138 @@
+[
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_pants_male",
+ "items": [ [ "pants_army", 90 ], [ "pants_cargo", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_pants_female",
+ "items": [ [ "pants_army", 90 ], [ "pants_cargo", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_shirt_male",
+ "items": [ [ "tshirt", 20 ], [ "polo_shirt", 20 ], [ "dress_shirt", 20 ], [ "tank_top", 20 ], [ "longshirt", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_shirt_female",
+ "items": [ [ "tshirt", 20 ], [ "polo_shirt", 20 ], [ "dress_shirt", 20 ], [ "tank_top", 20 ], [ "longshirt", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_gloves",
+ "items": [ [ "null", 50 ], [ "gloves_tactical", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_coat",
+ "items": [
+ [ "null", 60 ],
+ [ "jacket_army", 40 ],
+ [ "modularveststeel", 10 ],
+ [ "modularvestceramic", 40 ],
+ [ "kevlar", 20 ],
+ [ "chestrig", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_shoes",
+ "items": [ [ "boots_combat", 100 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_masks",
+ "items": [ [ "null", 60 ], [ "keffiyeh", 30 ], [ "mask_gas", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_eyes",
+ "items": [ [ "null", 40 ], [ "glasses_bal", 50 ], [ "sunglasses", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_hat",
+ "items": [ [ "null", 40 ], [ "hat_ball", 10 ], [ "tac_helmet", 30 ], [ "helmet_army", 10 ], [ "hat_boonie", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_extra",
+ "items": [ [ "null", 30 ], [ "rucksack", 70 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_bashing",
+ "items": [
+ [ "hammer", 20 ],
+ [ "wrench", 20 ],
+ [ "hammer_sledge", 20 ],
+ [ "pipe", 20 ],
+ [ "baton-extended", 20 ],
+ [ "crowbar", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_cutting",
+ "items": [
+ [ "knife_butcher", 20 ],
+ [ "hatchet", 20 ],
+ [ "knife_combat", 20 ],
+ [ "machete", 20 ],
+ [ "knife_combat", 20 ],
+ [ "diveknife", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_stabbing",
+ "items": [ [ "spear_knife", 50 ], [ "spear_steel", 10 ], [ "spear_forked", 10 ], [ "spear_rebar", 5 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_throw",
+ "items": [ [ "throwing_knife", 50 ], [ "throwing_axe", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_archery",
+ "items": [ [ "crossbow", 5 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_pistols",
+ "items": [ [ "m1911", 30 ], [ "m9", 70 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_shotgun",
+ "items": [ [ "mossberg_500", 25 ], [ "remington_870", 25 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_smg",
+ "items": [ [ "hk_mp5", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_rifle",
+ "items": [ [ "m4a1", 50 ], [ "m14ebr", 35 ], [ "m249", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_launcher",
+ "items": [ [ "mgl", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_weapon_random",
+ "items": [ [ "q_staff", 100 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_ARMY_misc",
+ "items": [ [ "grenade", 40 ], [ "ref_lighter", 30 ], [ "lighter", 30 ], [ "matches", 30 ] ]
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/npc/NC_OPS.json b/data/mods/Fuji_Mil_Prof/npc/NC_OPS.json
new file mode 100644
index 0000000000000..35075edc3b6b2
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/npc/NC_OPS.json
@@ -0,0 +1,155 @@
+[
+ {
+ "type": "item_group",
+ "id": "NC_OPS_pants_male",
+ "items": [ [ "pants_army", 20 ], [ "pants_cargo", 50 ], [ "jeans", 30 ], [ "shorts_cargo", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_pants_female",
+ "items": [ [ "pants_army", 20 ], [ "pants_cargo", 50 ], [ "jeans", 30 ], [ "shorts_cargo", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_shirt_male",
+ "items": [
+ [ "tshirt", 20 ],
+ [ "polo_shirt", 20 ],
+ [ "dress_shirt", 20 ],
+ [ "tank_top", 20 ],
+ [ "longshirt", 20 ],
+ [ "hoodie", 40 ],
+ [ "sweatshirt", 40 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_shirt_female",
+ "items": [
+ [ "tshirt", 20 ],
+ [ "polo_shirt", 20 ],
+ [ "dress_shirt", 20 ],
+ [ "tank_top", 20 ],
+ [ "longshirt", 20 ],
+ [ "hoodie", 40 ],
+ [ "sweatshirt", 40 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_gloves",
+ "items": [ [ "null", 50 ], [ "gloves_tactical", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_coat",
+ "items": [
+ [ "null", 60 ],
+ [ "jacket_army", 40 ],
+ [ "cloak", 20 ],
+ [ "modularveststeel", 10 ],
+ [ "modularvestceramic", 40 ],
+ [ "kevlar", 20 ],
+ [ "chestrig", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_shoes",
+ "items": [ [ "boots_combat", 100 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_masks",
+ "items": [ [ "null", 60 ], [ "keffiyeh", 30 ], [ "mask_gas", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_eyes",
+ "items": [ [ "null", 40 ], [ "glasses_bal", 50 ], [ "sunglasses", 20 ], [ "fancy_sunglasses", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_hat",
+ "items": [ [ "null", 20 ], [ "hat_ball", 50 ], [ "tac_helmet", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_extra",
+ "items": [ [ "null", 30 ], [ "rucksack", 70 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_bashing",
+ "items": [
+ [ "hammer", 20 ],
+ [ "wrench", 20 ],
+ [ "hammer_sledge", 20 ],
+ [ "pipe", 20 ],
+ [ "baton-extended", 20 ],
+ [ "crowbar", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_cutting",
+ "items": [
+ [ "knife_butcher", 20 ],
+ [ "hatchet", 20 ],
+ [ "knife_combat", 20 ],
+ [ "machete", 20 ],
+ [ "knife_combat", 20 ],
+ [ "diveknife", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_stabbing",
+ "items": [ [ "spear_knife", 50 ], [ "spear_steel", 10 ], [ "spear_forked", 10 ], [ "spear_rebar", 5 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_throw",
+ "items": [ [ "throwing_knife", 50 ], [ "throwing_axe", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_archery",
+ "items": [ [ "crossbow", 5 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_pistols",
+ "items": [ [ "m1911", 70 ], [ "fn57", 50 ], [ "m9", 30 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_shotgun",
+ "items": [ [ "mossberg_500", 25 ], [ "remington_870", 25 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_smg",
+ "items": [ [ "hk_mp5", 50 ], [ "hk_mp7", 30 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_rifle",
+ "items": [ [ "m4a1", 50 ], [ "m14ebr", 35 ], [ "m249", 20 ], [ "h&k416a5", 50 ], [ "M24", 35 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_launcher",
+ "items": [ [ "mgl", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_weapon_random",
+ "items": [ [ "q_staff", 100 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "NC_OPS_misc",
+ "items": [ [ "grenade", 40 ], [ "ref_lighter", 30 ], [ "lighter", 30 ], [ "matches", 30 ] ]
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/npc/classes.json b/data/mods/Fuji_Mil_Prof/npc/classes.json
new file mode 100644
index 0000000000000..00bf3c5afd3ca
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/npc/classes.json
@@ -0,0 +1,38 @@
+[
+ {
+ "type": "npc_class",
+ "id": "NC_ARMY",
+ "name": "Soldier",
+ "job_description": "I'm just here for the paycheck.",
+ "common": true,
+ "bonus_str": { "rng": [ 0, 2 ] },
+ "bonus_dex": { "one_in": 2 },
+ "bonus_int": { "rng": [ 0, -2 ] },
+ "skills": [
+ { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -3 } ] } },
+ { "skill": "dodge", "bonus": { "rng": [ 1, 2 ] } },
+ { "skill": "melee", "bonus": { "rng": [ 1, 2 ] } },
+ { "skill": "unarmed", "bonus": { "rng": [ 1, 2 ] } },
+ { "skill": "rifle", "bonus": { "rng": [ 3, 5 ] } },
+ { "skill": "gun", "bonus": { "rng": [ 2, 4 ] } }
+ ]
+ },
+ {
+ "type": "npc_class",
+ "id": "NC_OPS",
+ "name": "Operator",
+ "job_description": "I'm just here for the paycheck.",
+ "common": true,
+ "bonus_str": { "rng": [ 0, 2 ] },
+ "bonus_dex": { "one_in": 2 },
+ "bonus_int": { "rng": [ 0, 2 ] },
+ "skills": [
+ { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -3 } ] } },
+ { "skill": "dodge", "bonus": { "rng": [ 1, 4 ] } },
+ { "skill": "melee", "bonus": { "rng": [ 1, 4 ] } },
+ { "skill": "unarmed", "bonus": { "rng": [ 1, 4 ] } },
+ { "skill": "rifle", "bonus": { "rng": [ 3, 8 ] } },
+ { "skill": "gun", "bonus": { "rng": [ 2, 6 ] } }
+ ]
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/prof/army.json b/data/mods/Fuji_Mil_Prof/prof/army.json
new file mode 100644
index 0000000000000..41b7ca7ae2dcc
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/prof/army.json
@@ -0,0 +1,183 @@
+[
+ {
+ "type": "profession",
+ "ident": "mil_rifleman",
+ "name": "Military Rifleman",
+ "description": "Frontline infantry, frontline infantry, frontline infantry, frontline infantry.",
+ "points": 2,
+ "skills": [ { "level": 1, "name": "survival" }, { "level": 1, "name": "gun" }, { "level": 1, "name": "rifle" } ],
+ "items": {
+ "both": {
+ "items": [
+ "tac_helmet",
+ "jacket_army",
+ "pants_army",
+ "longshirt",
+ "rucksack",
+ "glasses_bal",
+ "dump_pouch",
+ "knee_pads",
+ "elbow_pads",
+ "socks",
+ "boots_combat",
+ "gloves_tactical"
+ ],
+ "entries": [
+ { "item": "m4a1", "ammo-item": "556", "charges": 30, "contents-item": [ "shoulder_strap", "acog_scope", "grip" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "modularvestceramic", "contents-group": "army_mags_m4" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_marksman",
+ "name": "Military Marksman",
+ "description": "You like to think you're a real sniper, but really you're just infantry with a bigger gun.",
+ "points": 4,
+ "skills": [ { "level": 1, "name": "survival" }, { "level": 2, "name": "gun" }, { "level": 2, "name": "rifle" } ],
+ "items": {
+ "both": {
+ "items": [
+ "hat_boonie",
+ "jacket_army",
+ "pants_army",
+ "longshirt",
+ "rucksack",
+ "knee_pads",
+ "elbow_pads",
+ "socks",
+ "boots_combat",
+ "gloves_tactical"
+ ],
+ "entries": [
+ { "item": "m14ebr", "ammo-item": "762_51", "charges": 20, "contents-item": [ "acog_scope", "shoulder_strap", "bipod" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "modularvestceramic", "contents-group": "army_mags_m14" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_auto_rifleman",
+ "name": "Military Automatic Rifleman",
+ "description": "S stands for suppressing fire!",
+ "points": 3,
+ "skills": [ { "level": 1, "name": "survival" }, { "level": 1, "name": "gun" }, { "level": 1, "name": "rifle" } ],
+ "items": {
+ "both": {
+ "items": [
+ "pants_army",
+ "tank_top",
+ "modularvestceramic",
+ "glasses_bal",
+ "knee_pads",
+ "elbow_pads",
+ "socks",
+ "boots_combat",
+ "gloves_tactical"
+ ],
+ "entries": [
+ { "item": "m249", "ammo-item": "556", "charges": 200, "contents-item": [ "shoulder_strap", "holo_sight", "bipod" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "556", "charges": 200, "container-item": "belt223" },
+ { "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_grenadier",
+ "name": "Military Grenadier",
+ "description": "There's no kill like overkill.",
+ "points": 3,
+ "skills": [
+ { "level": 1, "name": "survival" },
+ { "level": 1, "name": "gun" },
+ { "level": 1, "name": "rifle" },
+ { "level": 1, "name": "launcher" }
+ ],
+ "items": {
+ "both": {
+ "items": [
+ "tac_helmet",
+ "pants_army",
+ "tshirt",
+ "rucksack",
+ "glasses_bal",
+ "dump_pouch",
+ "knee_pads",
+ "elbow_pads",
+ "socks",
+ "boots_combat",
+ "gloves_tactical"
+ ],
+ "entries": [
+ { "item": "m4a1", "ammo-item": "556", "charges": 30, "contents-item": [ "shoulder_strap", "holo_sight", "m203" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "modularvestceramic", "contents-group": "army_mags_m4" },
+ { "item": "40mm_frag", "charges": 4, "container-item": "grenade_pouch" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_breacher",
+ "name": "Military Breacher",
+ "description": "Doors and windows everywhere dare not speak your name.",
+ "points": 3,
+ "skills": [
+ { "level": 1, "name": "survival" },
+ { "level": 1, "name": "gun" },
+ { "level": 1, "name": "shotgun" },
+ { "level": 1, "name": "melee" },
+ { "level": 1, "name": "bashing" }
+ ],
+ "items": {
+ "both": {
+ "items": [
+ "tac_fullhelmet",
+ "pants_army",
+ "tshirt",
+ "modularveststeel",
+ "armguard_hard",
+ "legguard_hard",
+ "grenadebandolier",
+ "flashbang",
+ "flashbang",
+ "socks",
+ "boots_combat",
+ "gloves_tactical",
+ "hammer_sledge"
+ ],
+ "entries": [
+ { "item": "mossberg_500", "ammo-item": "shot_00", "charges": 8, "contents-item": [ "shoulder_strap" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "shot_00", "charges": 12, "container-item": "bandolier_shotgun" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/prof/itemgroups_prof.json b/data/mods/Fuji_Mil_Prof/prof/itemgroups_prof.json
new file mode 100644
index 0000000000000..4e705e6bf5c0c
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/prof/itemgroups_prof.json
@@ -0,0 +1,53 @@
+[
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "holster_supp_MEU",
+ "entries": [ { "item": "m1911_MEU", "ammo-item": "45_acp", "charges": 7, "contents-item": [ "suppressor" ] } ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "army_mags_1911",
+ "entries": [
+ { "item": "m1911mag", "ammo-item": "45_acp", "charges": 7 },
+ { "item": "m1911mag", "ammo-item": "45_acp", "charges": 7 }
+ ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "army_mags_300blk",
+ "entries": [
+ { "item": "stanag30", "ammo-item": "300blk_ss", "charges": 30 },
+ { "item": "stanag30", "ammo-item": "300blk_ss", "charges": 30 }
+ ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "army_mags_mp7",
+ "entries": [ { "item": "hk46mag", "ammo-item": "46mm", "charges": 20 }, { "item": "hk46mag", "ammo-item": "46mm", "charges": 20 } ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "holster_supp_57",
+ "entries": [ { "item": "fn57", "ammo-item": "57mm", "charges": 20, "contents-item": [ "suppressor" ] } ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "army_mags_57",
+ "entries": [ { "item": "fn57mag", "ammo-item": "57mm", "charges": 20 }, { "item": "fn57mag", "ammo-item": "57mm", "charges": 20 } ]
+ },
+ {
+ "type": "item_group",
+ "subtype": "collection",
+ "id": "army_mags_m14",
+ "entries": [
+ { "item": "m14mag", "ammo-item": "762_51", "charges": 20 },
+ { "item": "m14mag", "ammo-item": "762_51", "charges": 20 }
+ ]
+ }
+]
diff --git a/data/mods/Fuji_Mil_Prof/prof/spc.json b/data/mods/Fuji_Mil_Prof/prof/spc.json
new file mode 100644
index 0000000000000..b43824c48343f
--- /dev/null
+++ b/data/mods/Fuji_Mil_Prof/prof/spc.json
@@ -0,0 +1,197 @@
+[
+ {
+ "type": "profession",
+ "ident": "mil_operator",
+ "name": "Operator Recon",
+ "description": "The only easy day was yesterday.",
+ "points": 4,
+ "skills": [
+ { "level": 2, "name": "survival" },
+ { "level": 2, "name": "gun" },
+ { "level": 2, "name": "rifle" },
+ { "level": 1, "name": "melee" }
+ ],
+ "items": {
+ "both": {
+ "items": [
+ "tac_helmet",
+ "keffiyeh",
+ "sweatshirt",
+ "pants_cargo",
+ "longshirt",
+ "rucksack",
+ "glasses_bal",
+ "dump_pouch",
+ "socks",
+ "boots_combat",
+ "gloves_tactical",
+ "diving_watch"
+ ],
+ "entries": [
+ {
+ "item": "acr_300blk",
+ "ammo-item": "300blk_ss",
+ "charges": 30,
+ "contents-item": [ "shoulder_strap", "acog_scope", "grip", "suppressor" ]
+ },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "modularvestceramic", "contents-group": "army_mags_300blk" },
+ { "item": "knife_rambo", "container-item": "scabbard" },
+ { "item": "holster", "contents-group": "holster_supp_MEU" },
+ { "item": "legpouch_large", "contents-group": "army_mags_1911" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_sniper",
+ "name": "Operator Sniper",
+ "description": "You spent days dueling an enemy sniper, then he just... died. And then un-died.",
+ "points": 5,
+ "skills": [ { "level": 2, "name": "survival" }, { "level": 4, "name": "gun" }, { "level": 4, "name": "rifle" } ],
+ "items": {
+ "both": {
+ "items": [
+ "hat_cotton",
+ "jacket_army",
+ "pants_army",
+ "longshirt",
+ "rucksack",
+ "knee_pads",
+ "elbow_pads",
+ "socks",
+ "boots_combat",
+ "gloves_tactical",
+ "cloak"
+ ],
+ "entries": [
+ { "item": "M24", "ammo-item": "762_51", "charges": 20, "contents-item": [ "shoulder_strap", "bipod", "suppressor" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "chestrig", "contents-group": "army_mags_m14" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "holster", "contents-group": "holster_supp_MEU" },
+ { "item": "legpouch_large", "contents-group": "army_mags_1911" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_hacker",
+ "name": "Operator Hacker",
+ "description": "You insist you're not a hacker, you're an 'Electronic Warfare Specialist'",
+ "points": 5,
+ "skills": [
+ { "level": 1, "name": "survival" },
+ { "level": 1, "name": "gun" },
+ { "level": 1, "name": "smg" },
+ { "level": 4, "name": "electronics" },
+ { "level": 4, "name": "computer" }
+ ],
+ "items": {
+ "both": {
+ "items": [
+ "hat_ball",
+ "scarf",
+ "hoodie",
+ "pants_cargo",
+ "longshirt",
+ "kevlar",
+ "mbag",
+ "glasses_bal",
+ "dump_pouch",
+ "socks",
+ "boots_combat",
+ "gloves_tactical",
+ "multitool",
+ "diving_watch"
+ ],
+ "entries": [
+ {
+ "item": "hk_mp7",
+ "ammo-item": "46mm",
+ "charges": 20,
+ "contents-item": [ "shoulder_strap", "holo_sight", "suppressor" ]
+ },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "chestrig", "contents-group": "army_mags_mp7" },
+ { "item": "knife_combat", "container-item": "sheath" },
+ { "item": "holster", "contents-group": "holster_supp_MEU" },
+ { "item": "legpouch_large", "contents-group": "army_mags_1911" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_undercover",
+ "name": "Operator Undercover",
+ "description": "You've been tailing your target for months and now he's a zombie. So much for that lead.",
+ "points": 3,
+ "skills": [
+ { "level": 1, "name": "survival" },
+ { "level": 2, "name": "gun" },
+ { "level": 2, "name": "pistol" },
+ { "level": 6, "name": "speech" }
+ ],
+ "items": {
+ "both": {
+ "items": [
+ "scarf",
+ "dress_shirt",
+ "jeans",
+ "longshirt",
+ "kevlar",
+ "mbag",
+ "fancy_sunglasses",
+ "socks",
+ "lowtops",
+ "pockknife",
+ "diving_watch",
+ "smart_phone"
+ ],
+ "entries": [
+ { "item": "holster", "contents-group": "holster_supp_57" },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "legpouch_large", "contents-group": "army_mags_57" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ },
+ {
+ "type": "profession",
+ "ident": "mil_cbrn",
+ "name": "Operator CBRN",
+ "description": "Chemical weapons? Check. Biological outbreak? Check. Nuclear war? Check. Sounds like the perfect job for you!",
+ "points": 5,
+ "skills": [
+ { "level": 1, "name": "survival" },
+ { "level": 1, "name": "gun" },
+ { "level": 1, "name": "smg" },
+ { "level": 4, "name": "cooking" }
+ ],
+ "items": {
+ "both": {
+ "items": [ "anbc_suit", "pants_cargo", "longshirt", "dump_pouch", "socks", "gloves_rubber", "diving_watch" ],
+ "entries": [
+ { "item": "hk_mp5", "ammo-item": "9mm", "charges": 30, "contents-item": [ "shoulder_strap", "suppressor" ] },
+ { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
+ { "item": "modularvestkevlar", "contents-group": "army_mags_mp5" },
+ { "item": "holster", "contents-group": "holster_supp_MEU" },
+ { "item": "legpouch_large", "contents-group": "army_mags_1911" }
+ ]
+ },
+ "male": [ "boxer_shorts" ],
+ "female": [ "boy_shorts", "sports_bra" ]
+ }
+ }
+]
From 2f370dc4d83fed0710774267e52e68e97b4449b8 Mon Sep 17 00:00:00 2001
From: Anton Burmistrov
Date: Tue, 15 Oct 2019 12:48:13 +0300
Subject: [PATCH 51/86] Fixed inactive incendiary grenades not exploding if
thrown in fire (#34769)
* Transformable items with ACT_IN_FIRE and BOMB flags will transform into their "_act" variants and then become active if thrown in fire
* Get rid of hardcoded name and use target item id
---
src/map.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/map.cpp b/src/map.cpp
index b384903fd8188..0531f66297ef4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -4437,6 +4437,11 @@ item &map::add_item( const tripoint &p, item new_item )
}
if( new_item.has_flag( "ACT_IN_FIRE" ) && get_field( p, fd_fire ) != nullptr ) {
+ if( new_item.has_flag( "BOMB" ) && new_item.is_transformable() ) {
+ //Convert a bomb item into its transformable version, e.g. incendiary grenade -> active incendiary grenade
+ new_item.convert( item::find_type( dynamic_cast( item::find_type(
+ new_item.typeId() )->get_use( "transform" )->get_actor_ptr() )->target )->get_id() );
+ }
new_item.active = true;
}
From d9ed5342a1bb113b708e25eeb5dc0aaf5a5c0ae3 Mon Sep 17 00:00:00 2001
From: Valiant
Date: Tue, 15 Oct 2019 13:10:33 +0400
Subject: [PATCH 52/86] Fixed speed indicator overlapping stamina indicator
---
src/panels.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panels.cpp b/src/panels.cpp
index cac5eb710d314..3471d6a376d98 100644
--- a/src/panels.cpp
+++ b/src/panels.cpp
@@ -1591,7 +1591,7 @@ static void draw_health_classic( avatar &u, const catacurses::window &w )
_( "Spd " ) + to_string( u.get_speed() ) );
nc_color move_color = u.movement_mode_is( PMM_WALK ) ? c_white : move_mode_color( u );
std::string move_string = to_string( u.movecounter ) + " " + move_mode_string( u );
- mvwprintz( w, point( 26 + move_string.length(), 5 ), move_color, move_string );
+ mvwprintz( w, point( 29, 5 ), move_color, move_string );
}
// temperature
From 98618542058ec2de185aa9ff9fb224ae730bab74 Mon Sep 17 00:00:00 2001
From: Anton Burmistrov
Date: Tue, 15 Oct 2019 12:49:57 +0300
Subject: [PATCH 53/86] Running/crouching while swimming will result in
faster/slower swim speed (#34770)
* Running movement mode while swimming means faster swim speed
* Swimming speed is now based on movement mode
---
src/player.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/player.cpp b/src/player.cpp
index 21cf364ec2021..20d397618a34a 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -1764,6 +1764,16 @@ int player::swim_speed() const
if( underwater && ret < 500 ) {
ret -= 50;
}
+
+ // Running movement mode while swimming means faster swim style, like crawlstroke
+ if( move_mode == PMM_RUN ) {
+ ret -= 80;
+ }
+ // Crouching movement mode while swimming means slower swim style, like breaststroke
+ if( move_mode == PMM_CROUCH ) {
+ ret += 50;
+ }
+
if( ret < 30 ) {
ret = 30;
}
From 7568ee98a2483e0d83c392815ea037d9e3336fc1 Mon Sep 17 00:00:00 2001
From: Alex Mooney
Date: Mon, 14 Oct 2019 16:16:14 -0700
Subject: [PATCH 54/86] Fix disabled limb check for bicycles
---
src/vehicle_use.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp
index b3bcd06ec0365..521aec7087164 100644
--- a/src/vehicle_use.cpp
+++ b/src/vehicle_use.cpp
@@ -854,10 +854,10 @@ bool vehicle::start_engine( const int e )
if( out_of_fuel ) {
if( einfo.fuel_type == fuel_type_muscle ) {
// Muscle engines cannot start with broken limbs
- if( einfo.has_flag( "MUSCLE_ARMS" ) && ( g->u.get_working_arm_count() >= 2 ) ) {
+ if( einfo.has_flag( "MUSCLE_ARMS" ) && ( g->u.get_working_arm_count() < 2 ) ) {
add_msg( _( "You cannot use %s with a broken arm." ), eng.name() );
return false;
- } else if( einfo.has_flag( "MUSCLE_LEGS" ) && ( g->u.get_working_leg_count() >= 2 ) ) {
+ } else if( einfo.has_flag( "MUSCLE_LEGS" ) && ( g->u.get_working_leg_count() < 2 ) ) {
add_msg( _( "You cannot use %s with a broken leg." ), eng.name() );
return false;
}
From 4e3ab7675cbcef65af03f6c351683e2f1617c406 Mon Sep 17 00:00:00 2001
From: snipercup <50166150+snipercup@users.noreply.github.com>
Date: Mon, 14 Oct 2019 21:12:55 +0200
Subject: [PATCH 55/86] add tele_sight to itemgroups
---
data/json/itemgroups/gunmod.json | 1 +
data/json/itemgroups/item_groups.json | 2 ++
data/json/npcs/NC_JUNK_SHOPKEEP.json | 1 +
data/json/npcs/items_generic.json | 1 +
.../surface_staff/NPC_free_merchant_shopkeep.json | 1 +
5 files changed, 6 insertions(+)
diff --git a/data/json/itemgroups/gunmod.json b/data/json/itemgroups/gunmod.json
index 7e696b6f7757f..6ec2ce3350553 100644
--- a/data/json/itemgroups/gunmod.json
+++ b/data/json/itemgroups/gunmod.json
@@ -6,6 +6,7 @@
"items": [
[ "brass_catcher", 100 ],
[ "improve_sights", 60 ],
+ [ "tele_sight", 40 ],
[ "muzzle_brake", 20 ],
[ "pistol_grip", 30 ],
[ "rifle_scope", 30 ],
diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json
index 29725dd76dc0b..795fa571c3be6 100644
--- a/data/json/itemgroups/item_groups.json
+++ b/data/json/itemgroups/item_groups.json
@@ -7346,6 +7346,7 @@
[ "8mm_fmj", 2 ],
[ "laser_rifle", 1 ],
[ "rm103a_pistol", 1 ],
+ [ "tele_sight", 17 ],
[ "laser_sight", 15 ],
[ "rail_laser_sight", 10 ],
[ "8mm_inc", 2 ],
@@ -7714,6 +7715,7 @@
[ "mininuke", 1 ],
[ "crack", 8 ],
[ "crackpipe", 37 ],
+ [ "tele_sight", 17 ],
[ "laser_sight", 15 ],
[ "rail_laser_sight", 10 ],
[ "lsd", 10 ],
diff --git a/data/json/npcs/NC_JUNK_SHOPKEEP.json b/data/json/npcs/NC_JUNK_SHOPKEEP.json
index 1b8d90406d71a..d874ffce0dd13 100644
--- a/data/json/npcs/NC_JUNK_SHOPKEEP.json
+++ b/data/json/npcs/NC_JUNK_SHOPKEEP.json
@@ -144,6 +144,7 @@
[ "rifle_scope", 20 ],
[ "pistol_scope", 10 ],
[ "improve_sights", 20 ],
+ [ "tele_sight", 15 ],
[ "combatsaw_off", 5 ],
[ "firemachete_off", 5 ],
[ "shishkebab_off", 5 ],
diff --git a/data/json/npcs/items_generic.json b/data/json/npcs/items_generic.json
index 4df523369e68c..9bb3e6795c39b 100644
--- a/data/json/npcs/items_generic.json
+++ b/data/json/npcs/items_generic.json
@@ -625,6 +625,7 @@
[ "howto_traps", 2 ],
[ "imperial_stout", 2 ],
[ "improve_sights", 1 ],
+ [ "tele_sight", 1 ],
[ "india_pale_ale", 2 ],
[ "inhaler", 5 ],
[ "iodine", 5 ],
diff --git a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
index 867e05c2bf345..4b506f8cf5004 100644
--- a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
+++ b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
@@ -198,6 +198,7 @@
[ "arrow_metal", 25 ],
[ "bolt_steel", 10 ],
[ "laser_sight", 15 ],
+ [ "tele_sight", 20 ],
[ "rail_laser_sight", 10 ],
[ "rifle_scope", 20 ],
[ "pistol_scope", 10 ],
From ef1560248b150d865fb501b1998a744e08cbab6a Mon Sep 17 00:00:00 2001
From: y2s82 <1997371+y2s82@users.noreply.github.com>
Date: Mon, 14 Oct 2019 13:23:52 -0400
Subject: [PATCH 56/86] changed celery volume to better reflect the
mass-to-volume ratio in real life
---
data/json/items/comestibles/raw_veggy.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/json/items/comestibles/raw_veggy.json b/data/json/items/comestibles/raw_veggy.json
index 35c59677a353f..8791f67e037ab 100644
--- a/data/json/items/comestibles/raw_veggy.json
+++ b/data/json/items/comestibles/raw_veggy.json
@@ -193,7 +193,7 @@
"description": "Neither tasty nor very nutritious, but it goes well with salad.",
"price": 200,
"material": "veggy",
- "volume": "250 ml",
+ "volume": "1000 ml",
"flags": [ "FREEZERBURN", "SMOKABLE" ],
"smoking_result": "dry_veggy",
"vitamins": [ [ "vitA", 3 ], [ "vitC", 4 ], [ "calcium", 4 ], [ "iron", 1 ] ]
From 32f1ef1049c38aaa34a8175358f24af80a00936d Mon Sep 17 00:00:00 2001
From: ZhilkinSerg
Date: Tue, 15 Oct 2019 16:40:47 +0300
Subject: [PATCH 57/86] Revert "add tele_sight to itemgroups"
---
data/json/itemgroups/gunmod.json | 1 -
data/json/itemgroups/item_groups.json | 2 --
data/json/npcs/NC_JUNK_SHOPKEEP.json | 1 -
data/json/npcs/items_generic.json | 1 -
.../surface_staff/NPC_free_merchant_shopkeep.json | 1 -
5 files changed, 6 deletions(-)
diff --git a/data/json/itemgroups/gunmod.json b/data/json/itemgroups/gunmod.json
index 6ec2ce3350553..7e696b6f7757f 100644
--- a/data/json/itemgroups/gunmod.json
+++ b/data/json/itemgroups/gunmod.json
@@ -6,7 +6,6 @@
"items": [
[ "brass_catcher", 100 ],
[ "improve_sights", 60 ],
- [ "tele_sight", 40 ],
[ "muzzle_brake", 20 ],
[ "pistol_grip", 30 ],
[ "rifle_scope", 30 ],
diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json
index 795fa571c3be6..29725dd76dc0b 100644
--- a/data/json/itemgroups/item_groups.json
+++ b/data/json/itemgroups/item_groups.json
@@ -7346,7 +7346,6 @@
[ "8mm_fmj", 2 ],
[ "laser_rifle", 1 ],
[ "rm103a_pistol", 1 ],
- [ "tele_sight", 17 ],
[ "laser_sight", 15 ],
[ "rail_laser_sight", 10 ],
[ "8mm_inc", 2 ],
@@ -7715,7 +7714,6 @@
[ "mininuke", 1 ],
[ "crack", 8 ],
[ "crackpipe", 37 ],
- [ "tele_sight", 17 ],
[ "laser_sight", 15 ],
[ "rail_laser_sight", 10 ],
[ "lsd", 10 ],
diff --git a/data/json/npcs/NC_JUNK_SHOPKEEP.json b/data/json/npcs/NC_JUNK_SHOPKEEP.json
index d874ffce0dd13..1b8d90406d71a 100644
--- a/data/json/npcs/NC_JUNK_SHOPKEEP.json
+++ b/data/json/npcs/NC_JUNK_SHOPKEEP.json
@@ -144,7 +144,6 @@
[ "rifle_scope", 20 ],
[ "pistol_scope", 10 ],
[ "improve_sights", 20 ],
- [ "tele_sight", 15 ],
[ "combatsaw_off", 5 ],
[ "firemachete_off", 5 ],
[ "shishkebab_off", 5 ],
diff --git a/data/json/npcs/items_generic.json b/data/json/npcs/items_generic.json
index 9bb3e6795c39b..4df523369e68c 100644
--- a/data/json/npcs/items_generic.json
+++ b/data/json/npcs/items_generic.json
@@ -625,7 +625,6 @@
[ "howto_traps", 2 ],
[ "imperial_stout", 2 ],
[ "improve_sights", 1 ],
- [ "tele_sight", 1 ],
[ "india_pale_ale", 2 ],
[ "inhaler", 5 ],
[ "iodine", 5 ],
diff --git a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
index 4b506f8cf5004..867e05c2bf345 100644
--- a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
+++ b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_shopkeep.json
@@ -198,7 +198,6 @@
[ "arrow_metal", 25 ],
[ "bolt_steel", 10 ],
[ "laser_sight", 15 ],
- [ "tele_sight", 20 ],
[ "rail_laser_sight", 10 ],
[ "rifle_scope", 20 ],
[ "pistol_scope", 10 ],
From 5733a0e18238e706064014dae7a6f24f84c696c6 Mon Sep 17 00:00:00 2001
From: ZhilkinSerg
Date: Tue, 15 Oct 2019 16:43:17 +0300
Subject: [PATCH 58/86] Fix astyle regression (2019-10-15) (#34772)
* Fix astyle regression
* Simplify boolean expression
---
src/item.cpp | 6 +-----
src/martialarts.cpp | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/item.cpp b/src/item.cpp
index a7c7003d9ae7b..aff624fbe8e3f 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -7067,11 +7067,7 @@ bool item::burn( fire_data &frd )
( 3.0 * type->volume ) );
}
- if( charges <= 0 ) {
- return true;
- } else {
- return false;
- }
+ return charges <= 0;
}
if( is_corpse() ) {
diff --git a/src/martialarts.cpp b/src/martialarts.cpp
index 5a138850d8227..19a2dac2bb465 100644
--- a/src/martialarts.cpp
+++ b/src/martialarts.cpp
@@ -1311,7 +1311,7 @@ std::string ma_technique::get_description() const
if( disarms ) {
dump << _( "* Will disarm the target" ) << std::endl;
}
-
+
if( take_weapon ) {
dump << _( "* Will disarm the target and take their weapon" ) <<
std::endl;
From 588654dfe3605ed96a4f7d6c33a2ad9483b75076 Mon Sep 17 00:00:00 2001
From: ipcyborg
Date: Mon, 14 Oct 2019 16:55:00 +0300
Subject: [PATCH 59/86] Check for duplicate entries in active_npc before
inserting.
---
src/game.cpp | 8 ++++++++
src/game.h | 2 +-
src/overmapbuffer.cpp | 2 +-
src/overmapbuffer.h | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/game.cpp b/src/game.cpp
index 56c8eabb767db..b6bdba3cc0a04 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -869,6 +869,14 @@ void game::load_npcs()
// uses submap coordinates
std::vector> just_added;
for( const auto &temp : overmap_buffer.get_npcs_near_player( radius ) ) {
+ const character_id &id = temp->getID();
+ const auto found = std::find_if( active_npc.begin(), active_npc.end(),
+ [id]( const std::shared_ptr &n ) {
+ return n->getID() == id;
+ } );
+ if( found != active_npc.end() ) {
+ continue;
+ }
if( temp->is_active() ) {
continue;
}
diff --git a/src/game.h b/src/game.h
index c2af5856f306f..9b2dd058aa3de 100644
--- a/src/game.h
+++ b/src/game.h
@@ -1011,7 +1011,7 @@ class game
bool safe_mode_warning_logged;
bool bVMonsterLookFire;
character_id next_npc_id;
- std::vector> active_npc;
+ std::list> active_npc;
int next_mission_id;
std::set follower_ids; // Keep track of follower NPC IDs
int moves_since_last_save;
diff --git a/src/overmapbuffer.cpp b/src/overmapbuffer.cpp
index 4d14fb3361692..2e4ceae5c79dd 100644
--- a/src/overmapbuffer.cpp
+++ b/src/overmapbuffer.cpp
@@ -1003,7 +1003,7 @@ void overmapbuffer::insert_npc( const std::shared_ptr &who )
get( npc_om_pos ).insert_npc( who );
}
-std::shared_ptr overmapbuffer::remove_npc( const character_id id )
+std::shared_ptr overmapbuffer::remove_npc( const character_id &id )
{
for( auto &it : overmaps ) {
if( const auto p = it.second->erase_npc( id ) ) {
diff --git a/src/overmapbuffer.h b/src/overmapbuffer.h
index b1cb0e68ba38e..e7b9f9635df72 100644
--- a/src/overmapbuffer.h
+++ b/src/overmapbuffer.h
@@ -255,7 +255,7 @@ class overmapbuffer
* Find npc by id and if found, erase it from the npc list
* and return it ( or return nullptr if not found ).
*/
- std::shared_ptr remove_npc( character_id id );
+ std::shared_ptr remove_npc( const character_id &id );
/**
* Adds the npc to an overmap ( based on the npcs current location )
* and stores it there. The overmap takes ownership of the pointer.
From 7d70f768794f54566902f218334a82172bd58f16 Mon Sep 17 00:00:00 2001
From: Kevin Granade
Date: Tue, 15 Oct 2019 06:48:16 -0700
Subject: [PATCH 60/86] Changelog thru october (#34731)
* Revert "July and August changelogs (#34095)"
This reverts commit 7a20bb6775c4ad74ccb78f406abfb405d4e46916.
* Have changelog generation script consider unmerged PRs too
* Import changelog entries through 10-09
* Copyedit changelog
* Apply suggestions from code review
Add some periods.
Co-Authored-By: ZhilkinSerg
---
data/changelog.txt | 331 ++++++++++++++++++++++++++----------
tools/generate_changelog.py | 2 +-
2 files changed, 245 insertions(+), 88 deletions(-)
diff --git a/data/changelog.txt b/data/changelog.txt
index cfe9ae3bb417b..c7cd20af3ca22 100644
--- a/data/changelog.txt
+++ b/data/changelog.txt
@@ -1,4 +1,4 @@
-# 0.E (2019-08-31)
+# 0.E (2019-10-09)
## Features:
Correctly set liquids as solid when they freeze.
@@ -101,20 +101,59 @@ NPC will say what their current activity is + some infrastructure.
Added ability to splint broken limbs to autodoc.
Factions: start to implement useful faction relationship API.
Riding animals and animal-pulled vehicles.
-Allow quenching fires with any bashing item instead of wielded.
-Add new mission type MGOAL_TALK_TO_NPC.
-Way to manually put out controlled fire in a fireplace.
-Adds skeletal shocker zombies.
-Add furniture that can emit fields.
-Give dynamic NPCs proper overmap pathing/travel.
-Gutter downspouts to act as funnels.
Faction ownership vehicles.
-Implements baffle strikes on suppressors.
-Use zone for designating a firewood source.
-Add new mission/talk effect u_learn_recipe.
-NPC activity rework - farming and generic multi-activity loop.
-Add u_buy_monster talk effect.
+Allow any rope-type item to tie animals up.
+Gutter downspouts to act as funnels.
+Give dynamic NPCs proper overmap pathing/travel.
+Add furniture that can emit fields.
+Way to manually put out controlled fire in a fireplace.
+Add new mission type MGOAL_TALK_TO_NPC.
+Adds vehicle part cargo weight percentage modifier.
+Allow quenching fires with any bashing item instead of wielded.
+Dogs only bark when they see danger.
Pilotable combat and utility mech-suits.
+Custom Filter loot zone.
+Make secubots/turrets drop ammo and a salvageable robot carcass.
+Allow different tiles for mounted creatures.
+Dialogue writers can now directly add missions from JSON.
+Add new MGOAL_CONDITION mission goal.
+Add u/npc_has_skill condition.
+Add new mapgen piece jmapgen_ter_furn_transform.
+Allow player to pick up and handle frozen liquids.
+Set r keybinding to Reload Item instead of a Reload Wielded Item.
+Don't prompt for a direction for an action if there is only one direction possible.
+Show needs in the comestible inventory windows.
+Add u_buy_monster talk effect.
+Eating raw fat has chance of parasites.
+NPC activity rework - farming and generic multi-activity loop.
+Add new mission/talk effect u_learn_recipe.
+Use zone for designating a firewood source.
+Implements baffle strikes on suppressors.
+Add peeking through vehicle curtains.
+NPC Fishing, Chopping logs and trees, and NPC butchery.
+Charge bionics from UPS via Cable Charger System CBM.
+Vehicle deconstruct zone for NPCs to work on.
+Allow animal-drawn vehicles to follow a walking player.
+NPCs: Improve the tactical AI and NPC QoL.
+Adds SPEED option for enchantments.
+Implements Damage Immunity Flags and Effects.
+Add known factions to faction menu.
+DROPS_AMMO monsters will drop their remaining ammo in magazines.
+NPC missions: wrap the mission name in the selector UI.
+Create dynamic micro-factions for dynamic NPCs.
+NPCs: friendly NPCs consume from nearby camp stores.
+Adds a NON_THRESHOLD flag to mutations so they don't count toward thresholds.
+Adds RANDOM_ spell flags for duration, damage, and aoe.
+Adds 'vomit' spell effect.
+Basecamps: Basecamps anywhere.
+Allow NPC to read books and learn on their own.
+Allow NPCs to repair vehicles.
+Allow player to use more multi-zone activities - chopping, deconstructing etc.
+Adds REGEN_MANA and MAX_MANA to available enchantment values.
+Allow martial arts techniques to target humanoids.
+Add querry to stop trying to fall of sleep after 30min of trying.
+Sleeping in a vehicle has the same features as sleeping on furnitures.
+Basecamps: add an emergency recall option.
## Content:
Adds refluffed and modified plasma gun.
@@ -193,24 +232,32 @@ Bathtubs can be used like kegs or water heaters to store liquids.
Added a metal motor boat with a single gasoline engine.
Minefields will spawn only at the entry of the bridges.
Adds in many missing descriptions for furniture and terrain.
+Adds skeletal shocker zombies.
+Prevent martial arts message when not using martial arts.
+Adds new alien terrain types and a basic mi-go encampment map.
Add deployable workspaces, and UI support for them.
-Added several new types of portal environment.
-Adds refluffed and modified plasma gun.
-Change scenarios to be less restrictive and more generic.
-Creates some monsters to inhabit mi-go encampments, adds prisoner NPCs, and adds mi-go camps to map spawns.
-Adds polearm martial arts and one new weapon.
-Adds new basic alien terrain types and a basic mi-go encampment map, does not yet spawn in-game.
-Giant insects spawned from artifacts are now pets. Added CANPLAY flag to JSON to support it.
-Added new "looters" map extra.
-Ensure proper road connections, add subway connector level.
-Add noise vehicle parts deconstruct (muffler, chimes, stereo, beeper).
-Add sixty science fiction book snippets.
-Add mi-go scout tower.
+Added crashed airliner location.
+Added hunting supply store location.
+Add lighthouse.
+Added a new mi-go monster with ranged capabilities.
Adds steel mill location to the game.
-Adds new foes to the collapsed tower.
-Adds new absurdist texts.
-Jsonify sewage treatment plant.
-Adds speedloaders for shotguns.
+Add mi-go scout tower.
+Ensure proper road connections, add subway connector level.
+Some Free Merchant missions will lead to minor changes around the Refugee Center.
+Adds microlabs, small 4x4 labs that open only to the subway network.
+Add Gazoline Fuel Cell CBM.
+Rework secubot into a TALON UGV.
+Added new human corpses types.
+Add a new M240 equipped CROWS II to outposts.
+Adds a new spell that provides invisibility.
+Adds the Hounds of Tindalos, tough Nether monsters that can appear from teleglow.
+Adds new faction camp expansion option, livestock area.
+Gender-specific clothing on corpses.
+Adds new faction expansion: storage house, includes: stone, log, wood panel, scrap metal and wattle/daub palettes.
+Add Grocery bot to carry your groceries.
+Add blackpowder loads for some cartridges.
+Adds some islands for lakes.
+Expand randomly-generated music descriptions.
## Interface:
Corpses (not underwear) will be shown on top at the places of death in map extras.
@@ -251,23 +298,41 @@ Add guidelines to vehicle interface for easier cursor location.
Message cool-down - reduce similar message appearances.
Wait option: Wait until you regain stamina.
Auto-notes for map extras.
-You can now view your missions from the overmap.
-Add otpion to sepia tint remembered tiles instead of simply darkening them.
-Selecting vehicle controls has been made smarter, and it won't prompt you if it doesn't need to.
-Overmap mission UI improvements.
-Adjust malnourishment to use bmi values.
-Adjust mana panel code to only appear when the player knows spells.
Show best tool quality when selecting butchering.
-Show needs in the comestible inventory windows.
-Don't prompt for a direction for an action if there is only one direction possible.
-Allow different tiles for mounted creatures.
-Fixed the Labels sidebar style.
-Custom Filter loot zone.
-Allow mission descriptions to refer to the effects of the mission.
-Implement selective auto note preferences and a manager GUI to modify them.
-Wait til Dawn/Dusk is changed to Daylight/Night.
-Reordering and grouping skills list in @ menu.
+Adjust mana panel code to only appear when the player knows spells.
+Adjust malnourishment to use bmi values.
+Genericize butchery messages for dissectables.
+Overmap mission UI improvements.
+Selecting vehicle controls has been made smarter, and it won't prompt you if it doesn't need to.
+Added an option to position the item pickup panel.
+You can now view your missions from the overmap.
+Make windowed borderless fullscreen mode default on non-curses non-Android versions.
+Debug tool for viewing map radiation.
+Add movement mode coloration to panels, standardize mode letter fetching.
+Tweaked @-menu (player stats description submenu) UI.
+Allow map memory drawing mode selection through options.
+Add new wide labels sidebar layout. refactor many panels functions.
+Items inspected on the trade screen now show their description in addition to stats.
+NPC trades will check for confirmation and inform players if they may not get full value.
Show if monsters and NPCs are aware of the player in their description (visible when x - looking at them).
+Reordering and grouping skills list in @ menu.
+Wait til Dawn/Dusk is changed to Daylight/Night.
+Implement selective auto note preferences and a manager GUI to modify them.
+Allow mission descriptions to refer to the effects of the mission.
+Map editor overhaul.
+Always prompt before climbing or vaulting over terrain.
+Fix water wheels and wind turbines not showing charge rate on vehicle overview.
+Different starving messages for empty and non-empty stomach.
+Replace kills window with new scores window showing additional info.
+Rewrite some corpse descriptions.
+Fixed "add/remove monster from safemode blacklist" text not visible in Look Around mode.
+Show correct info about transform target's fitness.
+Display craft name and % finished on top of screen.
+Remove progress messages in exchange for progress popups. Add progress popup for disassembly.
+Added ability to toggle minimap on and off in Look Around window.
+Add visual indicators for dead zombies that can still revive.
+Add run and crouch colors for the player's symbol in ASCII.
+Display status for all long activities.
## Mods:
Re-adds fictional martial arts as a mod.
@@ -275,10 +340,20 @@ Added Aftershock sci-fi mod.
Adds Mod: Buildable Hydroponics bays as furniture and adds Hydroponics in Labs.
Adds the Magiclysm Mod.
Add graphical mods category, put mods in it.
-Adjust 'fast healing' mod name/description, fix duration data error.
-Magiclysm: Black Dragons and related gear
-Add Stats Through Kills Mod
+Magiclysm: Add magic basement.
+Add Stats Through Kills Mod.
+Adds Bulettes and will-o-wisps to Magiclysm.
+Magiclysm: Multiple Spell Effects.
+Magiclysm: Adds daytime 'troll' monster to forests.
+Magiclysm: Adds demon spiders and a demon spider queen lair.
+Magiclysm: Add Used Bookstore and Nothic.
Add personal and outer aura layers, as well as the intangible flag.
+Spells can now be given a custom message when cast.
+Magiclysm: Adds a new monster - black pudding.
+Add Blood Power Generator CBM to Magiclysm.
+My Sweet Cataclysm adds the ability to play as an humanoid made of sugar.
+Heavy mining mod added. Add a mining car.
+Adult Black Dragon lair.
## Balance:
Remove reinforcement of non-cloth items.
@@ -301,18 +376,15 @@ Player's weight varies with BMI and size.
Nerf outlandish drug effects.
Surgery consumes anesthetic at a rate of 2mL/mn.
Reduce turn time to 1 second.
-Changes game default start date to 30 days after Spring.
-Salvaged CBM needs to be sterilized and re-conditioned.
-Having a threshold mutation prerequisite no longer makes a particular mutation slightly less likely to occur.
-Being grabbed drastically reduce your dodging ability.
+Adjust turrets to reflect real world remote weapon systems.
Vehicle wheels require vehicle mounts.
Armored creatures won't take damage from stepping on a sharp or rough terrain types.
-Handmade mags and clips require handfitting.
Separates gunpowders by type.
-Martial Arts rebalance project.
-Tweaked turrets and military outpost mapgen.
-Bionics add weight to character.
-Makes vehicles and parts resistant to damage.
+Make most bugs avoid fire and some avoid falling.
+Cbms harvested from NPC are filthy and faulty.
+Changes game default start date to 30 days after Spring.
+Being grabbed drastically reduce your dodging ability.
+Allow zombies to push each other when blocked.
## Bugfixes:
Fixed long overmap location name being overwritten by "Distance to target:" string.
@@ -334,16 +406,19 @@ Consume tool charges incrementally during crafting.
Fixed bugs related to starting time, item rot and monster evolution.
Refuel fires while waiting.
Extreme cold and heat won't be damaging bandages or contaminate disinfected wounds no more.
-Swapping profession in character creation removes previous traits.
-Land zombies ignore fish in water.
-Electric engines won't fail to start.
-fix unpurifiable traits being mutated away.
-Fix long durations displaying as 'forever'.
-NPC running off fix.
-Stop random NPC spawning in lakes and rivers.
-Fix items spawning with bday at 0.
-Vehicles: watercraft move in shallow water with sensible stamina loss.
+Prevent fire from spreading through non-flammable walls.
+Fixed the issue of NPCs shooting through you to get to zombies.
+Fix NPCs reverting to the unrecruited state when asked to stop activity after save and load.
+Fix crash observed when encountering Mi-go slavers with Magiclysm loaded.
Fixed infinite loop on auto-sorting.
+Avoid bug where monsters would sometimes go nuts with unnecessary movement.
+vehicles: always apply a minimal slowdown.
+Fix pulped Z raising anyway.
+Fields are not spreading north-west when they shouldn't anymore.
+Fix horses making engine sounds.
+Fix items lying in furniture get damaged if one is throwing something at them.
+Items piled up beyond a tile's limit can pass through walls.
+You are still stuck in rubble even if you clear it with a shovel after getting stuck in it.
## Performance:
Limit start location search radius.
@@ -366,11 +441,19 @@ Avoid recalculating vision and lightmap unnecessarily.
Only retrieve vehicle list once a turn.
Increase performance by removing check for recipe every crafting turn.
Allow member access to weather_datum to bypass unnecessary translation.
-Speed up item::process_temperature_rot.
-Defer testing validity of scent grid modification points until modification commit.
-Remove dynamic_cast from Creature::sees and map::creature_in_field.
+Speed up calls to get_wind_blockers.
+Improve performance when fishing.
Avoid unecessarally enumerating monsters.
-Introduce a faster linked list implementation.
+Remove dynamic_cast from Creature::sees and map::creature_in_field.
+Defer testing validity of scent grid modification points until modification commit.
+Speed up item::process_temperature_rot.
+Optimize many NPC AI operations.
+More NPC-at-rest optimization.
+Minor vehicle performance optimizations.
+Throttle NPC item search.
+Optimize vine growth special attack.
+Add adjustable 3D vision Z-level cap.
+Skip sunlight calculation on uniform z-levels.
## Infrastructure:
Npctalk: Complete overhaul of NPC conversation infrastructure.
@@ -407,25 +490,90 @@ Cloaking is now tied to a json flag, allowing mods to introduce their own cloaki
Mandate description of terrain and furniture.
Basecamps: add a namespace and calculate workdays.
Significant progress toward rationizing character/player/NPC classes.
-Makes surgery a player_activity.
-Add custom clang-tidy check to enforce consistent point initialization
-Allow aliasing extendable lake shore terrain
-Time audit. Saner calendar field names.
-Use time_durations instead of ints for faults
-Jsonize clothing mod.
-Implement new item type for batteries.
-Jsonize memory-related mutation modifiers.
-Use point/tripoint rather than individual coordinates in overmapbuffer functions.
-Add Spell fields as new members of spell_type.
-Use time duration strings for effects.
-Monsters can cast spells as a special attack.
-JSON-ize terrain and furniture that produce light.
-Change vehicle padding to a more optimal configuration.
+Added weather change effect for carrying artifact with AEP_BAD_WEATHER property.
+calc_ray_end can accept any integer properly.
+Shift artifact effects to JSON.
+Add lighting overlay (debug menu).
Add energy units using units::quantity.
-Add u/npc_adjust_var and u/npc_compare_var effects and conditions.
-Introduce dedicated class to manage memorial log.
-Add a prototype event bus and Cata-specific variant type.
+Refactor player::calc_focus_equilibrium, disp_morale, update_mental_focus, reset_stats
+Template read_from_json_string.
+JSON-ize terrain and furniture that produce light.
+Monsters can cast spells as a special attack.
+Use time duration strings for effects.
+Introduce a faster linked list implementation.
+Add Spell fields as new members of spell_type.
+Jsonize memory-related mutation modifiers.
+Implement new item type for batteries.
+Jsonize clothing mod.
+Use time_durations instead of ints for faults.
+Time audit. Saner calendar field names.
+Unify spell effect functions to deprecate the if else ladder.
+Allow aliasing extendable lake shore terrain.
+Add custom clang-tidy check to enforce consistent point initialization.
+Convert calendar into a namespace.
+Magiclysm: Terrain (and furniture) alteration spell with example.
+Add static analysis check for fields that could be replaced by points.
+Jsonize Environemental protection form cbm.
+Jsonize encumbrance from cbm.
+Enforce use of point / tripoint overloads where available via a custom clang-tidy check.
+Moved windows and flora (trees, shrubs, grass) into new files from terrain.json
+Use bigger Travis ccache, and improve Travis log.
+Kill all of the auto in item.cpp that is not an iterator or lambda.
+Report a verbose error message in case of backtrace failing to grab the symbols.
+Added support of various generator types for map extras.
+Separates out liquid and door terrains.
+Items in trades are better checked for errors.
+Changed mutagen craft tools to crafting requirements.
+clang-tidy now checks for use of point arithmetic and suggest refactoring to make more use thereof.
+Introduce character_id type (rather than just using int).
Jsonize Cbm power generation.
+Change all instances of 'volume' in JSONs to be a metric string.
+Allow spawning exactly one monster from a monster group and set it mission target.
+Add a prototype event bus and Cata-specific variant type.
+Overhaul of enum <-> string conversion code.
+Track kills through event_bus in new dedicated kill_tracker class.
+Change all instances of 'storage' in JSONs to be a metric string.
+Jsonize Weight capacity modifier for armor and CBM.
+Change all instances of 'volume' in JSONs to be a metric string again.
+Allow missions to specify if they provide generic rewards.
+Character: migrate my_fac down from npc.
+Introduce dedicated class to manage memorial log.
+Weight and weight_integral can be defined using a string.
+Monsters casting spells can now get custom message.
+Add u/npc_adjust_var and u/npc_compare_var effects and conditions.
+Use mass strings for item weight.
+Improve built-in support for (de)serialization of containers.
+Show charges, damage, active, tags and item variables of items in debug mode.
+Add new object to track event statistics for use in calculating scores.
+Jsonize passive artifact effects.
+NPCs: annotate talk_tags with the usage.
+NPC can used fueled CBMs.
+Simplify sterilizing CBM behind the scene logic.
+Refactor object cloning to improve memory safety and simplify implementation.
+Stricter json parsing; errors will occur in more places.
+Added post-apocalyptic prices to all ammo types.
+Improve AppStream data.
+Support json-defined scores as a function of events.
+Use clang-tidy to check gettext calls in static variables.
+Jsonise passive stat bonus from bionics.
+Introduce functions to assist with drawing tabbed windows.
+Allow auto-wielding of items in professions.
+Spells can teach new spells.
+Enable Magiclysm on one Travis job.
+Power gen bionic can emit heat, fields and warm part they occupy.
+Preliminary tagging of all overmap locations for NPC AI.
+Make possible to define `item_transform` and `cast_spell` item actions which are only allowed when wielding or wearing item.
+Rework and unify teleport methods.
+Can use string to specify price.
+Make PR validator more robust.
+Create enchantment cache for use with enchantment values.
+Adds JSON capability to range_with_even_chance_of_good_hit.
+Uses the units::energy infrastructure for bionic power.
+Clarify some documentation relevant to monsters and basecamp recipes.
+Add table of contents to JSON_INFO.md
+Add a clang-tidy check to check for text style in the c++ code.
+Encapsulate bionic power and use setter and getter functions.
+Move player armor functions to Character scope.
## Build:
Npctalk: add a python dialogue validator.
@@ -433,11 +581,20 @@ Update homebrew install instructions.
Adds Flatpak build recipe.
Clarify the compiling directions for Visual Studio.
Enable github bot that automates closing stale issues.
-Fixed compilation with gcc 7.4.
+Add cygwin to COMPILING.md, also add short descriptions of each option.
+Android build updates.
+simplify and improve flatpak support.
+Allow building with Clang using MinGW-w64 libs.
+Check translator comments with clang-tidy.
## I18N and A11Y:
Use translation markers to increase performance.
Make the translation for field name display.
+Automatically switch IME mode between text input and raw input on Windows.
+Correctly extract npc dialogue lines for translation.
+Allow translation of non-character key names.
+Add position marker to some format strings.
+Support plural strings in the translation class.
# 0.D (Danny)
diff --git a/tools/generate_changelog.py b/tools/generate_changelog.py
index 5be729d0f8602..b6cf90e85307c 100755
--- a/tools/generate_changelog.py
+++ b/tools/generate_changelog.py
@@ -935,7 +935,7 @@ def load_github_repos():
commit_repo.add_multiple(commit_api.get_commit_list(target_dttm, end_dttm))
pr_api = PullRequestApi(CDDAPullRequestFactory(), personal_token)
- pr_repo.add_multiple(pr_api.get_pr_list(target_dttm, end_dttm, merged_only=True))
+ pr_repo.add_multiple(pr_api.get_pr_list(target_dttm, end_dttm, merged_only=False))
github_thread = threading.Thread(target=exit_on_exception(load_github_repos))
github_thread.name = 'WORKER_GIT'
From 1b523e31ac462467570cda59ac037917fcd0370c Mon Sep 17 00:00:00 2001
From: Eric <52087122+Ramza13@users.noreply.github.com>
Date: Tue, 15 Oct 2019 09:48:53 -0400
Subject: [PATCH 61/86] Crafting display infinite (#34726)
---
src/requirements.cpp | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/requirements.cpp b/src/requirements.cpp
index 827c77b96aa39..d0545b6dca78e 100644
--- a/src/requirements.cpp
+++ b/src/requirements.cpp
@@ -125,7 +125,13 @@ std::string item_comp::to_string( const int batch, const int avail ) const
const int c = std::abs( count ) * batch;
const auto type_ptr = item::find_type( type );
if( type_ptr->count_by_charges() ) {
- if( avail > 0 ) {
+ if( avail == item::INFINITE_CHARGES ) {
+ //~ %1$s: item name, %2$d: charge requirement
+ return string_format( npgettext( "requirement", "%1$s (%2$d of infinite)",
+ "%1$s (%2$d of infinite)",
+ c ),
+ type_ptr->nname( 1 ), c );
+ } else if( avail > 0 ) {
//~ %1$s: item name, %2$d: charge requirement, %3%d: available charges
return string_format( npgettext( "requirement", "%1$s (%2$d of %3$d)", "%1$s (%2$d of %3$d)", c ),
type_ptr->nname( 1 ), c, avail );
@@ -135,7 +141,12 @@ std::string item_comp::to_string( const int batch, const int avail ) const
type_ptr->nname( 1 ), c );
}
} else {
- if( avail > 0 ) {
+ if( avail == item::INFINITE_CHARGES ) {
+ //~ %1$s: item name, %2$d: required count
+ return string_format( npgettext( "requirement", "%2$d %1$s of infinite", "%2$d %1$s of infinite",
+ c ),
+ type_ptr->nname( c ), c );
+ } else if( avail > 0 ) {
//~ %1$s: item name, %2$d: required count, %3%d: available count
return string_format( npgettext( "requirement", "%2$d %1$s of %3$d", "%2$d %1$s of %3$d", c ),
type_ptr->nname( c ), c, avail );
From 35fe1d9d4a48b645dfdba20a63d009305fe947b3 Mon Sep 17 00:00:00 2001
From: Siersha
Date: Sun, 13 Oct 2019 19:10:33 -0400
Subject: [PATCH 62/86] Switched the Stats and Traits tab in the character
creation screen
---
src/newcharacter.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp
index 8afe3704658ec..fc4059445dbd8 100644
--- a/src/newcharacter.cpp
+++ b/src/newcharacter.cpp
@@ -502,10 +502,10 @@ bool avatar::create( character_type type, const std::string &tempname )
result = set_profession( w, *this, points, result );
break;
case 3:
- result = set_traits( w, *this, points );
+ result = set_stats( w, *this, points );
break;
case 4:
- result = set_stats( w, *this, points );
+ result = set_traits( w, *this, points );
break;
case 5:
result = set_skills( w, *this, points );
@@ -666,8 +666,8 @@ static void draw_character_tabs( const catacurses::window &w, const std::string
_( "POINTS" ),
_( "SCENARIO" ),
_( "PROFESSION" ),
- _( "TRAITS" ),
_( "STATS" ),
+ _( "TRAITS" ),
_( "SKILLS" ),
_( "DESCRIPTION" ),
};
From b95bf4cce84df9d9406f47736092ab0ea0788c0e Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Tue, 15 Oct 2019 22:56:54 -0500
Subject: [PATCH 63/86] Prevent counterattacks if tired or dead (#34793)
* Prevent counterattacks if tired or dead
* Changed threshold to 25%
* Changed threshold back to 33%
---
src/melee.cpp | 8 ++++++--
src/player.cpp | 9 +++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index cd49069bb8958..2338860344de4 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -1642,8 +1642,12 @@ bool player::block_hit( Creature *source, body_part &bp_hit, damage_instance &da
// Check if we have any block counters
matec_id tec = pick_technique( *source, shield, false, false, true );
- if( tec != tec_none ) {
- melee_attack( *source, false, tec );
+ if( tec != tec_none && !is_dead_state() ) {
+ if( stamina < get_stamina_max() / 3 ) {
+ add_msg( m_bad, _( "You try to counterattack but you are too exhausted!" ) );
+ } else {
+ melee_attack( *source, false, tec );
+ }
}
return true;
diff --git a/src/player.cpp b/src/player.cpp
index 20d397618a34a..40f121f07e7ac 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -2701,8 +2701,13 @@ void player::on_dodge( Creature *source, float difficulty )
// For adjacent attackers check for techniques usable upon successful dodge
if( source && square_dist( pos(), source->pos() ) == 1 ) {
matec_id tec = pick_technique( *source, used_weapon(), false, true, false );
- if( tec != tec_none ) {
- melee_attack( *source, false, tec );
+
+ if( tec != tec_none && !is_dead_state() ) {
+ if( stamina < get_stamina_max() / 3 ) {
+ add_msg( m_bad, _( "You try to counterattack but you are too exhausted!" ) );
+ } else {
+ melee_attack( *source, false, tec );
+ }
}
}
}
From b80ac4d0cfda728a1827eb8e0b3808f9c7734b33 Mon Sep 17 00:00:00 2001
From: Anthony
Date: Tue, 15 Oct 2019 19:19:24 -0700
Subject: [PATCH 64/86] BUG: Fix redundancy error in cattail-jelly recipe
---
data/json/recipes/other/medical.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/data/json/recipes/other/medical.json b/data/json/recipes/other/medical.json
index 87e6a63ff1808..5d5679f13ffe7 100644
--- a/data/json/recipes/other/medical.json
+++ b/data/json/recipes/other/medical.json
@@ -113,7 +113,6 @@
"subcategory": "CSC_OTHER_MEDICAL",
"skill_used": "survival",
"difficulty": 1,
- "skills_required": [ "survival", 1 ],
"time": "5 m",
"book_learn": [
[ "emergency_book", 1 ],
From 8d462d67bd8108ff76bee50c22186fafb7f379c2 Mon Sep 17 00:00:00 2001
From: John Candlebury
Date: Tue, 15 Oct 2019 23:49:51 -0600
Subject: [PATCH 65/86] Fix immersion suit Iuse
---
data/json/items/tool_armor.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json
index 16db53248a536..968c3548f3b94 100644
--- a/data/json/items/tool_armor.json
+++ b/data/json/items/tool_armor.json
@@ -715,7 +715,7 @@
"use_action": {
"type": "transform",
"msg": "Initiating \nRunning suit integrity diagnostics...\nAll systems operational.",
- "target": "dimensional_anchor_on",
+ "target": "phase_immersion_suit_on",
"active": true,
"need_charges": 1,
"need_charges_msg": "Warning: Operating on minimal power. Protection compromised."
From f86ef3011a310a6a2f3adc6e50b98b14c57a5e25 Mon Sep 17 00:00:00 2001
From: Hymore246
Date: Tue, 15 Oct 2019 18:14:51 -0500
Subject: [PATCH 66/86] Updated type section of technique description
---
src/martialarts.cpp | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/martialarts.cpp b/src/martialarts.cpp
index 19a2dac2bb465..4a23d784c5e19 100644
--- a/src/martialarts.cpp
+++ b/src/martialarts.cpp
@@ -1213,9 +1213,23 @@ float ma_technique::armor_penetration( const player &u, damage_type type ) const
std::string ma_technique::get_description() const
{
std::stringstream dump;
+ std::string type;
- dump << string_format( _( "Type: %s" ),
- defensive ? _( "defensive" ) : _( "offensive" ) ) << std::endl;
+ if( block_counter ) {
+ type = _( "Block Counter" );
+ } else if( dodge_counter ) {
+ type = _( "Dodge Counter" );
+ } else if( miss_recovery ) {
+ type = _( "Miss Recovery" );
+ } else if( grab_break ) {
+ type = _( "Grab Break" );
+ } else if( defensive ) {
+ type = _( "Defensive" );
+ } else {
+ type = _( "Offensive" );
+ }
+
+ dump << string_format( _( "Type: %s" ), type ) << std::endl;
std::string temp = bonuses.get_description();
if( !temp.empty() ) {
From 8224120b8c5f1f874c440de04d849c281d4260b5 Mon Sep 17 00:00:00 2001
From: curstwist <39442864+curstwist@users.noreply.github.com>
Date: Tue, 15 Oct 2019 21:44:58 -0400
Subject: [PATCH 67/86] move clothes item_groups
---
data/json/itemgroups/clothing.json | 1490 +++++++++++++++++++++++
data/json/itemgroups/item_groups.json | 1600 +------------------------
2 files changed, 1545 insertions(+), 1545 deletions(-)
diff --git a/data/json/itemgroups/clothing.json b/data/json/itemgroups/clothing.json
index 1d927003cead0..e8130224c44b2 100644
--- a/data/json/itemgroups/clothing.json
+++ b/data/json/itemgroups/clothing.json
@@ -579,5 +579,1495 @@
{ "item": "b_shorts", "prob": 15 },
{ "item": "nanoskirt", "prob": 10 }
]
+ },
+ {
+ "type": "item_group",
+ "id": "dresser",
+ "ammo": 50,
+ "magazine": 100,
+ "items": [
+ [ "jeans", 90 ],
+ [ "pants_checkered", 5 ],
+ [ "shorts", 70 ],
+ [ "shorts_denim", 50 ],
+ [ "pants", 75 ],
+ [ "leather_belt", 30 ],
+ [ "pants_leather", 60 ],
+ [ "pants_cargo", 70 ],
+ [ "shorts_cargo", 50 ],
+ [ "motorbike_pants", 5 ],
+ [ "breeches", 5 ],
+ [ "skirt", 75 ],
+ [ "dress", 70 ],
+ [ "sundress", 50 ],
+ [ "camisole", 60 ],
+ [ "bra", 70 ],
+ [ "hairpin", 30 ],
+ [ "fc_hairpin", 5 ],
+ [ "barrette", 15 ],
+ [ "tieclip", 10 ],
+ [ "collarpin", 10 ],
+ [ "undershirt", 70 ],
+ [ "boxer_shorts", 50 ],
+ [ "briefs", 40 ],
+ [ "boxer_briefs", 45 ],
+ [ "panties", 70 ],
+ [ "boy_shorts", 25 ],
+ [ "gown", 1 ],
+ [ "long_glove_white", 1 ],
+ [ "veil_wedding", 1 ],
+ [ "dress_wedding", 1 ],
+ [ "tshirt", 80 ],
+ [ "longshirt", 70 ],
+ [ "polo_shirt", 65 ],
+ [ "dress_shirt", 60 ],
+ [ "tank_top", 50 ],
+ [ "sweatshirt", 75 ],
+ [ "sweater", 75 ],
+ [ "hoodie", 65 ],
+ [ "jacket_light", 50 ],
+ [ "jacket_windbreaker", 25 ],
+ [ "jacket_jean", 35 ],
+ [ "blazer", 35 ],
+ [ "towel", 40 ],
+ [ "jacket_leather", 30 ],
+ [ "motorbike_armor", 5 ],
+ [ "poncho", 15 ],
+ [ "folding_poncho", 5 ],
+ [ "trenchcoat", 12 ],
+ [ "sleeveless_trenchcoat", 2 ],
+ [ "duster", 12 ],
+ [ "sleeveless_duster", 2 ],
+ [ "peacoat", 30 ],
+ [ "greatcoat", 15 ],
+ [ "vest", 15 ],
+ [ "mag_porn", 20 ],
+ [ "photo_album", 10 ],
+ [ "lighter", 60 ],
+ [ "ref_lighter", 2 ],
+ [ "sewing_kit", 30 ],
+ [ "thread", 40 ],
+ [ "flashlight", 40 ],
+ [ "suit", 60 ],
+ [ "waistcoat", 30 ],
+ [ "tophat", 10 ],
+ [ "bowhat", 10 ],
+ [ "cowboy_hat", 10 ],
+ [ "bullwhip", 1 ],
+ [ "10gal_hat", 5 ],
+ [ "glasses_monocle", 2 ],
+ [ "duct_tape", 60 ],
+ [ "firecracker_pack", 5 ],
+ [ "firecracker", 5 ],
+ [ "wolfsuit", 4 ],
+ [ "dinosuit", 4 ],
+ [ "vibrator", 5 ],
+ { "item": "condom", "prob": 30, "count": [ 1, 5 ] },
+ [ "snuggie", 5 ],
+ [ "flyer", 10 ],
+ [ "socks", 70 ],
+ [ "socks_wool", 30 ],
+ [ "pocketwatch", 5 ],
+ [ "flask_hip", 2 ],
+ [ "tux", 1 ],
+ [ "dress_wedding", 1 ],
+ [ "clogs", 2 ],
+ [ "wristwatch", 15 ],
+ [ "maid_dress", 3 ],
+ [ "maid_hat", 3 ],
+ [ "knitting_needles", 1 ],
+ [ "survnote", 1 ],
+ [ "b_shorts", 15 ],
+ [ "halter_top", 30 ],
+ [ "linuxtshirt", 10 ],
+ [ "kilt", 5 ],
+ [ "nanoskirt", 10 ],
+ [ "sleeveless_tunic", 5 ],
+ [ "fedora", 10 ],
+ [ "straw_hat", 5 ],
+ [ "straw_fedora", 5 ],
+ [ "holy_symbol", 20 ],
+ [ "kufi", 5 ],
+ [ "kippah", 5 ],
+ [ "headscarf", 5 ],
+ { "item": "kirpan", "container-item": "sheath", "prob": 1 },
+ { "item": "kirpan_cheap", "container-item": "sheath", "prob": 3 },
+ [ "robe", 10 ],
+ [ "eboshi", 1 ],
+ [ "kariginu", 1 ],
+ [ "geta", 1 ],
+ [ "kimono", 2 ],
+ [ "yukata", 6 ],
+ [ "haori", 2 ],
+ [ "hakama", 4 ],
+ [ "eclipse_glasses", 1 ],
+ [ "thermos", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "shoes",
+ "items": [
+ [ "sneakers", 80 ],
+ [ "socks", 70 ],
+ [ "tights", 20 ],
+ [ "stockings", 20 ],
+ [ "knee_high_boots", 20 ],
+ [ "thigh_high_boots", 20 ],
+ [ "boots", 70 ],
+ [ "flip_flops", 35 ],
+ [ "lowtops", 45 ],
+ [ "dress_shoes", 50 ],
+ [ "dance_shoes", 5 ],
+ [ "heels", 50 ],
+ [ "golf_shoes", 20 ],
+ [ "boots_combat", 10 ],
+ [ "boots_hiking", 20 ],
+ [ "boots_western", 10 ],
+ [ "clogs", 1 ],
+ [ "leathersandals", 10 ],
+ [ "rollerskates", 1 ],
+ [ "roller_blades", 5 ],
+ [ "roller_shoes_off", 1 ],
+ [ "mocassins", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "pants",
+ "items": [
+ [ "jeans", 90 ],
+ [ "pants_checkered", 5 ],
+ [ "shorts", 70 ],
+ [ "shorts_denim", 35 ],
+ [ "pants", 75 ],
+ [ "leather_belt", 30 ],
+ [ "pants_leather", 60 ],
+ [ "pants_cargo", 70 ],
+ [ "shorts_cargo", 50 ],
+ [ "skirt", 75 ],
+ [ "skirt_leather", 5 ],
+ [ "leggings", 15 ],
+ [ "under_armor_shorts", 20 ],
+ [ "dress", 70 ],
+ [ "sundress", 50 ],
+ [ "dress_wedding", 1 ],
+ [ "postman_shorts", 5 ],
+ [ "b_shorts", 15 ],
+ [ "kilt", 5 ],
+ [ "nanoskirt", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "shirts",
+ "items": [
+ [ "tshirt", 80 ],
+ [ "longshirt", 80 ],
+ [ "polo_shirt", 65 ],
+ [ "dress_shirt", 60 ],
+ [ "tank_top", 50 ],
+ [ "sweatshirt", 75 ],
+ [ "sweater", 75 ],
+ [ "hoodie", 65 ],
+ [ "under_armor", 20 ],
+ [ "jersey", 40 ],
+ [ "camisole", 60 ],
+ [ "tie_clipon", 10 ],
+ [ "tie_necktie", 10 ],
+ [ "tie_skinny", 10 ],
+ [ "tieclip", 5 ],
+ [ "collarpin", 5 ],
+ [ "postman_shirt", 5 ],
+ [ "halter_top", 50 ],
+ [ "linuxtshirt", 10 ],
+ [ "sleeveless_tunic", 5 ],
+ [ "poncho", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "jackets",
+ "items": [
+ [ "jacket_light", 50 ],
+ [ "jacket_windbreaker", 25 ],
+ [ "jacket_jean", 35 ],
+ [ "blazer", 35 ],
+ [ "jacket_leather", 30 ],
+ [ "coat_rain", 50 ],
+ [ "trenchcoat", 12 ],
+ [ "duster", 12 ],
+ { "group": "neckties", "prob": 5 },
+ [ "tieclip", 2 ],
+ [ "collarpin", 2 ],
+ [ "apron_leather", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "suits",
+ "items": [
+ [ "dress_shirt", 100 ],
+ { "group": "neckties", "prob": 50 },
+ [ "tieclip", 30 ],
+ [ "collarpin", 30 ],
+ [ "undershirt", 100 ],
+ [ "suit", 100 ],
+ [ "waistcoat", 70 ],
+ [ "tophat", 30 ],
+ [ "tux", 50 ],
+ [ "gown", 50 ],
+ [ "long_glove_white", 30 ],
+ [ "breeches", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "winter",
+ "ammo": 50,
+ "magazine": 100,
+ "items": [
+ [ "coat_winter", 50 ],
+ [ "peacoat", 30 ],
+ [ "ski_jacket", 40 ],
+ [ "greatcoat", 15 ],
+ [ "gloves_light", 35 ],
+ [ "mittens", 30 ],
+ [ "gloves_wool", 33 ],
+ [ "thermal_socks", 10 ],
+ [ "thermal_gloves", 10 ],
+ [ "thermal_suit", 10 ],
+ [ "thermal_mask", 10 ],
+ [ "thermal_outfit", 5 ],
+ [ "gloves_winter", 40 ],
+ [ "gloves_liner", 25 ],
+ [ "gloves_leather", 45 ],
+ [ "scarf", 45 ],
+ [ "knit_scarf", 35 ],
+ [ "long_knit_scarf", 15 ],
+ [ "scarf_long", 2 ],
+ [ "hat_cotton", 45 ],
+ [ "hat_newsboy", 20 ],
+ [ "hat_knit", 25 ],
+ [ "hat_fur", 15 ],
+ [ "hat_faux_fur", 20 ],
+ [ "pants_ski", 60 ],
+ [ "mask_ski", 15 ],
+ [ "long_underpants", 40 ],
+ [ "long_undertop", 40 ],
+ [ "union_suit", 40 ],
+ [ "tights", 20 ],
+ [ "arm_warmers", 20 ],
+ [ "leg_warmers", 20 ],
+ [ "balclava", 15 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "fancyfurs",
+ "items": [
+ [ "hat_fur", 300 ],
+ [ "hat_faux_fur", 300 ],
+ [ "sleeveless_trenchcoat_fur", 10 ],
+ [ "sleeveless_duster_fur", 10 ],
+ [ "sleeveless_trenchcoat_faux_fur", 10 ],
+ [ "coat_fur_sf", 100 ],
+ [ "coat_faux_fur", 300 ],
+ [ "coat_fur", 300 ],
+ [ "gloves_fur", 300 ],
+ [ "boots_fur", 200 ],
+ [ "trenchcoat_faux_fur", 50 ],
+ [ "duster_faux_fur", 50 ],
+ [ "pants_faux_fur", 50 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "hatstore_hats",
+ "items": [
+ [ "hat_cotton", 30 ],
+ [ "hat_knit", 40 ],
+ [ "hat_faux_fur", 30 ],
+ [ "hat_fur", 20 ],
+ [ "hat_newsboy", 20 ],
+ [ "hat_sombrero", 30 ],
+ [ "fedora", 100 ],
+ [ "straw_hat", 100 ],
+ [ "straw_fedora", 100 ],
+ [ "hat_chef", 10 ],
+ [ "maid_hat", 30 ],
+ [ "hat_golf", 50 ],
+ [ "hat_ball", 100 ],
+ [ "postman_hat", 10 ],
+ [ "tophat", 50 ],
+ [ "bowhat", 50 ],
+ [ "cowboy_hat", 100 ],
+ [ "10gal_hat", 100 ],
+ [ "kufi", 30 ],
+ [ "kippah", 30 ],
+ [ "eboshi", 30 ],
+ [ "balclava", 20 ],
+ [ "porkpie", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "hatstore_accessories",
+ "items": [
+ [ "scarf", 50 ],
+ [ "knit_scarf", 50 ],
+ [ "long_knit_scarf", 30 ],
+ [ "scarf_long", 30 ],
+ [ "bandana", 100 ],
+ [ "hairpin", 50 ],
+ [ "fc_hairpin", 20 ],
+ [ "barrette", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "shoestore_shoes",
+ "items": [
+ [ "sneakers", 100 ],
+ [ "knee_high_boots", 40 ],
+ [ "thigh_high_boots", 40 ],
+ [ "boots", 100 ],
+ [ "flip_flops", 50 ],
+ [ "lowtops", 100 ],
+ [ "dress_shoes", 50 ],
+ [ "dance_shoes", 20 ],
+ [ "heels", 100 ],
+ [ "golf_shoes", 40 ],
+ [ "boots_hiking", 40 ],
+ [ "boots_western", 60 ],
+ [ "clogs", 60 ],
+ [ "leathersandals", 100 ],
+ [ "rollerskates", 10 ],
+ [ "roller_blades", 20 ],
+ [ "roller_shoes_off", 10 ],
+ [ "boots_rubber", 20 ],
+ [ "clownshoes", 10 ],
+ [ "mocassins", 40 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "shoestore_accessories",
+ "items": [ [ "socks", 100 ], [ "thermal_socks", 25 ], [ "socks_wool", 50 ], [ "string_36", 200 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "bags",
+ "items": [
+ [ "backpack", 38 ],
+ [ "backpack_hiking", 3 ],
+ [ "petpack", 3 ],
+ [ "backpack_tactical_large", 1 ],
+ [ "bigback", 1 ],
+ [ "travelpack", 5 ],
+ [ "purse", 40 ],
+ [ "mbag", 20 ],
+ [ "slingpack", 8 ],
+ [ "rucksack", 20 ],
+ [ "backpack_leather", 8 ],
+ [ "briefcase", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "bags_trip",
+ "items": [ [ "suitcase_l", 37 ], [ "suitcase_m", 55 ], [ "duffelbag", 8 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "dresses",
+ "items": [ [ "dress", 55 ], [ "sundress", 43 ], [ "gown", 10 ], [ "dress_wedding", 2 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "female_underwear_top",
+ "items": [ [ "bra", 70 ], [ "sports_bra", 50 ], [ "bikini_top", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "female_underwear_bottom",
+ "items": [ [ "panties", 70 ], [ "boy_shorts", 50 ], [ "bikini_bottom", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "male_underwear_top",
+ "items": [ [ "undershirt", 50 ], [ "long_undertop", 20 ], [ "under_armor", 20 ], [ "tank_top", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "male_underwear_bottom",
+ "items": [
+ [ "boxer_shorts", 70 ],
+ [ "briefs", 30 ],
+ [ "boxer_briefs", 50 ],
+ [ "long_underpants", 20 ],
+ [ "under_armor_shorts", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "allclothes",
+ "items": [
+ [ "jeans", 90 ],
+ [ "pants_checkered", 5 ],
+ [ "shorts", 70 ],
+ [ "shorts_denim", 35 ],
+ [ "ski_jacket", 40 ],
+ [ "pants", 75 ],
+ [ "breeches", 10 ],
+ [ "leather_belt", 30 ],
+ [ "suit", 60 ],
+ [ "waistcoat", 30 ],
+ [ "tophat", 10 ],
+ [ "bowhat", 10 ],
+ [ "cowboy_hat", 10 ],
+ [ "boots_western", 8 ],
+ [ "glasses_monocle", 2 ],
+ [ "pants_leather", 60 ],
+ [ "pants_cargo", 70 ],
+ [ "shorts_cargo", 50 ],
+ [ "skirt", 75 ],
+ [ "skirt_leather", 5 ],
+ [ "tshirt", 70 ],
+ [ "longshirt", 80 ],
+ [ "polo_shirt", 65 ],
+ [ "dress_shirt", 60 ],
+ [ "tank_top", 50 ],
+ [ "camisole", 30 ],
+ [ "bra", 30 ],
+ [ "undershirt", 30 ],
+ [ "boxer_shorts", 30 ],
+ [ "briefs", 15 ],
+ [ "boxer_briefs", 20 ],
+ [ "panties", 30 ],
+ [ "boy_shorts", 25 ],
+ [ "sweatshirt", 75 ],
+ [ "sweater", 75 ],
+ [ "hoodie", 65 ],
+ [ "jacket_light", 50 ],
+ [ "jacket_windbreaker", 25 ],
+ [ "jacket_jean", 35 ],
+ [ "blazer", 35 ],
+ [ "jacket_leather", 30 ],
+ [ "coat_winter", 50 ],
+ [ "peacoat", 30 ],
+ [ "greatcoat", 15 ],
+ [ "gloves_light", 35 ],
+ [ "mittens", 30 ],
+ [ "gloves_wool", 33 ],
+ [ "thermal_socks", 2 ],
+ [ "thermal_gloves", 2 ],
+ [ "thermal_suit", 2 ],
+ [ "thermal_mask", 2 ],
+ [ "thermal_outfit", 1 ],
+ [ "gloves_winter", 40 ],
+ [ "gloves_liner", 25 ],
+ [ "gloves_leather", 45 ],
+ [ "gloves_work", 5 ],
+ [ "scarf", 45 ],
+ [ "hat_golf", 30 ],
+ [ "knit_scarf", 35 ],
+ [ "long_knit_scarf", 5 ],
+ [ "scarf_long", 1 ],
+ [ "hat_cotton", 45 ],
+ [ "hat_knit", 25 ],
+ [ "hat_newsboy", 20 ],
+ [ "hat_sombrero", 3 ],
+ [ "hat_fur", 15 ],
+ [ "hat_faux_fur", 20 ],
+ [ "under_armor", 20 ],
+ [ "under_armor_shorts", 20 ],
+ [ "tights", 20 ],
+ [ "leggings", 20 ],
+ [ "stockings", 20 ],
+ [ "balclava", 15 ],
+ [ "pants_ski", 60 ],
+ [ "long_underpants", 40 ],
+ [ "long_undertop", 40 ],
+ [ "union_suit", 20 ],
+ [ "arm_warmers", 20 ],
+ [ "leg_warmers", 20 ],
+ [ "trenchcoat_leather", 12 ],
+ [ "trenchcoat_faux_fur", 6 ],
+ [ "sleeveless_trenchcoat", 2 ],
+ [ "sleeveless_trenchcoat_leather", 2 ],
+ [ "sleeveless_trenchcoat_faux_fur", 2 ],
+ [ "trenchcoat_leather", 12 ],
+ [ "sleeveless_trenchcoat_fur", 1 ],
+ [ "duster_leather", 12 ],
+ [ "duster_faux_fur", 6 ],
+ [ "sleeveless_duster", 2 ],
+ [ "sleeveless_duster_leather", 2 ],
+ [ "sleeveless_duster_faux_fur", 2 ],
+ [ "sleeveless_duster_fur", 1 ],
+ [ "cloak", 5 ],
+ [ "cloak_wool", 5 ],
+ [ "house_coat", 25 ],
+ [ "flotation_vest", 1 ],
+ [ "fishing_waders", 5 ],
+ [ "wetsuit", 5 ],
+ [ "wetsuit_spring", 5 ],
+ [ "wetsuit_gloves", 10 ],
+ [ "wetsuit_booties", 10 ],
+ [ "wetsuit_hood", 5 ],
+ [ "dive_bag", 5 ],
+ [ "jedi_cloak", 1 ],
+ [ "apron_leather", 1 ],
+ [ "clown_suit", 1 ],
+ [ "clownshoes", 1 ],
+ [ "bondage_suit", 1 ],
+ [ "bondage_mask", 1 ],
+ [ "corset", 10 ],
+ [ "chestwrap", 5 ],
+ [ "boots_combat", 10 ],
+ [ "pants_army", 10 ],
+ [ "jacket_army", 10 ],
+ [ "winter_pants_army", 10 ],
+ [ "winter_jacket_army", 10 ],
+ [ "winter_gloves_army", 10 ],
+ [ "army_top", 20 ],
+ [ "tux", 1 ],
+ [ "gown", 1 ],
+ [ "long_glove_white", 1 ],
+ [ "veil_wedding", 1 ],
+ [ "dress_wedding", 1 ],
+ [ "porkpie", 5 ],
+ [ "tie_bow", 5 ],
+ [ "tie_clipon", 5 ],
+ [ "tie_necktie", 5 ],
+ [ "tie_skinny", 5 ],
+ [ "tieclip", 2 ],
+ [ "collarpin", 2 ],
+ [ "jersey", 40 ],
+ [ "postman_shorts", 5 ],
+ [ "postman_shirt", 5 ],
+ [ "postman_hat", 5 ],
+ [ "maid_dress", 3 ],
+ [ "maid_hat", 3 ],
+ [ "halter_top", 50 ],
+ [ "linuxtshirt", 20 ],
+ [ "kilt", 5 ],
+ [ "nanoskirt", 10 ],
+ [ "sleeveless_tunic", 5 ],
+ [ "ear_spool", 30 ],
+ [ "fedora", 5 ],
+ [ "straw_hat", 5 ],
+ [ "straw_fedora", 5 ],
+ [ "kufi", 2 ],
+ [ "kippah", 2 ],
+ [ "thawb", 1 ],
+ [ "kittel", 1 ],
+ [ "cassock", 1 ],
+ [ "robe", 5 ],
+ [ "eboshi", 1 ],
+ [ "kariginu", 1 ],
+ [ "geta", 1 ],
+ [ "kimono", 2 ],
+ [ "yukata", 4 ],
+ [ "haori", 1 ],
+ [ "hakama", 2 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "allclothes_damaged",
+ "subtype": "distribution",
+ "items": [ { "group": "allclothes", "damage": [ 3, 4 ] } ]
+ },
+ {
+ "type": "item_group",
+ "id": "swimmer_head",
+ "items": [
+ [ "goggles_swim", 90 ],
+ [ "wetsuit_hood", 30 ],
+ [ "fancy_sunglasses", 1 ],
+ [ "rebreather", 1 ],
+ [ "fitover_sunglasses", 5 ],
+ [ "sunglasses", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "swimmer_torso",
+ "items": [ [ "bikini_top", 50 ], [ "dive_bag", 5 ], [ "flotation_vest", 10 ], [ "scuba_tank", 2 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "swimmer_pants",
+ "items": [ [ "trunks", 80 ], [ "bikini_bottom", 35 ], [ "hot_pants", 30 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "swimmer_shoes",
+ "items": [ [ "flip_flops", 80 ], [ "swim_fins", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "swimmer_wetsuit",
+ "items": [ [ "wetsuit", 90 ], [ "wetsuit_spring", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "lab_shoes",
+ "items": [ [ "sneakers", 80 ], [ "boots", 70 ], [ "boots_steel", 50 ], [ "boots_hiking", 40 ], [ "dress_shoes", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "lab_torso",
+ "items": [
+ [ "coat_lab", 20 ],
+ [ "coat_lab", 20 ],
+ [ "coat_lab", 20 ],
+ [ "coat_lab", 20 ],
+ [ "tshirt", 80 ],
+ [ "longshirt", 80 ],
+ [ "polo_shirt", 65 ],
+ [ "dress_shirt", 60 ],
+ [ "dress", 70 ],
+ [ "sweatshirt", 75 ],
+ [ "sweater", 75 ],
+ [ "hoodie", 65 ],
+ [ "jumpsuit", 20 ],
+ [ "badge_doctor", 10 ],
+ [ "hazmat_suit", 5 ],
+ [ "cleansuit", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "lab_pants",
+ "items": [ [ "jeans", 90 ], [ "pants_checkered", 5 ], [ "pants", 75 ], [ "pants_cargo", 70 ], [ "skirt", 75 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "postman_gear",
+ "items": [
+ [ "postman_hat", 50 ],
+ [ "postman_shirt", 70 ],
+ [ "postman_shorts", 70 ],
+ [ "mbag", 40 ],
+ [ "newest_newspaper", 10 ],
+ [ "wristwatch", 50 ],
+ [ "leather_belt", 70 ],
+ [ "briefs", 90 ],
+ [ "socks", 70 ],
+ [ "sneakers", 70 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "mil_armor",
+ "items": [
+ [ "pants_army", 10 ],
+ [ "jacket_army", 10 ],
+ [ "winter_pants_army", 30 ],
+ [ "winter_jacket_army", 30 ],
+ [ "winter_gloves_army", 30 ],
+ [ "army_top", 30 ],
+ [ "kevlar", 10 ],
+ [ "modularvest", 15 ],
+ [ "modularvestkevlar", 18 ],
+ [ "modularvestceramic", 25 ],
+ [ "modularveststeel", 20 ],
+ [ "modularvestsuper", 2 ],
+ [ "modularvesthard", 1 ],
+ [ "vest", 15 ],
+ [ "mask_gas", 10 ],
+ [ "goggles_nv", 1 ],
+ [ "goggles_ir", 1 ],
+ [ "optical_cloak", 1 ],
+ [ "holo_cloak", 1 ],
+ [ "backpack", 38 ],
+ [ "UPS_off", 5 ],
+ [ "adv_UPS_off", 3 ],
+ [ "tacvest", 10 ],
+ [ "molle_pack", 8 ],
+ [ "duffelbag", 15 ],
+ [ "dump_pouch", 20 ],
+ [ "legrig", 10 ],
+ [ "under_armor", 20 ],
+ [ "boots", 70 ],
+ [ "boots_combat", 70 ],
+ [ "gloves_tactical", 30 ],
+ [ "glasses_bal", 40 ],
+ [ "armguard_hard", 20 ],
+ [ "legguard_hard", 15 ],
+ [ "power_armor_helmet_basic", 3 ],
+ [ "power_armor_basic", 3 ],
+ [ "power_armor_frame", 4 ],
+ [ "helmet_army", 40 ],
+ [ "helmet_liner", 10 ],
+ [ "UPS_off", 5 ],
+ [ "adv_UPS_off", 3 ],
+ [ "beret", 50 ],
+ [ "beret_wool", 40 ],
+ [ "elbow_pads", 50 ],
+ [ "knee_pads", 50 ],
+ [ "solarpack", 5 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "mil_accessories",
+ "items": [
+ [ "mask_gas", 10 ],
+ [ "duffelbag", 15 ],
+ [ "goggles_nv", 1 ],
+ [ "goggles_ir", 1 ],
+ [ "optical_cloak", 1 ],
+ [ "holo_cloak", 1 ],
+ [ "mess_kit", 9 ],
+ [ "mil_mess_kit", 1 ],
+ [ "backpack", 38 ],
+ [ "briefcase", 10 ],
+ [ "UPS_off", 5 ],
+ [ "adv_UPS_off", 3 ],
+ [ "armguard_hard", 20 ],
+ [ "legguard_hard", 15 ],
+ [ "power_armor_frame", 4 ],
+ [ "elbow_pads", 40 ],
+ [ "knee_pads", 40 ],
+ [ "mask_bal", 5 ],
+ [ "e_tool", 10 ],
+ [ "waterproof_gunmod", 8 ],
+ [ "grapnel", 3 ],
+ [ "glasses_bal", 30 ],
+ [ "sheath", 10 ],
+ [ "bootsheath", 8 ],
+ [ "holster", 15 ],
+ [ "sholster", 10 ],
+ [ "bandolier_shotgun", 8 ],
+ [ "solarpack", 5 ],
+ [ "chem_hexamine", 3 ],
+ [ "esbit_stove", 6 ],
+ [ "mess_tin", 4 ],
+ [ "survival_kit", 4 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "mil_armor_torso",
+ "items": [
+ [ "kevlar", 10 ],
+ [ "modularvest", 15 ],
+ [ "modularvestkevlar", 18 ],
+ [ "modularvestceramic", 25 ],
+ [ "modularveststeel", 20 ],
+ [ "modularvestsuper", 2 ],
+ [ "modularvesthard", 1 ],
+ [ "winter_jacket_army", 30 ],
+ [ "vest", 15 ],
+ [ "tacvest", 10 ],
+ [ "molle_pack", 8 ],
+ [ "under_armor", 20 ],
+ [ "power_armor_basic", 5 ],
+ [ "army_top", 30 ],
+ [ "elbow_pads", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "mil_armor_helmet",
+ "items": [
+ [ "helmet_army", 40 ],
+ [ "helmet_liner", 20 ],
+ [ "beret", 50 ],
+ [ "beret_wool", 40 ],
+ [ "mask_bal", 10 ],
+ [ "power_armor_helmet_basic", 4 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "mil_armor_pants",
+ "items": [
+ [ "pants_army", 10 ],
+ [ "winter_pants_army", 40 ],
+ [ "pants", 75 ],
+ [ "pants_cargo", 70 ],
+ [ "legrig", 10 ],
+ [ "knee_pads", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survival_armor",
+ "items": [
+ [ "boots_steel", 50 ],
+ [ "boots_combat", 50 ],
+ [ "boots_hiking", 50 ],
+ [ "bootsheath", 8 ],
+ [ "pants_cargo", 70 ],
+ [ "shorts_cargo", 50 ],
+ [ "pants_army", 30 ],
+ [ "jacket_army", 30 ],
+ [ "winter_pants_army", 10 ],
+ [ "winter_jacket_army", 10 ],
+ [ "winter_gloves_army", 10 ],
+ [ "jumpsuit", 20 ],
+ [ "jacket_leather", 30 ],
+ [ "sleeveless_trenchcoat", 2 ],
+ [ "sleeveless_trenchcoat_leather", 5 ],
+ [ "sleeveless_duster", 2 ],
+ [ "sleeveless_duster_leather", 5 ],
+ [ "kevlar", 30 ],
+ [ "modularvest", 12 ],
+ [ "modularvestkevlar", 10 ],
+ [ "modularvestceramic", 8 ],
+ [ "modularveststeel", 5 ],
+ [ "modularvestsuper", 1 ],
+ [ "dump_pouch", 20 ],
+ [ "mask_bal", 5 ],
+ [ "vest", 15 ],
+ [ "gloves_fingerless", 20 ],
+ [ "gloves_tactical", 20 ],
+ [ "glasses_bal", 20 ],
+ [ "elbow_pads", 40 ],
+ [ "knee_pads", 40 ],
+ [ "mask_filter", 30 ],
+ [ "mask_gas", 10 ],
+ [ "goggles_ski", 30 ],
+ [ "helmet_skid", 30 ],
+ [ "armguard_hard", 20 ],
+ [ "legguard_hard", 15 ],
+ [ "under_armor", 20 ],
+ [ "long_underpants", 40 ],
+ [ "long_undertop", 40 ],
+ [ "union_suit", 20 ],
+ [ "helmet_ball", 45 ],
+ [ "helmet_riot", 25 ],
+ [ "helmet_motor", 40 ],
+ [ "touring_suit", 15 ],
+ [ "motorbike_armor", 5 ],
+ [ "motorbike_pants", 5 ],
+ [ "motorbike_boots", 5 ],
+ [ "holster", 8 ],
+ [ "sholster", 4 ],
+ [ "bootstrap", 3 ],
+ [ "legpouch", 12 ],
+ [ "legpouch_large", 6 ],
+ [ "chestpouch", 9 ],
+ [ "ammo_satchel", 4 ],
+ [ "UPS_off", 5 ],
+ [ "adv_UPS_off", 3 ],
+ [ "tacvest", 10 ],
+ [ "molle_pack", 8 ],
+ [ "legrig", 10 ],
+ [ "rucksack", 20 ],
+ [ "emer_blanket", 20 ],
+ [ "flotation_vest", 1 ],
+ [ "fishing_waders", 2 ],
+ [ "cloak", 5 ],
+ [ "cloak_wool", 5 ],
+ [ "tac_helmet", 5 ],
+ [ "tac_fullhelmet", 2 ],
+ [ "helmet_lobster", 2 ],
+ [ "apron_leather", 2 ],
+ [ "tool_belt", 5 ],
+ [ "bootsheath", 8 ],
+ [ "sheath", 5 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "construction_worker",
+ "items": [
+ [ "boots", 70 ],
+ [ "boots_steel", 50 ],
+ [ "boots_hiking", 10 ],
+ [ "jumpsuit", 20 ],
+ [ "gloves_rubber", 20 ],
+ [ "gloves_leather", 45 ],
+ [ "gloves_work", 45 ],
+ [ "mask_filter", 30 ],
+ [ "glasses_safety", 40 ],
+ [ "hat_hard", 50 ],
+ [ "hat_hard_hooded", 25 ],
+ [ "wearable_light", 5 ],
+ [ "ear_plugs", 50 ],
+ { "group": "ammo_any_batteries_full", "prob": 50 },
+ [ "flashlight", 40 ],
+ [ "boots_rubber", 20 ],
+ [ "toolbox", 1 ],
+ [ "apron_leather", 10 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "loincloth",
+ "items": [ [ "loincloth", 2 ], [ "loincloth_wool", 1 ], [ "loincloth_fur", 1 ], [ "loincloth_leather", 1 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_torso",
+ "items": [ [ "bunker_coat", 80 ], [ "vest", 30 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_pants",
+ "items": [ [ "bunker_pants", 80 ], [ "nomex_suit", 40 ], [ "pants_cargo", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_boots",
+ "items": [
+ [ "boots_bunker", 70 ],
+ [ "boots_steel", 20 ],
+ [ "boots_combat", 5 ],
+ [ "boots_rubber", 10 ],
+ [ "boots_hiking", 5 ],
+ [ "nomex_socks", 40 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_gloves",
+ "items": [
+ [ "fire_gauntlets", 60 ],
+ [ "gloves_medical", 5 ],
+ [ "gloves_tactical", 20 ],
+ [ "gloves_rubber", 10 ],
+ [ "nomex_gloves", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_head",
+ "items": [
+ [ "firehelmet", 60 ],
+ [ "hat_knit", 10 ],
+ [ "nomex_hood", 40 ],
+ [ "hat_hard", 5 ],
+ [ "hat_hard_hooded", 3 ],
+ [ "hat_noise_cancelling", 5 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "fireman_mask",
+ "items": [
+ [ "mask_bunker", 70 ],
+ [ "mask_dust", 30 ],
+ [ "mask_gas", 20 ],
+ [ "mask_filter", 10 ],
+ [ "goggles_ir", 2 ],
+ [ "goggles_nv", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_torso",
+ "items": [ [ "cleansuit", 40 ], [ "jumpsuit", 60 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_boots",
+ "items": [ [ "boots_rubber", 1 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_gloves",
+ "items": [ [ "gloves_medical", 60 ], [ "gloves_rubber", 40 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_full",
+ "items": [ [ "hazmat_suit", 80 ], [ "anbc_suit", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_mask",
+ "items": [ [ "mask_dust", 80 ], [ "mask_filter", 20 ], [ "mask_gas", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "hazmat_eyes",
+ "items": [ [ "glasses_safety", 50 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_suits",
+ "items": [
+ [ "survivor_suit", 8 ],
+ [ "lsurvivor_suit", 10 ],
+ [ "hsurvivor_suit", 6 ],
+ [ "wsurvivor_suit", 6 ],
+ [ "fsurvivor_suit", 4 ],
+ [ "h20survivor_suit", 2 ],
+ [ "touring_suit", 16 ],
+ [ "armor_larmor", 28 ],
+ [ "armor_blarmor", 14 ],
+ [ "armor_farmor", 8 ],
+ [ "armor_plarmor", 2 ],
+ [ "swat_armor", 6 ],
+ [ "aep_suit", 4 ],
+ [ "armor_scrapsuit", 12 ],
+ [ "armor_chitin", 2 ],
+ [ "armor_lightplate", 1 ],
+ [ "cuirass_lightplate", 2 ],
+ [ "armor_plate", 1 ],
+ [ "bondage_suit", 1 ],
+ [ "snuggie", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_tops",
+ "items": [
+ [ "trenchcoat_survivor", 5 ],
+ [ "sleeveless_trenchcoat_survivor", 2 ],
+ [ "duster_survivor", 5 ],
+ [ "sleeveless_duster_survivor", 2 ],
+ [ "vest", 40 ],
+ [ "kevlar", 16 ],
+ [ "jacket_army", 28 ],
+ [ "trenchcoat", 12 ],
+ [ "trenchcoat_leather", 10 ],
+ [ "trenchcoat_fur", 5 ],
+ [ "sleeveless_trenchcoat", 7 ],
+ [ "sleeveless_trenchcoat_leather", 5 ],
+ [ "sleeveless_trenchcoat_fur", 2 ],
+ [ "duster", 12 ],
+ [ "duster_leather", 10 ],
+ [ "duster_fur", 5 ],
+ [ "sleeveless_duster", 7 ],
+ [ "sleeveless_duster_leather", 5 ],
+ [ "sleeveless_duster_fur", 2 ],
+ [ "peacoat", 14 ],
+ [ "greatcoat", 7 ],
+ [ "vest_leather", 22 ],
+ [ "bunker_coat", 6 ],
+ [ "bookplate", 10 ],
+ [ "modularvest", 4 ],
+ [ "modularvesthard", 1 ],
+ [ "modularvestkevlar", 2 ],
+ [ "modularvestceramic", 2 ],
+ [ "modularveststeel", 1 ],
+ [ "modularvestsuper", 1 ],
+ [ "dragonskin", 1 ],
+ [ "corset", 1 ],
+ [ "football_armor", 18 ],
+ [ "jacket_leather", 12 ],
+ [ "jacket_jean", 8 ],
+ [ "jacket_flannel", 6 ],
+ [ "cuirass_scrap", 12 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_bottoms",
+ "items": [
+ [ "pants_survivor", 10 ],
+ [ "pants_cargo", 40 ],
+ [ "shorts_cargo", 22 ],
+ [ "pants_army", 28 ],
+ [ "winter_pants_army", 10 ],
+ [ "bunker_pants", 14 ],
+ [ "pants_leather", 18 ],
+ [ "legguard_scrap", 12 ],
+ [ "skirt", 6 ],
+ [ "kilt", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_gloves",
+ "items": [
+ [ "gloves_lsurvivor", 10 ],
+ [ "gloves_survivor", 8 ],
+ [ "gloves_hsurvivor", 4 ],
+ [ "gloves_wsurvivor", 4 ],
+ [ "gloves_fsurvivor", 2 ],
+ [ "gloves_h20survivor", 1 ],
+ [ "gloves_fingerless", 28 ],
+ [ "gloves_fingerless_mod", 20 ],
+ [ "gloves_tactical", 12 ],
+ [ "gauntlets_larmor", 14 ],
+ [ "gauntlets_chitin", 2 ],
+ [ "armguard_larmor", 7 ],
+ [ "vambrace_larmor", 6 ],
+ [ "armguard_chitin", 1 ],
+ [ "armguard_scrap", 12 ],
+ [ "gloves_fur", 4 ],
+ [ "gloves_leather", 22 ],
+ [ "gloves_work", 22 ],
+ [ "gloves_plate", 2 ],
+ [ "gloves_wraps", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_boots",
+ "items": [
+ [ "boots_lsurvivor", 10 ],
+ [ "boots_survivor", 8 ],
+ [ "boots_hsurvivor", 4 ],
+ [ "boots_wsurvivor", 4 ],
+ [ "boots_fsurvivor", 2 ],
+ [ "boots_h20survivor", 1 ],
+ [ "boots", 20 ],
+ [ "boots_scrap", 12 ],
+ [ "boots_steel", 28 ],
+ [ "boots_hiking", 24 ],
+ [ "knee_high_boots", 8 ],
+ [ "boots_combat", 12 ],
+ [ "boots_larmor", 14 ],
+ [ "boots_fur", 22 ],
+ [ "boots_plate", 2 ],
+ [ "boots_bunker", 8 ],
+ [ "footrags", 1 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_head",
+ "items": [
+ [ "hood_lsurvivor", 10 ],
+ [ "hood_survivor", 8 ],
+ [ "helmet_survivor", 8 ],
+ [ "helmet_hsurvivor", 4 ],
+ [ "hood_wsurvivor", 4 ],
+ [ "hood_fsurvivor", 2 ],
+ [ "hood_h20survivor", 1 ],
+ [ "helmet_army", 26 ],
+ [ "tac_helmet", 22 ],
+ [ "helmet_riot", 18 ],
+ [ "tac_fullhelmet", 8 ],
+ [ "helmet_lobster", 8 ],
+ [ "pot_helmet", 22 ],
+ [ "helmet_larmor", 14 ],
+ [ "pickelhaube", 1 ],
+ [ "firehelmet", 2 ],
+ [ "helmet_barbute", 1 ],
+ [ "helmet_plate", 1 ],
+ [ "helmet_scrap", 12 ],
+ [ "bondage_mask", 1 ],
+ [ "survivor_goggles", 10 ],
+ [ "hood_rain", 14 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "survivorzed_extra",
+ "items": [
+ [ "daypack", 4 ],
+ [ "mask_lsurvivor", 10 ],
+ [ "mask_survivor", 8 ],
+ [ "mask_hsurvivor", 6 ],
+ [ "survivor_vest", 8 ],
+ [ "survivor_runner_pack", 6 ],
+ [ "survivor_pack", 5 ],
+ [ "survivor_rucksack", 4 ],
+ [ "survivor_duffel_bag", 3 ],
+ [ "dive_bag", 10 ],
+ [ "runner_bag", 20 ],
+ [ "molle_pack", 12 ],
+ [ "backpack", 40 ],
+ [ "backpack_leather", 32 ],
+ [ "mbag", 26 ],
+ [ "purse", 14 ],
+ [ "slingpack", 12 ],
+ [ "rucksack", 12 ],
+ [ "duffelbag", 8 ],
+ [ "mask_h20survivor", 1 ],
+ [ "mask_bal", 14 ],
+ [ "mask_hockey", 26 ],
+ [ "mask_gas", 24 ],
+ [ "mask_filter", 12 ],
+ [ "mask_bunker", 2 ],
+ [ "mask_wsurvivor", 4 ],
+ [ "mask_fsurvivor", 2 ],
+ [ "sunglasses", 12 ],
+ [ "fitover_sunglasses", 8 ],
+ [ "glasses_bal", 18 ],
+ [ "glasses_safety", 24 ],
+ [ "goggles_ski", 14 ],
+ [ "goggles_nv", 2 ],
+ [ "goggles_ir", 1 ],
+ [ "tacvest", 22 ],
+ [ "legrig", 22 ],
+ [ "tool_belt", 16 ],
+ [ "fanny", 12 ],
+ [ "dump_pouch", 6 ],
+ [ "ragpouch", 22 ],
+ [ "leather_pouch", 16 ],
+ [ "quiver", 14 ],
+ [ "quiver_large", 8 ],
+ [ "wristwatch", 24 ],
+ [ "diving_watch", 16 ],
+ [ "pocketwatch", 14 ],
+ [ "holster", 14 ],
+ [ "bandana", 18 ],
+ [ "scarf", 26 ],
+ [ "long_knit_scarf", 15 ],
+ [ "mask_gas_xl", 4 ],
+ [ "hat_boonie", 16 ],
+ [ "beret", 18 ],
+ [ "beret_wool", 14 ],
+ [ "balclava", 12 ],
+ [ "mask_survivorxl", 2 ],
+ [ "combatsaw_off", 1 ],
+ [ "firemachete_off", 1 ],
+ [ "shishkebab_off", 2 ],
+ [ "helsing", 1 ],
+ [ "tihar", 2 ],
+ [ "bigun", 2 ],
+ [ "ashot", 4 ],
+ [ "pickaxe", 1 ],
+ [ "makeshift_machete", 4 ],
+ [ "flamethrower_crude", 6 ],
+ [ "fungicide", 10 ],
+ [ "insecticide", 10 ],
+ [ "antifungal", 1 ],
+ [ "antiparasitic", 5 ],
+ [ "diazepam", 1 ],
+ [ "throw_extinguisher", 2 ],
+ [ "small_repairkit", 14 ],
+ [ "grapnel", 6 ],
+ [ "misc_repairkit", 8 ],
+ [ "survival_kit", 3 ],
+ [ "toolbox", 1 ],
+ [ "survivor_belt", 2 ],
+ [ "survivor_machete", 2 ],
+ [ "spear_survivor", 2 ],
+ [ "survivor_light", 24 ],
+ [ "survivor_mess_kit", 6 ],
+ [ "survivor_shavingkit", 3 ],
+ [ "survivor_hairtrimmer", 1 ],
+ [ "survivor_scope", 1 ],
+ [ "survnote", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "bio_op_face",
+ "items": [ [ "glasses_bal", 40 ], [ "mask_filter", 30 ], [ "mask_bal", 30 ], [ "mask_gas", 40 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "bio_op_torso",
+ "items": [ [ "dragonskin", 50 ], [ "winter_jacket_army", 10 ], [ "modularvestceramic", 40 ], [ "modularvestkevlar", 20 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "bio_op_boots",
+ "items": [ [ "boots_combat", 1 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "bio_op_gloves",
+ "items": [ [ "gloves_tactical", 60 ], [ "gloves_fingerless", 40 ], [ "winter_gloves_army", 40 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor",
+ "items": [
+ [ "armor_plate", 60 ],
+ [ "gloves_plate", 60 ],
+ [ "boots_plate", 60 ],
+ [ "armor_lightplate", 45 ],
+ [ "cuirass_lightplate", 45 ],
+ [ "armguard_lightplate", 30 ],
+ [ "legguard_lightplate", 30 ],
+ [ "helmet_barbute", 50 ],
+ [ "helmet_conical", 30 ],
+ [ "armor_lamellar", 20 ],
+ [ "armor_lorica", 25 ],
+ [ "armor_samurai", 50 ],
+ [ "helmet_kabuto", 50 ],
+ [ "helmet_larmor", 40 ],
+ [ "helmet_nasal", 50 ],
+ [ "helmet_galea", 40 ],
+ [ "boots_larmor", 40 ],
+ [ "armor_larmor", 40 ],
+ [ "armguard_larmor", 40 ],
+ [ "vambrace_larmor", 20 ],
+ [ "gambeson", 50 ],
+ [ "legguard_metal", 10 ],
+ [ "helmet_corinthian", 45 ],
+ [ "armor_cuirass", 25 ],
+ [ "legguard_bronze", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor_torso",
+ "items": [
+ [ "armor_plate", 60 ],
+ [ "armor_lightplate", 45 ],
+ [ "cuirass_lightplate", 45 ],
+ [ "armor_lamellar", 20 ],
+ [ "armor_lorica", 25 ],
+ [ "armor_samurai", 50 ],
+ [ "armor_larmor", 40 ],
+ [ "gambeson", 50 ],
+ [ "armor_cuirass", 25 ],
+ [ "chainmail_suit", 10 ],
+ [ "chainmail_vest", 3 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor_legs",
+ "items": [ [ "legguard_lightplate", 30 ], [ "legguard_metal", 10 ], [ "legguard_bronze", 20 ], [ "chainmail_legs", 10 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor_feet",
+ "items": [ [ "boots_plate", 60 ], [ "boots_larmor", 40 ] ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor_head",
+ "items": [
+ [ "helmet_barbute", 50 ],
+ [ "helmet_conical", 30 ],
+ [ "helmet_kabuto", 50 ],
+ [ "helmet_larmor", 40 ],
+ [ "helmet_nasal", 50 ],
+ [ "helmet_galea", 40 ],
+ [ "chainmail_hood", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "museum_armor_arms",
+ "items": [
+ [ "armguard_lightplate", 30 ],
+ [ "armguard_larmor", 40 ],
+ [ "vambrace_larmor", 20 ],
+ [ "gloves_plate", 60 ],
+ [ "chainmail_arms", 30 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "coat_rack",
+ "items": [
+ [ "jacket_light", 50 ],
+ [ "jacket_windbreaker", 25 ],
+ [ "jacket_jean", 35 ],
+ [ "blazer", 35 ],
+ [ "jacket_leather", 30 ],
+ [ "coat_rain", 50 ],
+ [ "trenchcoat", 10 ],
+ [ "duster", 15 ],
+ [ "peacoat", 30 ],
+ [ "tophat", 10 ],
+ [ "hat_ball", 40 ],
+ [ "fedora", 15 ],
+ [ "hat_cotton", 30 ],
+ [ "hat_knit", 20 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "laundry",
+ "items": [
+ [ "basket_laundry", 30 ],
+ [ "jeans", 90 ],
+ [ "pants_checkered", 5 ],
+ [ "shorts", 70 ],
+ [ "shorts_denim", 35 ],
+ [ "pants", 75 ],
+ [ "breeches", 10 ],
+ [ "suit", 60 ],
+ [ "waistcoat", 30 ],
+ [ "pants_leather", 60 ],
+ [ "pants_cargo", 70 ],
+ [ "shorts_cargo", 50 ],
+ [ "skirt", 75 ],
+ [ "skirt_leather", 5 ],
+ [ "tshirt", 70 ],
+ [ "longshirt", 80 ],
+ [ "polo_shirt", 65 ],
+ [ "dress_shirt", 60 ],
+ [ "tank_top", 50 ],
+ [ "camisole", 30 ],
+ [ "bra", 30 ],
+ [ "undershirt", 30 ],
+ [ "boxer_shorts", 30 ],
+ [ "briefs", 15 ],
+ [ "boxer_briefs", 20 ],
+ [ "panties", 30 ],
+ [ "boy_shorts", 25 ],
+ [ "sweatshirt", 75 ],
+ [ "sweater", 75 ],
+ [ "hoodie", 65 ],
+ [ "jacket_light", 50 ],
+ [ "jacket_windbreaker", 25 ],
+ [ "jacket_jean", 35 ],
+ [ "blazer", 35 ],
+ [ "gloves_light", 35 ],
+ [ "mittens", 30 ],
+ [ "thermal_socks", 2 ],
+ [ "thermal_gloves", 2 ],
+ [ "gloves_liner", 25 ],
+ [ "scarf", 45 ],
+ [ "scarf_long", 1 ],
+ [ "hat_cotton", 45 ],
+ [ "hat_knit", 25 ],
+ [ "hat_newsboy", 20 ],
+ [ "under_armor", 20 ],
+ [ "under_armor_shorts", 20 ],
+ [ "tights", 20 ],
+ [ "leggings", 20 ],
+ [ "stockings", 20 ],
+ [ "long_underpants", 40 ],
+ [ "long_undertop", 40 ],
+ [ "union_suit", 20 ],
+ [ "arm_warmers", 20 ],
+ [ "leg_warmers", 20 ],
+ [ "corset", 10 ],
+ [ "pants_army", 10 ],
+ [ "army_top", 20 ],
+ [ "tux", 1 ],
+ [ "gown", 1 ],
+ [ "jersey", 40 ],
+ [ "maid_dress", 3 ],
+ [ "halter_top", 50 ],
+ [ "linuxtshirt", 20 ],
+ [ "kilt", 5 ],
+ [ "nanoskirt", 10 ],
+ [ "robe", 50 ]
+ ]
+ },
+ {
+ "type": "item_group",
+ "id": "common_gloves",
+ "items": [
+ { "item": "gloves_light", "prob": 15 },
+ { "item": "gloves_leather", "prob": 15 },
+ { "item": "gloves_golf", "prob": 15 },
+ { "item": "gloves_wool", "prob": 15 },
+ { "item": "gloves_winter", "prob": 10 },
+ { "item": "gloves_fingerless", "prob": 15 },
+ { "item": "gloves_liner", "prob": 15 },
+ { "item": "mittens", "prob": 5 },
+ { "item": "thermal_gloves", "prob": 2 }
+ ]
+ },
+ {
+ "id": "dollar_clothes",
+ "type": "item_group",
+ "items": [
+ [ "bandana", 25 ],
+ [ "boxer_shorts", 25 ],
+ [ "boxer_briefs", 25 ],
+ [ "boy_shorts", 25 ],
+ [ "bra", 25 ],
+ [ "socks", 45 ],
+ [ "stockings", 20 ],
+ [ "hat_cotton", 35 ],
+ [ "copper_bracelet", 10 ],
+ [ "sunglasses", 25 ],
+ [ "tieclip", 15 ],
+ [ "hairpin", 15 ]
+ ]
}
]
diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json
index 29725dd76dc0b..d992c231332fc 100644
--- a/data/json/itemgroups/item_groups.json
+++ b/data/json/itemgroups/item_groups.json
@@ -1084,130 +1084,6 @@
{ "item": "condom", "prob": 50, "count": [ 1, 5 ] }
]
},
- {
- "type": "item_group",
- "id": "dresser",
- "ammo": 50,
- "magazine": 100,
- "items": [
- [ "jeans", 90 ],
- [ "pants_checkered", 5 ],
- [ "shorts", 70 ],
- [ "shorts_denim", 50 ],
- [ "pants", 75 ],
- [ "leather_belt", 30 ],
- [ "pants_leather", 60 ],
- [ "pants_cargo", 70 ],
- [ "shorts_cargo", 50 ],
- [ "motorbike_pants", 5 ],
- [ "breeches", 5 ],
- [ "skirt", 75 ],
- [ "dress", 70 ],
- [ "sundress", 50 ],
- [ "camisole", 60 ],
- [ "bra", 70 ],
- [ "hairpin", 30 ],
- [ "fc_hairpin", 5 ],
- [ "barrette", 15 ],
- [ "tieclip", 10 ],
- [ "collarpin", 10 ],
- [ "undershirt", 70 ],
- [ "boxer_shorts", 50 ],
- [ "briefs", 40 ],
- [ "boxer_briefs", 45 ],
- [ "panties", 70 ],
- [ "boy_shorts", 25 ],
- [ "gown", 1 ],
- [ "long_glove_white", 1 ],
- [ "veil_wedding", 1 ],
- [ "dress_wedding", 1 ],
- [ "tshirt", 80 ],
- [ "longshirt", 70 ],
- [ "polo_shirt", 65 ],
- [ "dress_shirt", 60 ],
- [ "tank_top", 50 ],
- [ "sweatshirt", 75 ],
- [ "sweater", 75 ],
- [ "hoodie", 65 ],
- [ "jacket_light", 50 ],
- [ "jacket_windbreaker", 25 ],
- [ "jacket_jean", 35 ],
- [ "blazer", 35 ],
- [ "towel", 40 ],
- [ "jacket_leather", 30 ],
- [ "motorbike_armor", 5 ],
- [ "poncho", 15 ],
- [ "folding_poncho", 5 ],
- [ "trenchcoat", 12 ],
- [ "sleeveless_trenchcoat", 2 ],
- [ "duster", 12 ],
- [ "sleeveless_duster", 2 ],
- [ "peacoat", 30 ],
- [ "greatcoat", 15 ],
- [ "vest", 15 ],
- [ "mag_porn", 20 ],
- [ "photo_album", 10 ],
- [ "lighter", 60 ],
- [ "ref_lighter", 2 ],
- [ "sewing_kit", 30 ],
- [ "thread", 40 ],
- [ "flashlight", 40 ],
- [ "suit", 60 ],
- [ "waistcoat", 30 ],
- [ "tophat", 10 ],
- [ "bowhat", 10 ],
- [ "cowboy_hat", 10 ],
- [ "bullwhip", 1 ],
- [ "10gal_hat", 5 ],
- [ "glasses_monocle", 2 ],
- [ "duct_tape", 60 ],
- [ "firecracker_pack", 5 ],
- [ "firecracker", 5 ],
- [ "wolfsuit", 4 ],
- [ "dinosuit", 4 ],
- [ "vibrator", 5 ],
- { "item": "condom", "prob": 30, "count": [ 1, 5 ] },
- [ "snuggie", 5 ],
- [ "flyer", 10 ],
- [ "socks", 70 ],
- [ "socks_wool", 30 ],
- [ "pocketwatch", 5 ],
- [ "flask_hip", 2 ],
- [ "tux", 1 ],
- [ "dress_wedding", 1 ],
- [ "clogs", 2 ],
- [ "wristwatch", 15 ],
- [ "maid_dress", 3 ],
- [ "maid_hat", 3 ],
- [ "knitting_needles", 1 ],
- [ "survnote", 1 ],
- [ "b_shorts", 15 ],
- [ "halter_top", 30 ],
- [ "linuxtshirt", 10 ],
- [ "kilt", 5 ],
- [ "nanoskirt", 10 ],
- [ "sleeveless_tunic", 5 ],
- [ "fedora", 10 ],
- [ "straw_hat", 5 ],
- [ "straw_fedora", 5 ],
- [ "holy_symbol", 20 ],
- [ "kufi", 5 ],
- [ "kippah", 5 ],
- [ "headscarf", 5 ],
- { "item": "kirpan", "container-item": "sheath", "prob": 1 },
- { "item": "kirpan_cheap", "container-item": "sheath", "prob": 3 },
- [ "robe", 10 ],
- [ "eboshi", 1 ],
- [ "kariginu", 1 ],
- [ "geta", 1 ],
- [ "kimono", 2 ],
- [ "yukata", 6 ],
- [ "haori", 2 ],
- [ "hakama", 4 ],
- [ "eclipse_glasses", 1 ],
- [ "thermos", 20 ]
- ]
- },
{
"type": "item_group",
"id": "dining",
@@ -2736,507 +2612,32 @@
[ "striped_shirt", 1 ],
[ "striped_pants", 1 ],
[ "foodperson_mask", 1 ],
- [ "razor_blade", 10 ],
- [ "survnote", 5 ],
- [ "eclipse_glasses", 1 ],
- [ "plastic_sheet", 5 ],
- [ "box_medium", 5 ],
- [ "thermos", 30 ],
- { "group": "tinware", "prob": 15 }
- ]
- },
- {
- "type": "item_group",
- "id": "trash_cart",
- "items": [
- [ "bottle_plastic", 5 ],
- [ "bottle_plastic_small", 15 ],
- [ "bottle_glass", 2 ],
- { "group": "tinware", "prob": 2 },
- [ "can_drink_unsealed", 5 ],
- [ "plastic_shopping_bag", 13 ],
- [ "bag_plastic", 15 ],
- [ "wrapper", 30 ],
- [ "flyer", 15 ],
- [ "scorecard", 10 ],
- [ "eclipse_glasses", 1 ],
- [ "plastic_sheet", 5 ]
- ]
- },
- {
- "type": "item_group",
- "id": "shoes",
- "items": [
- [ "sneakers", 80 ],
- [ "socks", 70 ],
- [ "tights", 20 ],
- [ "stockings", 20 ],
- [ "knee_high_boots", 20 ],
- [ "thigh_high_boots", 20 ],
- [ "boots", 70 ],
- [ "flip_flops", 35 ],
- [ "lowtops", 45 ],
- [ "dress_shoes", 50 ],
- [ "dance_shoes", 5 ],
- [ "heels", 50 ],
- [ "golf_shoes", 20 ],
- [ "boots_combat", 10 ],
- [ "boots_hiking", 20 ],
- [ "boots_western", 10 ],
- [ "clogs", 1 ],
- [ "leathersandals", 10 ],
- [ "rollerskates", 1 ],
- [ "roller_blades", 5 ],
- [ "roller_shoes_off", 1 ],
- [ "mocassins", 20 ]
- ]
- },
- {
- "type": "item_group",
- "id": "pants",
- "items": [
- [ "jeans", 90 ],
- [ "pants_checkered", 5 ],
- [ "shorts", 70 ],
- [ "shorts_denim", 35 ],
- [ "pants", 75 ],
- [ "leather_belt", 30 ],
- [ "pants_leather", 60 ],
- [ "pants_cargo", 70 ],
- [ "shorts_cargo", 50 ],
- [ "skirt", 75 ],
- [ "skirt_leather", 5 ],
- [ "leggings", 15 ],
- [ "under_armor_shorts", 20 ],
- [ "dress", 70 ],
- [ "sundress", 50 ],
- [ "dress_wedding", 1 ],
- [ "postman_shorts", 5 ],
- [ "b_shorts", 15 ],
- [ "kilt", 5 ],
- [ "nanoskirt", 10 ]
- ]
- },
- {
- "type": "item_group",
- "id": "shirts",
- "items": [
- [ "tshirt", 80 ],
- [ "longshirt", 80 ],
- [ "polo_shirt", 65 ],
- [ "dress_shirt", 60 ],
- [ "tank_top", 50 ],
- [ "sweatshirt", 75 ],
- [ "sweater", 75 ],
- [ "hoodie", 65 ],
- [ "under_armor", 20 ],
- [ "jersey", 40 ],
- [ "camisole", 60 ],
- [ "tie_clipon", 10 ],
- [ "tie_necktie", 10 ],
- [ "tie_skinny", 10 ],
- [ "tieclip", 5 ],
- [ "collarpin", 5 ],
- [ "postman_shirt", 5 ],
- [ "halter_top", 50 ],
- [ "linuxtshirt", 10 ],
- [ "sleeveless_tunic", 5 ],
- [ "poncho", 20 ]
- ]
- },
- {
- "type": "item_group",
- "id": "jackets",
- "items": [
- [ "jacket_light", 50 ],
- [ "jacket_windbreaker", 25 ],
- [ "jacket_jean", 35 ],
- [ "blazer", 35 ],
- [ "jacket_leather", 30 ],
- [ "coat_rain", 50 ],
- [ "trenchcoat", 12 ],
- [ "duster", 12 ],
- { "group": "neckties", "prob": 5 },
- [ "tieclip", 2 ],
- [ "collarpin", 2 ],
- [ "apron_leather", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "suits",
- "items": [
- [ "dress_shirt", 100 ],
- { "group": "neckties", "prob": 50 },
- [ "tieclip", 30 ],
- [ "collarpin", 30 ],
- [ "undershirt", 100 ],
- [ "suit", 100 ],
- [ "waistcoat", 70 ],
- [ "tophat", 30 ],
- [ "tux", 50 ],
- [ "gown", 50 ],
- [ "long_glove_white", 30 ],
- [ "breeches", 10 ]
- ]
- },
- {
- "type": "item_group",
- "id": "winter",
- "ammo": 50,
- "magazine": 100,
- "items": [
- [ "coat_winter", 50 ],
- [ "peacoat", 30 ],
- [ "ski_jacket", 40 ],
- [ "greatcoat", 15 ],
- [ "gloves_light", 35 ],
- [ "mittens", 30 ],
- [ "gloves_wool", 33 ],
- [ "thermal_socks", 10 ],
- [ "thermal_gloves", 10 ],
- [ "thermal_suit", 10 ],
- [ "thermal_mask", 10 ],
- [ "thermal_outfit", 5 ],
- [ "gloves_winter", 40 ],
- [ "gloves_liner", 25 ],
- [ "gloves_leather", 45 ],
- [ "scarf", 45 ],
- [ "knit_scarf", 35 ],
- [ "long_knit_scarf", 15 ],
- [ "scarf_long", 2 ],
- [ "hat_cotton", 45 ],
- [ "hat_newsboy", 20 ],
- [ "hat_knit", 25 ],
- [ "hat_fur", 15 ],
- [ "hat_faux_fur", 20 ],
- [ "pants_ski", 60 ],
- [ "mask_ski", 15 ],
- [ "long_underpants", 40 ],
- [ "long_undertop", 40 ],
- [ "union_suit", 40 ],
- [ "tights", 20 ],
- [ "arm_warmers", 20 ],
- [ "leg_warmers", 20 ],
- [ "balclava", 15 ]
- ]
- },
- {
- "type": "item_group",
- "id": "fancyfurs",
- "items": [
- [ "hat_fur", 300 ],
- [ "hat_faux_fur", 300 ],
- [ "sleeveless_trenchcoat_fur", 10 ],
- [ "sleeveless_duster_fur", 10 ],
- [ "sleeveless_trenchcoat_faux_fur", 10 ],
- [ "coat_fur_sf", 100 ],
- [ "coat_faux_fur", 300 ],
- [ "coat_fur", 300 ],
- [ "gloves_fur", 300 ],
- [ "boots_fur", 200 ],
- [ "trenchcoat_faux_fur", 50 ],
- [ "duster_faux_fur", 50 ],
- [ "pants_faux_fur", 50 ]
- ]
- },
- {
- "type": "item_group",
- "id": "hatstore_hats",
- "items": [
- [ "hat_cotton", 30 ],
- [ "hat_knit", 40 ],
- [ "hat_faux_fur", 30 ],
- [ "hat_fur", 20 ],
- [ "hat_newsboy", 20 ],
- [ "hat_sombrero", 30 ],
- [ "fedora", 100 ],
- [ "straw_hat", 100 ],
- [ "straw_fedora", 100 ],
- [ "hat_chef", 10 ],
- [ "maid_hat", 30 ],
- [ "hat_golf", 50 ],
- [ "hat_ball", 100 ],
- [ "postman_hat", 10 ],
- [ "tophat", 50 ],
- [ "bowhat", 50 ],
- [ "cowboy_hat", 100 ],
- [ "10gal_hat", 100 ],
- [ "kufi", 30 ],
- [ "kippah", 30 ],
- [ "eboshi", 30 ],
- [ "balclava", 20 ],
- [ "porkpie", 30 ]
- ]
- },
- {
- "type": "item_group",
- "id": "hatstore_accessories",
- "items": [
- [ "scarf", 50 ],
- [ "knit_scarf", 50 ],
- [ "long_knit_scarf", 30 ],
- [ "scarf_long", 30 ],
- [ "bandana", 100 ],
- [ "hairpin", 50 ],
- [ "fc_hairpin", 20 ],
- [ "barrette", 30 ]
- ]
- },
- {
- "type": "item_group",
- "id": "shoestore_shoes",
- "items": [
- [ "sneakers", 100 ],
- [ "knee_high_boots", 40 ],
- [ "thigh_high_boots", 40 ],
- [ "boots", 100 ],
- [ "flip_flops", 50 ],
- [ "lowtops", 100 ],
- [ "dress_shoes", 50 ],
- [ "dance_shoes", 20 ],
- [ "heels", 100 ],
- [ "golf_shoes", 40 ],
- [ "boots_hiking", 40 ],
- [ "boots_western", 60 ],
- [ "clogs", 60 ],
- [ "leathersandals", 100 ],
- [ "rollerskates", 10 ],
- [ "roller_blades", 20 ],
- [ "roller_shoes_off", 10 ],
- [ "boots_rubber", 20 ],
- [ "clownshoes", 10 ],
- [ "mocassins", 40 ]
- ]
- },
- {
- "type": "item_group",
- "id": "shoestore_accessories",
- "items": [ [ "socks", 100 ], [ "thermal_socks", 25 ], [ "socks_wool", 50 ], [ "string_36", 200 ] ]
- },
- {
- "type": "item_group",
- "id": "bags",
- "items": [
- [ "backpack", 38 ],
- [ "backpack_hiking", 3 ],
- [ "petpack", 3 ],
- [ "backpack_tactical_large", 1 ],
- [ "bigback", 1 ],
- [ "travelpack", 5 ],
- [ "purse", 40 ],
- [ "mbag", 20 ],
- [ "slingpack", 8 ],
- [ "rucksack", 20 ],
- [ "backpack_leather", 8 ],
- [ "briefcase", 10 ]
- ]
- },
- {
- "type": "item_group",
- "id": "bags_trip",
- "items": [ [ "suitcase_l", 37 ], [ "suitcase_m", 55 ], [ "duffelbag", 8 ] ]
- },
- {
- "type": "item_group",
- "id": "dresses",
- "items": [ [ "dress", 55 ], [ "sundress", 43 ], [ "gown", 10 ], [ "dress_wedding", 2 ] ]
- },
- {
- "type": "item_group",
- "id": "female_underwear_top",
- "items": [ [ "bra", 70 ], [ "sports_bra", 50 ], [ "bikini_top", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "female_underwear_bottom",
- "items": [ [ "panties", 70 ], [ "boy_shorts", 50 ], [ "bikini_bottom", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "male_underwear_top",
- "items": [ [ "undershirt", 50 ], [ "long_undertop", 20 ], [ "under_armor", 20 ], [ "tank_top", 50 ] ]
- },
- {
- "type": "item_group",
- "id": "male_underwear_bottom",
- "items": [
- [ "boxer_shorts", 70 ],
- [ "briefs", 30 ],
- [ "boxer_briefs", 50 ],
- [ "long_underpants", 20 ],
- [ "under_armor_shorts", 20 ]
- ]
- },
- {
- "type": "item_group",
- "id": "allclothes",
- "items": [
- [ "jeans", 90 ],
- [ "pants_checkered", 5 ],
- [ "shorts", 70 ],
- [ "shorts_denim", 35 ],
- [ "ski_jacket", 40 ],
- [ "pants", 75 ],
- [ "breeches", 10 ],
- [ "leather_belt", 30 ],
- [ "suit", 60 ],
- [ "waistcoat", 30 ],
- [ "tophat", 10 ],
- [ "bowhat", 10 ],
- [ "cowboy_hat", 10 ],
- [ "boots_western", 8 ],
- [ "glasses_monocle", 2 ],
- [ "pants_leather", 60 ],
- [ "pants_cargo", 70 ],
- [ "shorts_cargo", 50 ],
- [ "skirt", 75 ],
- [ "skirt_leather", 5 ],
- [ "tshirt", 70 ],
- [ "longshirt", 80 ],
- [ "polo_shirt", 65 ],
- [ "dress_shirt", 60 ],
- [ "tank_top", 50 ],
- [ "camisole", 30 ],
- [ "bra", 30 ],
- [ "undershirt", 30 ],
- [ "boxer_shorts", 30 ],
- [ "briefs", 15 ],
- [ "boxer_briefs", 20 ],
- [ "panties", 30 ],
- [ "boy_shorts", 25 ],
- [ "sweatshirt", 75 ],
- [ "sweater", 75 ],
- [ "hoodie", 65 ],
- [ "jacket_light", 50 ],
- [ "jacket_windbreaker", 25 ],
- [ "jacket_jean", 35 ],
- [ "blazer", 35 ],
- [ "jacket_leather", 30 ],
- [ "coat_winter", 50 ],
- [ "peacoat", 30 ],
- [ "greatcoat", 15 ],
- [ "gloves_light", 35 ],
- [ "mittens", 30 ],
- [ "gloves_wool", 33 ],
- [ "thermal_socks", 2 ],
- [ "thermal_gloves", 2 ],
- [ "thermal_suit", 2 ],
- [ "thermal_mask", 2 ],
- [ "thermal_outfit", 1 ],
- [ "gloves_winter", 40 ],
- [ "gloves_liner", 25 ],
- [ "gloves_leather", 45 ],
- [ "gloves_work", 5 ],
- [ "scarf", 45 ],
- [ "hat_golf", 30 ],
- [ "knit_scarf", 35 ],
- [ "long_knit_scarf", 5 ],
- [ "scarf_long", 1 ],
- [ "hat_cotton", 45 ],
- [ "hat_knit", 25 ],
- [ "hat_newsboy", 20 ],
- [ "hat_sombrero", 3 ],
- [ "hat_fur", 15 ],
- [ "hat_faux_fur", 20 ],
- [ "under_armor", 20 ],
- [ "under_armor_shorts", 20 ],
- [ "tights", 20 ],
- [ "leggings", 20 ],
- [ "stockings", 20 ],
- [ "balclava", 15 ],
- [ "pants_ski", 60 ],
- [ "long_underpants", 40 ],
- [ "long_undertop", 40 ],
- [ "union_suit", 20 ],
- [ "arm_warmers", 20 ],
- [ "leg_warmers", 20 ],
- [ "trenchcoat_leather", 12 ],
- [ "trenchcoat_faux_fur", 6 ],
- [ "sleeveless_trenchcoat", 2 ],
- [ "sleeveless_trenchcoat_leather", 2 ],
- [ "sleeveless_trenchcoat_faux_fur", 2 ],
- [ "trenchcoat_leather", 12 ],
- [ "sleeveless_trenchcoat_fur", 1 ],
- [ "duster_leather", 12 ],
- [ "duster_faux_fur", 6 ],
- [ "sleeveless_duster", 2 ],
- [ "sleeveless_duster_leather", 2 ],
- [ "sleeveless_duster_faux_fur", 2 ],
- [ "sleeveless_duster_fur", 1 ],
- [ "cloak", 5 ],
- [ "cloak_wool", 5 ],
- [ "house_coat", 25 ],
- [ "flotation_vest", 1 ],
- [ "fishing_waders", 5 ],
- [ "wetsuit", 5 ],
- [ "wetsuit_spring", 5 ],
- [ "wetsuit_gloves", 10 ],
- [ "wetsuit_booties", 10 ],
- [ "wetsuit_hood", 5 ],
- [ "dive_bag", 5 ],
- [ "jedi_cloak", 1 ],
- [ "apron_leather", 1 ],
- [ "clown_suit", 1 ],
- [ "clownshoes", 1 ],
- [ "bondage_suit", 1 ],
- [ "bondage_mask", 1 ],
- [ "corset", 10 ],
- [ "chestwrap", 5 ],
- [ "boots_combat", 10 ],
- [ "pants_army", 10 ],
- [ "jacket_army", 10 ],
- [ "winter_pants_army", 10 ],
- [ "winter_jacket_army", 10 ],
- [ "winter_gloves_army", 10 ],
- [ "army_top", 20 ],
- [ "tux", 1 ],
- [ "gown", 1 ],
- [ "long_glove_white", 1 ],
- [ "veil_wedding", 1 ],
- [ "dress_wedding", 1 ],
- [ "porkpie", 5 ],
- [ "tie_bow", 5 ],
- [ "tie_clipon", 5 ],
- [ "tie_necktie", 5 ],
- [ "tie_skinny", 5 ],
- [ "tieclip", 2 ],
- [ "collarpin", 2 ],
- [ "jersey", 40 ],
- [ "postman_shorts", 5 ],
- [ "postman_shirt", 5 ],
- [ "postman_hat", 5 ],
- [ "maid_dress", 3 ],
- [ "maid_hat", 3 ],
- [ "halter_top", 50 ],
- [ "linuxtshirt", 20 ],
- [ "kilt", 5 ],
- [ "nanoskirt", 10 ],
- [ "sleeveless_tunic", 5 ],
- [ "ear_spool", 30 ],
- [ "fedora", 5 ],
- [ "straw_hat", 5 ],
- [ "straw_fedora", 5 ],
- [ "kufi", 2 ],
- [ "kippah", 2 ],
- [ "thawb", 1 ],
- [ "kittel", 1 ],
- [ "cassock", 1 ],
- [ "robe", 5 ],
- [ "eboshi", 1 ],
- [ "kariginu", 1 ],
- [ "geta", 1 ],
- [ "kimono", 2 ],
- [ "yukata", 4 ],
- [ "haori", 1 ],
- [ "hakama", 2 ]
+ [ "razor_blade", 10 ],
+ [ "survnote", 5 ],
+ [ "eclipse_glasses", 1 ],
+ [ "plastic_sheet", 5 ],
+ [ "box_medium", 5 ],
+ [ "thermos", 30 ],
+ { "group": "tinware", "prob": 15 }
]
},
{
"type": "item_group",
- "id": "allclothes_damaged",
- "subtype": "distribution",
- "items": [ { "group": "allclothes", "damage": [ 3, 4 ] } ]
+ "id": "trash_cart",
+ "items": [
+ [ "bottle_plastic", 5 ],
+ [ "bottle_plastic_small", 15 ],
+ [ "bottle_glass", 2 ],
+ { "group": "tinware", "prob": 2 },
+ [ "can_drink_unsealed", 5 ],
+ [ "plastic_shopping_bag", 13 ],
+ [ "bag_plastic", 15 ],
+ [ "wrapper", 30 ],
+ [ "flyer", 15 ],
+ [ "scorecard", 10 ],
+ [ "eclipse_glasses", 1 ],
+ [ "plastic_sheet", 5 ]
+ ]
},
{
"type": "item_group",
@@ -3464,70 +2865,6 @@
[ "survnote", 2 ]
]
},
- {
- "type": "item_group",
- "id": "swimmer_head",
- "items": [
- [ "goggles_swim", 90 ],
- [ "wetsuit_hood", 30 ],
- [ "fancy_sunglasses", 1 ],
- [ "rebreather", 1 ],
- [ "fitover_sunglasses", 5 ],
- [ "sunglasses", 10 ]
- ]
- },
- {
- "type": "item_group",
- "id": "swimmer_torso",
- "items": [ [ "bikini_top", 50 ], [ "dive_bag", 5 ], [ "flotation_vest", 10 ], [ "scuba_tank", 2 ] ]
- },
- {
- "type": "item_group",
- "id": "swimmer_pants",
- "items": [ [ "trunks", 80 ], [ "bikini_bottom", 35 ], [ "hot_pants", 30 ] ]
- },
- {
- "type": "item_group",
- "id": "swimmer_shoes",
- "items": [ [ "flip_flops", 80 ], [ "swim_fins", 20 ] ]
- },
- {
- "type": "item_group",
- "id": "swimmer_wetsuit",
- "items": [ [ "wetsuit", 90 ], [ "wetsuit_spring", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "lab_shoes",
- "items": [ [ "sneakers", 80 ], [ "boots", 70 ], [ "boots_steel", 50 ], [ "boots_hiking", 40 ], [ "dress_shoes", 50 ] ]
- },
- {
- "type": "item_group",
- "id": "lab_torso",
- "items": [
- [ "coat_lab", 20 ],
- [ "coat_lab", 20 ],
- [ "coat_lab", 20 ],
- [ "coat_lab", 20 ],
- [ "tshirt", 80 ],
- [ "longshirt", 80 ],
- [ "polo_shirt", 65 ],
- [ "dress_shirt", 60 ],
- [ "dress", 70 ],
- [ "sweatshirt", 75 ],
- [ "sweater", 75 ],
- [ "hoodie", 65 ],
- [ "jumpsuit", 20 ],
- [ "badge_doctor", 10 ],
- [ "hazmat_suit", 5 ],
- [ "cleansuit", 10 ]
- ]
- },
- {
- "type": "item_group",
- "id": "lab_pants",
- "items": [ [ "jeans", 90 ], [ "pants_checkered", 5 ], [ "pants", 75 ], [ "pants_cargo", 70 ], [ "skirt", 75 ] ]
- },
{
"type": "item_group",
"id": "hospital_lab",
@@ -3658,22 +2995,6 @@
[ "thermos", 10 ]
]
},
- {
- "type": "item_group",
- "id": "postman_gear",
- "items": [
- [ "postman_hat", 50 ],
- [ "postman_shirt", 70 ],
- [ "postman_shorts", 70 ],
- [ "mbag", 40 ],
- [ "newest_newspaper", 10 ],
- [ "wristwatch", 50 ],
- [ "leather_belt", 70 ],
- [ "briefs", 90 ],
- [ "socks", 70 ],
- [ "sneakers", 70 ]
- ]
- },
{
"type": "item_group",
"id": "surgery",
@@ -5878,141 +5199,6 @@
[ "c4", 50 ]
]
},
- {
- "type": "item_group",
- "id": "mil_armor",
- "items": [
- [ "pants_army", 10 ],
- [ "jacket_army", 10 ],
- [ "winter_pants_army", 30 ],
- [ "winter_jacket_army", 30 ],
- [ "winter_gloves_army", 30 ],
- [ "army_top", 30 ],
- [ "kevlar", 10 ],
- [ "modularvest", 15 ],
- [ "modularvestkevlar", 18 ],
- [ "modularvestceramic", 25 ],
- [ "modularveststeel", 20 ],
- [ "modularvestsuper", 2 ],
- [ "modularvesthard", 1 ],
- [ "vest", 15 ],
- [ "mask_gas", 10 ],
- [ "goggles_nv", 1 ],
- [ "goggles_ir", 1 ],
- [ "optical_cloak", 1 ],
- [ "holo_cloak", 1 ],
- [ "backpack", 38 ],
- [ "UPS_off", 5 ],
- [ "adv_UPS_off", 3 ],
- [ "tacvest", 10 ],
- [ "molle_pack", 8 ],
- [ "duffelbag", 15 ],
- [ "dump_pouch", 20 ],
- [ "legrig", 10 ],
- [ "under_armor", 20 ],
- [ "boots", 70 ],
- [ "boots_combat", 70 ],
- [ "gloves_tactical", 30 ],
- [ "glasses_bal", 40 ],
- [ "armguard_hard", 20 ],
- [ "legguard_hard", 15 ],
- [ "power_armor_helmet_basic", 3 ],
- [ "power_armor_basic", 3 ],
- [ "power_armor_frame", 4 ],
- [ "helmet_army", 40 ],
- [ "helmet_liner", 10 ],
- [ "UPS_off", 5 ],
- [ "adv_UPS_off", 3 ],
- [ "beret", 50 ],
- [ "beret_wool", 40 ],
- [ "elbow_pads", 50 ],
- [ "knee_pads", 50 ],
- [ "solarpack", 5 ]
- ]
- },
- {
- "type": "item_group",
- "id": "mil_accessories",
- "items": [
- [ "mask_gas", 10 ],
- [ "duffelbag", 15 ],
- [ "goggles_nv", 1 ],
- [ "goggles_ir", 1 ],
- [ "optical_cloak", 1 ],
- [ "holo_cloak", 1 ],
- [ "mess_kit", 9 ],
- [ "mil_mess_kit", 1 ],
- [ "backpack", 38 ],
- [ "briefcase", 10 ],
- [ "UPS_off", 5 ],
- [ "adv_UPS_off", 3 ],
- [ "armguard_hard", 20 ],
- [ "legguard_hard", 15 ],
- [ "power_armor_frame", 4 ],
- [ "elbow_pads", 40 ],
- [ "knee_pads", 40 ],
- [ "mask_bal", 5 ],
- [ "e_tool", 10 ],
- [ "waterproof_gunmod", 8 ],
- [ "grapnel", 3 ],
- [ "glasses_bal", 30 ],
- [ "sheath", 10 ],
- [ "bootsheath", 8 ],
- [ "holster", 15 ],
- [ "sholster", 10 ],
- [ "bandolier_shotgun", 8 ],
- [ "solarpack", 5 ],
- [ "chem_hexamine", 3 ],
- [ "esbit_stove", 6 ],
- [ "mess_tin", 4 ],
- [ "survival_kit", 4 ]
- ]
- },
- {
- "type": "item_group",
- "id": "mil_armor_torso",
- "items": [
- [ "kevlar", 10 ],
- [ "modularvest", 15 ],
- [ "modularvestkevlar", 18 ],
- [ "modularvestceramic", 25 ],
- [ "modularveststeel", 20 ],
- [ "modularvestsuper", 2 ],
- [ "modularvesthard", 1 ],
- [ "winter_jacket_army", 30 ],
- [ "vest", 15 ],
- [ "tacvest", 10 ],
- [ "molle_pack", 8 ],
- [ "under_armor", 20 ],
- [ "power_armor_basic", 5 ],
- [ "army_top", 30 ],
- [ "elbow_pads", 20 ]
- ]
- },
- {
- "type": "item_group",
- "id": "mil_armor_helmet",
- "items": [
- [ "helmet_army", 40 ],
- [ "helmet_liner", 20 ],
- [ "beret", 50 ],
- [ "beret_wool", 40 ],
- [ "mask_bal", 10 ],
- [ "power_armor_helmet_basic", 4 ]
- ]
- },
- {
- "type": "item_group",
- "id": "mil_armor_pants",
- "items": [
- [ "pants_army", 10 ],
- [ "winter_pants_army", 40 ],
- [ "pants", 75 ],
- [ "pants_cargo", 70 ],
- [ "legrig", 10 ],
- [ "knee_pads", 20 ]
- ]
- },
{
"type": "item_group",
"id": "mil_food",
@@ -6247,118 +5433,39 @@
[ "chain", 20 ],
[ "knuckle_brass", 20 ],
[ "hammer", 35 ],
- [ "wrench", 30 ],
- [ "hammer_sledge", 6 ],
- [ "hatchet", 10 ],
- [ "ax", 8 ],
- [ "knife_combat", 14 ],
- [ "kukri", 2 ],
- [ "knife_hunting", 4 ],
- [ "knife_rambo", 8 ],
- [ "knife_rm42", 2 ],
- [ "throwing_knife", 7 ],
- [ "throwing_axe", 6 ],
- [ "punch_dagger", 6 ],
- [ "pipe", 20 ],
- [ "bat", 60 ],
- [ "bullwhip", 10 ],
- [ "machete", 5 ],
- [ "baton", 8 ],
- [ "blackjack", 10 ],
- [ "tazer", 3 ],
- [ "rapier", 3 ],
- [ "cavalry_sabre", 2 ],
- [ "bat_metal", 60 ],
- [ "e_tool", 2 ],
- [ "knife_trench", 7 ],
- [ "switchblade", 4 ],
- [ "tonfa", 10 ],
- [ "tonfa_wood", 10 ],
- [ "shocktonfa_off", 5 ],
- [ "tanto", 7 ],
- [ "wakizashi", 3 ],
- [ "nodachi", 1 ],
- [ "katana", 2 ],
- [ "survnote", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survival_armor",
- "items": [
- [ "boots_steel", 50 ],
- [ "boots_combat", 50 ],
- [ "boots_hiking", 50 ],
- [ "bootsheath", 8 ],
- [ "pants_cargo", 70 ],
- [ "shorts_cargo", 50 ],
- [ "pants_army", 30 ],
- [ "jacket_army", 30 ],
- [ "winter_pants_army", 10 ],
- [ "winter_jacket_army", 10 ],
- [ "winter_gloves_army", 10 ],
- [ "jumpsuit", 20 ],
- [ "jacket_leather", 30 ],
- [ "sleeveless_trenchcoat", 2 ],
- [ "sleeveless_trenchcoat_leather", 5 ],
- [ "sleeveless_duster", 2 ],
- [ "sleeveless_duster_leather", 5 ],
- [ "kevlar", 30 ],
- [ "modularvest", 12 ],
- [ "modularvestkevlar", 10 ],
- [ "modularvestceramic", 8 ],
- [ "modularveststeel", 5 ],
- [ "modularvestsuper", 1 ],
- [ "dump_pouch", 20 ],
- [ "mask_bal", 5 ],
- [ "vest", 15 ],
- [ "gloves_fingerless", 20 ],
- [ "gloves_tactical", 20 ],
- [ "glasses_bal", 20 ],
- [ "elbow_pads", 40 ],
- [ "knee_pads", 40 ],
- [ "mask_filter", 30 ],
- [ "mask_gas", 10 ],
- [ "goggles_ski", 30 ],
- [ "helmet_skid", 30 ],
- [ "armguard_hard", 20 ],
- [ "legguard_hard", 15 ],
- [ "under_armor", 20 ],
- [ "long_underpants", 40 ],
- [ "long_undertop", 40 ],
- [ "union_suit", 20 ],
- [ "helmet_ball", 45 ],
- [ "helmet_riot", 25 ],
- [ "helmet_motor", 40 ],
- [ "touring_suit", 15 ],
- [ "motorbike_armor", 5 ],
- [ "motorbike_pants", 5 ],
- [ "motorbike_boots", 5 ],
- [ "holster", 8 ],
- [ "sholster", 4 ],
- [ "bootstrap", 3 ],
- [ "legpouch", 12 ],
- [ "legpouch_large", 6 ],
- [ "chestpouch", 9 ],
- [ "ammo_satchel", 4 ],
- [ "UPS_off", 5 ],
- [ "adv_UPS_off", 3 ],
- [ "tacvest", 10 ],
- [ "molle_pack", 8 ],
- [ "legrig", 10 ],
- [ "rucksack", 20 ],
- [ "emer_blanket", 20 ],
- [ "flotation_vest", 1 ],
- [ "fishing_waders", 2 ],
- [ "cloak", 5 ],
- [ "cloak_wool", 5 ],
- [ "tac_helmet", 5 ],
- [ "tac_fullhelmet", 2 ],
- [ "helmet_lobster", 2 ],
- [ "apron_leather", 2 ],
- [ "tool_belt", 5 ],
- [ "bootsheath", 8 ],
- [ "sheath", 5 ]
+ [ "wrench", 30 ],
+ [ "hammer_sledge", 6 ],
+ [ "hatchet", 10 ],
+ [ "ax", 8 ],
+ [ "knife_combat", 14 ],
+ [ "kukri", 2 ],
+ [ "knife_hunting", 4 ],
+ [ "knife_rambo", 8 ],
+ [ "knife_rm42", 2 ],
+ [ "throwing_knife", 7 ],
+ [ "throwing_axe", 6 ],
+ [ "punch_dagger", 6 ],
+ [ "pipe", 20 ],
+ [ "bat", 60 ],
+ [ "bullwhip", 10 ],
+ [ "machete", 5 ],
+ [ "baton", 8 ],
+ [ "blackjack", 10 ],
+ [ "tazer", 3 ],
+ [ "rapier", 3 ],
+ [ "cavalry_sabre", 2 ],
+ [ "bat_metal", 60 ],
+ [ "e_tool", 2 ],
+ [ "knife_trench", 7 ],
+ [ "switchblade", 4 ],
+ [ "tonfa", 10 ],
+ [ "tonfa_wood", 10 ],
+ [ "shocktonfa_off", 5 ],
+ [ "tanto", 7 ],
+ [ "wakizashi", 3 ],
+ [ "nodachi", 1 ],
+ [ "katana", 2 ],
+ [ "survnote", 1 ]
]
},
{
@@ -6410,30 +5517,6 @@
[ "chem_aluminium_sulphate", 20 ]
]
},
- {
- "type": "item_group",
- "id": "construction_worker",
- "items": [
- [ "boots", 70 ],
- [ "boots_steel", 50 ],
- [ "boots_hiking", 10 ],
- [ "jumpsuit", 20 ],
- [ "gloves_rubber", 20 ],
- [ "gloves_leather", 45 ],
- [ "gloves_work", 45 ],
- [ "mask_filter", 30 ],
- [ "glasses_safety", 40 ],
- [ "hat_hard", 50 ],
- [ "hat_hard_hooded", 25 ],
- [ "wearable_light", 5 ],
- [ "ear_plugs", 50 ],
- { "group": "ammo_any_batteries_full", "prob": 50 },
- [ "flashlight", 40 ],
- [ "boots_rubber", 20 ],
- [ "toolbox", 1 ],
- [ "apron_leather", 10 ]
- ]
- },
{
"type": "item_group",
"id": "mine_storage",
@@ -7926,73 +7009,11 @@
"id": "cow",
"items": [ [ "cow_bell", 1 ] ]
},
- {
- "type": "item_group",
- "id": "loincloth",
- "items": [ [ "loincloth", 2 ], [ "loincloth_wool", 1 ], [ "loincloth_fur", 1 ], [ "loincloth_leather", 1 ] ]
- },
{
"type": "item_group",
"id": "dog_cop",
"items": [ [ "kevlar_harness", 1 ] ]
},
- {
- "type": "item_group",
- "id": "fireman_torso",
- "items": [ [ "bunker_coat", 80 ], [ "vest", 30 ] ]
- },
- {
- "type": "item_group",
- "id": "fireman_pants",
- "items": [ [ "bunker_pants", 80 ], [ "nomex_suit", 40 ], [ "pants_cargo", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "fireman_boots",
- "items": [
- [ "boots_bunker", 70 ],
- [ "boots_steel", 20 ],
- [ "boots_combat", 5 ],
- [ "boots_rubber", 10 ],
- [ "boots_hiking", 5 ],
- [ "nomex_socks", 40 ]
- ]
- },
- {
- "type": "item_group",
- "id": "fireman_gloves",
- "items": [
- [ "fire_gauntlets", 60 ],
- [ "gloves_medical", 5 ],
- [ "gloves_tactical", 20 ],
- [ "gloves_rubber", 10 ],
- [ "nomex_gloves", 30 ]
- ]
- },
- {
- "type": "item_group",
- "id": "fireman_head",
- "items": [
- [ "firehelmet", 60 ],
- [ "hat_knit", 10 ],
- [ "nomex_hood", 40 ],
- [ "hat_hard", 5 ],
- [ "hat_hard_hooded", 3 ],
- [ "hat_noise_cancelling", 5 ]
- ]
- },
- {
- "type": "item_group",
- "id": "fireman_mask",
- "items": [
- [ "mask_bunker", 70 ],
- [ "mask_dust", 30 ],
- [ "mask_gas", 20 ],
- [ "mask_filter", 10 ],
- [ "goggles_ir", 2 ],
- [ "goggles_nv", 1 ]
- ]
- },
{
"type": "item_group",
"id": "fireman_gear",
@@ -8063,36 +7084,6 @@
[ "bag_body_bag", 5 ]
]
},
- {
- "type": "item_group",
- "id": "hazmat_torso",
- "items": [ [ "cleansuit", 40 ], [ "jumpsuit", 60 ] ]
- },
- {
- "type": "item_group",
- "id": "hazmat_boots",
- "items": [ [ "boots_rubber", 1 ] ]
- },
- {
- "type": "item_group",
- "id": "hazmat_gloves",
- "items": [ [ "gloves_medical", 60 ], [ "gloves_rubber", 40 ] ]
- },
- {
- "type": "item_group",
- "id": "hazmat_full",
- "items": [ [ "hazmat_suit", 80 ], [ "anbc_suit", 20 ] ]
- },
- {
- "type": "item_group",
- "id": "hazmat_mask",
- "items": [ [ "mask_dust", 80 ], [ "mask_filter", 20 ], [ "mask_gas", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "hazmat_eyes",
- "items": [ [ "glasses_safety", 50 ] ]
- },
{
"type": "item_group",
"id": "rad_gear",
@@ -8107,280 +7098,6 @@
[ "iodine", 50 ]
]
},
- {
- "type": "item_group",
- "id": "survivorzed_suits",
- "items": [
- [ "survivor_suit", 8 ],
- [ "lsurvivor_suit", 10 ],
- [ "hsurvivor_suit", 6 ],
- [ "wsurvivor_suit", 6 ],
- [ "fsurvivor_suit", 4 ],
- [ "h20survivor_suit", 2 ],
- [ "touring_suit", 16 ],
- [ "armor_larmor", 28 ],
- [ "armor_blarmor", 14 ],
- [ "armor_farmor", 8 ],
- [ "armor_plarmor", 2 ],
- [ "swat_armor", 6 ],
- [ "aep_suit", 4 ],
- [ "armor_scrapsuit", 12 ],
- [ "armor_chitin", 2 ],
- [ "armor_lightplate", 1 ],
- [ "cuirass_lightplate", 2 ],
- [ "armor_plate", 1 ],
- [ "bondage_suit", 1 ],
- [ "snuggie", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_tops",
- "items": [
- [ "trenchcoat_survivor", 5 ],
- [ "sleeveless_trenchcoat_survivor", 2 ],
- [ "duster_survivor", 5 ],
- [ "sleeveless_duster_survivor", 2 ],
- [ "vest", 40 ],
- [ "kevlar", 16 ],
- [ "jacket_army", 28 ],
- [ "trenchcoat", 12 ],
- [ "trenchcoat_leather", 10 ],
- [ "trenchcoat_fur", 5 ],
- [ "sleeveless_trenchcoat", 7 ],
- [ "sleeveless_trenchcoat_leather", 5 ],
- [ "sleeveless_trenchcoat_fur", 2 ],
- [ "duster", 12 ],
- [ "duster_leather", 10 ],
- [ "duster_fur", 5 ],
- [ "sleeveless_duster", 7 ],
- [ "sleeveless_duster_leather", 5 ],
- [ "sleeveless_duster_fur", 2 ],
- [ "peacoat", 14 ],
- [ "greatcoat", 7 ],
- [ "vest_leather", 22 ],
- [ "bunker_coat", 6 ],
- [ "bookplate", 10 ],
- [ "modularvest", 4 ],
- [ "modularvesthard", 1 ],
- [ "modularvestkevlar", 2 ],
- [ "modularvestceramic", 2 ],
- [ "modularveststeel", 1 ],
- [ "modularvestsuper", 1 ],
- [ "dragonskin", 1 ],
- [ "corset", 1 ],
- [ "football_armor", 18 ],
- [ "jacket_leather", 12 ],
- [ "jacket_jean", 8 ],
- [ "jacket_flannel", 6 ],
- [ "cuirass_scrap", 12 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_bottoms",
- "items": [
- [ "pants_survivor", 10 ],
- [ "pants_cargo", 40 ],
- [ "shorts_cargo", 22 ],
- [ "pants_army", 28 ],
- [ "winter_pants_army", 10 ],
- [ "bunker_pants", 14 ],
- [ "pants_leather", 18 ],
- [ "legguard_scrap", 12 ],
- [ "skirt", 6 ],
- [ "kilt", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_gloves",
- "items": [
- [ "gloves_lsurvivor", 10 ],
- [ "gloves_survivor", 8 ],
- [ "gloves_hsurvivor", 4 ],
- [ "gloves_wsurvivor", 4 ],
- [ "gloves_fsurvivor", 2 ],
- [ "gloves_h20survivor", 1 ],
- [ "gloves_fingerless", 28 ],
- [ "gloves_fingerless_mod", 20 ],
- [ "gloves_tactical", 12 ],
- [ "gauntlets_larmor", 14 ],
- [ "gauntlets_chitin", 2 ],
- [ "armguard_larmor", 7 ],
- [ "vambrace_larmor", 6 ],
- [ "armguard_chitin", 1 ],
- [ "armguard_scrap", 12 ],
- [ "gloves_fur", 4 ],
- [ "gloves_leather", 22 ],
- [ "gloves_work", 22 ],
- [ "gloves_plate", 2 ],
- [ "gloves_wraps", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_boots",
- "items": [
- [ "boots_lsurvivor", 10 ],
- [ "boots_survivor", 8 ],
- [ "boots_hsurvivor", 4 ],
- [ "boots_wsurvivor", 4 ],
- [ "boots_fsurvivor", 2 ],
- [ "boots_h20survivor", 1 ],
- [ "boots", 20 ],
- [ "boots_scrap", 12 ],
- [ "boots_steel", 28 ],
- [ "boots_hiking", 24 ],
- [ "knee_high_boots", 8 ],
- [ "boots_combat", 12 ],
- [ "boots_larmor", 14 ],
- [ "boots_fur", 22 ],
- [ "boots_plate", 2 ],
- [ "boots_bunker", 8 ],
- [ "footrags", 1 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_head",
- "items": [
- [ "hood_lsurvivor", 10 ],
- [ "hood_survivor", 8 ],
- [ "helmet_survivor", 8 ],
- [ "helmet_hsurvivor", 4 ],
- [ "hood_wsurvivor", 4 ],
- [ "hood_fsurvivor", 2 ],
- [ "hood_h20survivor", 1 ],
- [ "helmet_army", 26 ],
- [ "tac_helmet", 22 ],
- [ "helmet_riot", 18 ],
- [ "tac_fullhelmet", 8 ],
- [ "helmet_lobster", 8 ],
- [ "pot_helmet", 22 ],
- [ "helmet_larmor", 14 ],
- [ "pickelhaube", 1 ],
- [ "firehelmet", 2 ],
- [ "helmet_barbute", 1 ],
- [ "helmet_plate", 1 ],
- [ "helmet_scrap", 12 ],
- [ "bondage_mask", 1 ],
- [ "survivor_goggles", 10 ],
- [ "hood_rain", 14 ]
- ]
- },
- {
- "type": "item_group",
- "id": "survivorzed_extra",
- "items": [
- [ "daypack", 4 ],
- [ "mask_lsurvivor", 10 ],
- [ "mask_survivor", 8 ],
- [ "mask_hsurvivor", 6 ],
- [ "survivor_vest", 8 ],
- [ "survivor_runner_pack", 6 ],
- [ "survivor_pack", 5 ],
- [ "survivor_rucksack", 4 ],
- [ "survivor_duffel_bag", 3 ],
- [ "dive_bag", 10 ],
- [ "runner_bag", 20 ],
- [ "molle_pack", 12 ],
- [ "backpack", 40 ],
- [ "backpack_leather", 32 ],
- [ "mbag", 26 ],
- [ "purse", 14 ],
- [ "slingpack", 12 ],
- [ "rucksack", 12 ],
- [ "duffelbag", 8 ],
- [ "mask_h20survivor", 1 ],
- [ "mask_bal", 14 ],
- [ "mask_hockey", 26 ],
- [ "mask_gas", 24 ],
- [ "mask_filter", 12 ],
- [ "mask_bunker", 2 ],
- [ "mask_wsurvivor", 4 ],
- [ "mask_fsurvivor", 2 ],
- [ "sunglasses", 12 ],
- [ "fitover_sunglasses", 8 ],
- [ "glasses_bal", 18 ],
- [ "glasses_safety", 24 ],
- [ "goggles_ski", 14 ],
- [ "goggles_nv", 2 ],
- [ "goggles_ir", 1 ],
- [ "tacvest", 22 ],
- [ "legrig", 22 ],
- [ "tool_belt", 16 ],
- [ "fanny", 12 ],
- [ "dump_pouch", 6 ],
- [ "ragpouch", 22 ],
- [ "leather_pouch", 16 ],
- [ "quiver", 14 ],
- [ "quiver_large", 8 ],
- [ "wristwatch", 24 ],
- [ "diving_watch", 16 ],
- [ "pocketwatch", 14 ],
- [ "holster", 14 ],
- [ "bandana", 18 ],
- [ "scarf", 26 ],
- [ "long_knit_scarf", 15 ],
- [ "mask_gas_xl", 4 ],
- [ "hat_boonie", 16 ],
- [ "beret", 18 ],
- [ "beret_wool", 14 ],
- [ "balclava", 12 ],
- [ "mask_survivorxl", 2 ],
- [ "combatsaw_off", 1 ],
- [ "firemachete_off", 1 ],
- [ "shishkebab_off", 2 ],
- [ "helsing", 1 ],
- [ "tihar", 2 ],
- [ "bigun", 2 ],
- [ "ashot", 4 ],
- [ "pickaxe", 1 ],
- [ "makeshift_machete", 4 ],
- [ "flamethrower_crude", 6 ],
- [ "fungicide", 10 ],
- [ "insecticide", 10 ],
- [ "antifungal", 1 ],
- [ "antiparasitic", 5 ],
- [ "diazepam", 1 ],
- [ "throw_extinguisher", 2 ],
- [ "small_repairkit", 14 ],
- [ "grapnel", 6 ],
- [ "misc_repairkit", 8 ],
- [ "survival_kit", 3 ],
- [ "toolbox", 1 ],
- [ "survivor_belt", 2 ],
- [ "survivor_machete", 2 ],
- [ "spear_survivor", 2 ],
- [ "survivor_light", 24 ],
- [ "survivor_mess_kit", 6 ],
- [ "survivor_shavingkit", 3 ],
- [ "survivor_hairtrimmer", 1 ],
- [ "survivor_scope", 1 ],
- [ "survnote", 30 ]
- ]
- },
- {
- "type": "item_group",
- "id": "bio_op_face",
- "items": [ [ "glasses_bal", 40 ], [ "mask_filter", 30 ], [ "mask_bal", 30 ], [ "mask_gas", 40 ] ]
- },
- {
- "type": "item_group",
- "id": "bio_op_torso",
- "items": [ [ "dragonskin", 50 ], [ "winter_jacket_army", 10 ], [ "modularvestceramic", 40 ], [ "modularvestkevlar", 20 ] ]
- },
- {
- "type": "item_group",
- "id": "bio_op_boots",
- "items": [ [ "boots_combat", 1 ] ]
- },
- {
- "type": "item_group",
- "id": "bio_op_gloves",
- "items": [ [ "gloves_tactical", 60 ], [ "gloves_fingerless", 40 ], [ "winter_gloves_army", 40 ] ]
- },
{
"type": "item_group",
"id": "trash_forest",
@@ -8907,88 +7624,6 @@
[ "hand_axe", 50 ]
]
},
- {
- "type": "item_group",
- "id": "museum_armor",
- "items": [
- [ "armor_plate", 60 ],
- [ "gloves_plate", 60 ],
- [ "boots_plate", 60 ],
- [ "armor_lightplate", 45 ],
- [ "cuirass_lightplate", 45 ],
- [ "armguard_lightplate", 30 ],
- [ "legguard_lightplate", 30 ],
- [ "helmet_barbute", 50 ],
- [ "helmet_conical", 30 ],
- [ "armor_lamellar", 20 ],
- [ "armor_lorica", 25 ],
- [ "armor_samurai", 50 ],
- [ "helmet_kabuto", 50 ],
- [ "helmet_larmor", 40 ],
- [ "helmet_nasal", 50 ],
- [ "helmet_galea", 40 ],
- [ "boots_larmor", 40 ],
- [ "armor_larmor", 40 ],
- [ "armguard_larmor", 40 ],
- [ "vambrace_larmor", 20 ],
- [ "gambeson", 50 ],
- [ "legguard_metal", 10 ],
- [ "helmet_corinthian", 45 ],
- [ "armor_cuirass", 25 ],
- [ "legguard_bronze", 20 ]
- ]
- },
- {
- "type": "item_group",
- "id": "museum_armor_torso",
- "items": [
- [ "armor_plate", 60 ],
- [ "armor_lightplate", 45 ],
- [ "cuirass_lightplate", 45 ],
- [ "armor_lamellar", 20 ],
- [ "armor_lorica", 25 ],
- [ "armor_samurai", 50 ],
- [ "armor_larmor", 40 ],
- [ "gambeson", 50 ],
- [ "armor_cuirass", 25 ],
- [ "chainmail_suit", 10 ],
- [ "chainmail_vest", 3 ]
- ]
- },
- {
- "type": "item_group",
- "id": "museum_armor_legs",
- "items": [ [ "legguard_lightplate", 30 ], [ "legguard_metal", 10 ], [ "legguard_bronze", 20 ], [ "chainmail_legs", 10 ] ]
- },
- {
- "type": "item_group",
- "id": "museum_armor_feet",
- "items": [ [ "boots_plate", 60 ], [ "boots_larmor", 40 ] ]
- },
- {
- "type": "item_group",
- "id": "museum_armor_head",
- "items": [
- [ "helmet_barbute", 50 ],
- [ "helmet_conical", 30 ],
- [ "helmet_kabuto", 50 ],
- [ "helmet_larmor", 40 ],
- [ "helmet_nasal", 50 ],
- [ "helmet_galea", 40 ],
- [ "chainmail_hood", 30 ]
- ]
- },
- {
- "type": "item_group",
- "id": "museum_armor_arms",
- "items": [
- [ "armguard_lightplate", 30 ],
- [ "armguard_larmor", 40 ],
- [ "vambrace_larmor", 20 ],
- [ "gloves_plate", 60 ],
- [ "chainmail_arms", 30 ]
- ]
- },
{
"type": "item_group",
"id": "museum_armor_pet",
@@ -9855,24 +8490,6 @@
[ "32_casing", 70 ]
]
},
- {
- "id": "dollar_clothes",
- "type": "item_group",
- "items": [
- [ "bandana", 25 ],
- [ "boxer_shorts", 25 ],
- [ "boxer_briefs", 25 ],
- [ "boy_shorts", 25 ],
- [ "bra", 25 ],
- [ "socks", 45 ],
- [ "stockings", 20 ],
- [ "hat_cotton", 35 ],
- [ "copper_bracelet", 10 ],
- [ "sunglasses", 25 ],
- [ "tieclip", 15 ],
- [ "hairpin", 15 ]
- ]
- },
{
"id": "dollar_books",
"type": "item_group",
@@ -9963,26 +8580,6 @@
[ "candy", 20 ]
]
},
- {
- "type": "item_group",
- "id": "coat_rack",
- "items": [
- [ "jacket_light", 50 ],
- [ "jacket_windbreaker", 25 ],
- [ "jacket_jean", 35 ],
- [ "blazer", 35 ],
- [ "jacket_leather", 30 ],
- [ "coat_rain", 50 ],
- [ "trenchcoat", 10 ],
- [ "duster", 15 ],
- [ "peacoat", 30 ],
- [ "tophat", 10 ],
- [ "hat_ball", 40 ],
- [ "fedora", 15 ],
- [ "hat_cotton", 30 ],
- [ "hat_knit", 20 ]
- ]
- },
{
"id": "mail",
"type": "item_group",
@@ -10036,78 +8633,6 @@
[ "holybook_scientology", 1 ]
]
},
- {
- "type": "item_group",
- "id": "laundry",
- "items": [
- [ "basket_laundry", 30 ],
- [ "jeans", 90 ],
- [ "pants_checkered", 5 ],
- [ "shorts", 70 ],
- [ "shorts_denim", 35 ],
- [ "pants", 75 ],
- [ "breeches", 10 ],
- [ "suit", 60 ],
- [ "waistcoat", 30 ],
- [ "pants_leather", 60 ],
- [ "pants_cargo", 70 ],
- [ "shorts_cargo", 50 ],
- [ "skirt", 75 ],
- [ "skirt_leather", 5 ],
- [ "tshirt", 70 ],
- [ "longshirt", 80 ],
- [ "polo_shirt", 65 ],
- [ "dress_shirt", 60 ],
- [ "tank_top", 50 ],
- [ "camisole", 30 ],
- [ "bra", 30 ],
- [ "undershirt", 30 ],
- [ "boxer_shorts", 30 ],
- [ "briefs", 15 ],
- [ "boxer_briefs", 20 ],
- [ "panties", 30 ],
- [ "boy_shorts", 25 ],
- [ "sweatshirt", 75 ],
- [ "sweater", 75 ],
- [ "hoodie", 65 ],
- [ "jacket_light", 50 ],
- [ "jacket_windbreaker", 25 ],
- [ "jacket_jean", 35 ],
- [ "blazer", 35 ],
- [ "gloves_light", 35 ],
- [ "mittens", 30 ],
- [ "thermal_socks", 2 ],
- [ "thermal_gloves", 2 ],
- [ "gloves_liner", 25 ],
- [ "scarf", 45 ],
- [ "scarf_long", 1 ],
- [ "hat_cotton", 45 ],
- [ "hat_knit", 25 ],
- [ "hat_newsboy", 20 ],
- [ "under_armor", 20 ],
- [ "under_armor_shorts", 20 ],
- [ "tights", 20 ],
- [ "leggings", 20 ],
- [ "stockings", 20 ],
- [ "long_underpants", 40 ],
- [ "long_undertop", 40 ],
- [ "union_suit", 20 ],
- [ "arm_warmers", 20 ],
- [ "leg_warmers", 20 ],
- [ "corset", 10 ],
- [ "pants_army", 10 ],
- [ "army_top", 20 ],
- [ "tux", 1 ],
- [ "gown", 1 ],
- [ "jersey", 40 ],
- [ "maid_dress", 3 ],
- [ "halter_top", 50 ],
- [ "linuxtshirt", 20 ],
- [ "kilt", 5 ],
- [ "nanoskirt", 10 ],
- [ "robe", 50 ]
- ]
- },
{
"type": "item_group",
"id": "golf_cart",
@@ -10151,21 +8676,6 @@
{ "item": "smart_phone", "prob": 1, "charges-min": 130, "charges-max": 130 }
]
},
- {
- "type": "item_group",
- "id": "common_gloves",
- "items": [
- { "item": "gloves_light", "prob": 15 },
- { "item": "gloves_leather", "prob": 15 },
- { "item": "gloves_golf", "prob": 15 },
- { "item": "gloves_wool", "prob": 15 },
- { "item": "gloves_winter", "prob": 10 },
- { "item": "gloves_fingerless", "prob": 15 },
- { "item": "gloves_liner", "prob": 15 },
- { "item": "mittens", "prob": 5 },
- { "item": "thermal_gloves", "prob": 2 }
- ]
- },
{
"id": "sewing_group",
"type": "item_group",
From 91f0a948f466a4b75eafc9c394cbbad12259c7f0 Mon Sep 17 00:00:00 2001
From: Isaac Freund
Date: Tue, 15 Oct 2019 21:41:11 +0200
Subject: [PATCH 68/86] Fix repair activity for tools in vehicle
The helper function get_item_location() did not support items being in
vehicles. This commit corrects that oversight.
---
src/iuse_actor.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp
index a187db9ebad8a..075c21df1b3a5 100644
--- a/src/iuse_actor.cpp
+++ b/src/iuse_actor.cpp
@@ -59,6 +59,7 @@
#include "trap.h"
#include "ui.h"
#include "vehicle.h"
+#include "vehicle_selector.h"
#include "vitamin.h"
#include "weather.h"
#include "enums.h"
@@ -2885,10 +2886,28 @@ bool repair_item_actor::can_use_tool( const player &p, const item &tool, bool pr
static item_location get_item_location( player &p, item &it, const tripoint &pos )
{
+ // Item on a character
if( p.has_item( it ) ) {
return item_location( p, &it );
}
+ // Item in a vehicle
+ if( const optional_vpart_position &vp = g->m.veh_at( pos ) ) {
+ vehicle_cursor vc( vp->vehicle(), vp->part_index() );
+ bool found_in_vehicle = false;
+ vc.visit_items( [&]( const item * e ) {
+ if( e == &it ) {
+ found_in_vehicle = true;
+ return VisitResponse::ABORT;
+ }
+ return VisitResponse::NEXT;
+ } );
+ if( found_in_vehicle ) {
+ return item_location( vc, &it );
+ }
+ }
+
+ // Item on the map
return item_location( pos, &it );
}
From 87f02cafddc8ee290088c8667d060a1e9e7446e9 Mon Sep 17 00:00:00 2001
From: Knightos
Date: Tue, 15 Oct 2019 21:31:14 +0200
Subject: [PATCH 69/86] Remove unneeded code from read_do_turn
---
src/activity_handlers.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp
index 3cf5040bf5bc0..49cc1930a0d86 100644
--- a/src/activity_handlers.cpp
+++ b/src/activity_handlers.cpp
@@ -2836,10 +2836,6 @@ void activity_handlers::read_do_turn( player_activity *act, player *p )
p->stamina = act->values[0] - 1;
act->values[0] = p->stamina;
}
- if( p->stamina < p->get_stamina_max() / 10 ) {
- p->add_msg_if_player( m_info, _( "This training is exhausting. Time to rest." ) );
- act->set_to_null();
- }
} else {
p->moves = 0;
}
From a0b378d0af73c3c7c5e6e56647fd28edf0499c0f Mon Sep 17 00:00:00 2001
From: curstwist <39442864+curstwist@users.noreply.github.com>
Date: Tue, 15 Oct 2019 15:35:25 -0400
Subject: [PATCH 70/86] add roof, landscaping to house_w_2
---
.../terrain-liquids.json | 3 +-
data/json/mapgen/house/house_w_2.json | 186 +++++++++++-------
data/json/mapgen/nested/house_nested.json | 127 ++++++++++++
.../json/mapgen_palettes/house_w_palette.json | 8 +-
.../overmap/multitile_city_buildings.json | 10 +
.../overmap_terrain_residential.json | 8 +
6 files changed, 272 insertions(+), 70 deletions(-)
diff --git a/data/json/furniture_and_terrain/terrain-liquids.json b/data/json/furniture_and_terrain/terrain-liquids.json
index 7cf06cd99df57..25457d3e7013b 100644
--- a/data/json/furniture_and_terrain/terrain-liquids.json
+++ b/data/json/furniture_and_terrain/terrain-liquids.json
@@ -208,6 +208,7 @@
"name": "shallow pool water",
"description": "A shallow pool of water.",
"symbol": "~",
+ "looks_like": "t_water_pool",
"color": "light_blue",
"move_cost": 5,
"flags": [ "TRANSPARENT", "LIQUID", "SWIMMABLE", "INDOORS" ],
@@ -231,7 +232,7 @@
"name": "shallow pool water",
"description": "A shallow pool of water.",
"symbol": "~",
- "looks_like": "t_water_pool_shallow",
+ "looks_like": "t_water_pool",
"color": "light_blue",
"move_cost": 5,
"flags": [ "TRANSPARENT", "LIQUID", "SWIMMABLE" ],
diff --git a/data/json/mapgen/house/house_w_2.json b/data/json/mapgen/house/house_w_2.json
index 5064fb663619b..3320871ce0cbb 100644
--- a/data/json/mapgen/house/house_w_2.json
+++ b/data/json/mapgen/house/house_w_2.json
@@ -1,69 +1,123 @@
-{
- "type": "mapgen",
- "method": "json",
- "om_terrain": "house_w_2",
- "object": {
- "fill_ter": "t_floor",
- "rows": [
- "........G.sss...........",
- "...CsssCssssssCsssC.....",
- "...ssssssssssssssss.....",
- "..||o|o|||+|||o||o||....",
- "..|1 | a|5 6 |....",
- "..| | I| |....",
- "..| | I| |....",
- "..| + |||| |||....",
- "..||+|||| |....",
- "..|O O| + 7 o....",
- "..||||||| 8 o....",
- "..|4 |....",
- "..o | |||||||||....",
- "..| | y| tT|.......",
- "..o | + To.......",
- "..| | |j |.......",
- "..||+|||||+||||+|.......",
- "..|J K|2 |w|.......",
- "..|J L K| |||.......",
- "..on L i| |O|.......",
- "..|J K| + |.......",
- "..|lJJ a| |O|.......",
- "..||o|+|||o||||||.......",
- "...ssssss..............."
- ],
- "palettes": [ "house_w_foundation_palette" ],
- "nested": {
- "1": { "chunks": [ [ "bedroom_4x4_adult_1_N", 20 ] ] },
- "2": {
- "chunks": [
- [ "bedroom_5x5_adult_S_1", 50 ],
- [ "bedroom_5x5_adult_W_1", 50 ],
- [ "bedroom_5x5_adult_N_2", 50 ],
- [ "bedroom_5x5_adult_S_2", 50 ],
- [ "bedroom_5x5_adult_E_2", 50 ],
- [ "bedroom_5x5_adult_W_2", 50 ]
- ]
+[
+ {
+ "type": "mapgen",
+ "method": "json",
+ "om_terrain": "house_w_2",
+ "object": {
+ "fill_ter": "t_floor",
+ "rows": [
+ "..MMppMMMGsssMMMppMM....",
+ "..MCsssCssssssCsssCM....",
+ "...ssssssssssssssss.....",
+ "..##o#o###+###o##o##....",
+ "..#1 | a|5 6 #....",
+ "..# | I| #....",
+ "..# | I| #....",
+ "..# + |||| ||#....",
+ "..#|+|||| 8 #....",
+ "..#O O| + 7 o....",
+ "..#|||||| o....",
+ "..#4 #....",
+ "..o | |||||####....",
+ "..# | y| tT#^......",
+ "..o | + To.......",
+ "..# | |j #.......",
+ "..#|+|||||+||||+#.......",
+ "..#J K|2 |w#.......",
+ "..#J L K| ||#.......",
+ "..on L i| |O#.......",
+ "..#J K| + #.......",
+ "..#lJJ a| |O#.......",
+ "..##o#+###o######.......",
+ "...ssssss..............."
+ ],
+ "palettes": [ "house_w_foundation_palette" ],
+ "terrain": { "#": "t_adobe_brick_wall" },
+ "nested": {
+ "1": { "chunks": [ [ "bedroom_4x4_adult_1_N", 20 ] ] },
+ "2": {
+ "chunks": [
+ [ "bedroom_5x5_adult_S_1", 50 ],
+ [ "bedroom_5x5_adult_W_1", 50 ],
+ [ "bedroom_5x5_adult_N_2", 50 ],
+ [ "bedroom_5x5_adult_S_2", 50 ],
+ [ "bedroom_5x5_adult_E_2", 50 ],
+ [ "bedroom_5x5_adult_W_2", 50 ]
+ ]
+ },
+ "4": { "chunks": [ [ "diningroom_5x5_N_S", 50 ], [ "diningroom_5x5_E_W", 50 ] ] },
+ "5": {
+ "chunks": [
+ [ "bonus_room_2x2_1", 50 ],
+ [ "bonus_room_2x2_2", 50 ],
+ [ "bonus_room_2x2_4_W", 50 ],
+ [ "bonus_room_3x3_1", 50 ],
+ [ "bonus_room_3x3_2", 50 ]
+ ]
+ },
+ "6": {
+ "chunks": [
+ [ "bonus_room_3x3_4", 50 ],
+ [ "bonus_room_3x3_N_6", 50 ],
+ [ "bonus_room_3x3_E_6", 50 ],
+ [ "bonus_room_3x3_N_8", 50 ],
+ [ "bonus_room_3x3_E_8", 50 ]
+ ]
+ },
+ "7": { "chunks": [ [ "bonus_room_3x3_S_5", 50 ], [ "bonus_room_3x3_E_5", 50 ] ] },
+ "8": { "chunks": [ [ "bonus_room_2x2_1", 50 ], [ "bonus_room_2x2_2", 50 ] ] }
},
- "4": { "chunks": [ [ "diningroom_5x5_N_S", 50 ], [ "diningroom_5x5_E_W", 50 ] ] },
- "5": {
- "chunks": [
- [ "bonus_room_2x2_1", 50 ],
- [ "bonus_room_2x2_2", 50 ],
- [ "bonus_room_2x2_4_W", 50 ],
- [ "bonus_room_3x3_1", 50 ],
- [ "bonus_room_3x3_2", 50 ]
- ]
- },
- "6": {
- "chunks": [
- [ "bonus_room_3x3_4", 50 ],
- [ "bonus_room_3x3_N_6", 50 ],
- [ "bonus_room_3x3_E_6", 50 ],
- [ "bonus_room_3x3_N_8", 50 ],
- [ "bonus_room_3x3_E_8", 50 ]
- ]
- },
- "7": { "chunks": [ [ "bonus_room_3x3_5", 50 ] ] },
- "8": { "chunks": [ [ "bonus_room_2x2_1", 50 ], [ "bonus_room_2x2_2", 50 ] ] }
+ "place_nested": [
+ {
+ "chunks": [
+ [ "null", 30 ],
+ [ "reflecting_pool_5x5_1", 10 ],
+ [ "reflecting_pool_5x5_2", 10 ],
+ [ "playset_4x4_1", 10 ],
+ [ "playset_4x4_2", 10 ],
+ [ "firepit_5x5_1", 10 ],
+ [ "firepit_5x5_2", 10 ]
+ ],
+ "x": 18,
+ "y": [ 14, 17 ]
+ }
+ ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "om_terrain": "house_w_2_roof",
+ "object": {
+ "fill_ter": "t_shingle_flat_roof",
+ "rows": [
+ " ",
+ " ................ ",
+ " ................ ",
+ " |22222222222222223 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |................3 ",
+ " |.............5--3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |.............3 ",
+ " |-------------3 ",
+ " "
+ ],
+ "palettes": [ "roof_palette" ],
+ "terrain": { ".": "t_shingle_flat_roof" }
}
}
-}
+]
diff --git a/data/json/mapgen/nested/house_nested.json b/data/json/mapgen/nested/house_nested.json
index fc0dce63a0c84..cd4b423eeecf4 100644
--- a/data/json/mapgen/nested/house_nested.json
+++ b/data/json/mapgen/nested/house_nested.json
@@ -953,6 +953,23 @@
"items": { "L": [ { "item": "livingroom", "chance": 30 } ] }
}
},
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "small furniture groupings for studies, workrooms, hobby rooms, etc",
+ "nested_mapgen_id": "bonus_room_3x3_E_5",
+ "object": {
+ "mapgensize": [ 3, 3 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ "T @",
+ "T @",
+ "C @"
+ ],
+ "palettes": [ "house_w_nest_palette" ],
+ "items": { "L": [ { "item": "livingroom", "chance": 30 } ] }
+ }
+ },
{
"type": "mapgen",
"method": "json",
@@ -1165,5 +1182,115 @@
],
"palettes": [ "house_w_nest_garden_palette" ]
}
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "playset_4x4_1",
+ "object": {
+ "mapgensize": [ 4, 4 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ "GG c",
+ "GG c",
+ " II",
+ "N II"
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "playset_4x4_2",
+ "object": {
+ "mapgensize": [ 4, 4 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ "H ",
+ "H I",
+ "G I",
+ " ccI"
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "firepit_5x5_1",
+ "object": {
+ "mapgensize": [ 5, 5 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " ccc ",
+ " ",
+ " i ",
+ " ",
+ " ccc "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ],
+ "place_items": [ { "item": "stash_wood", "x": 1, "y": 2, "chance": 100, "repeat": [ 2, 10 ] } ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "firepit_5x5_2",
+ "object": {
+ "mapgensize": [ 5, 5 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " ",
+ "S S",
+ "S i S",
+ "S ",
+ " "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ],
+ "place_items": [ { "item": "stash_wood", "x": 2, "y": 1, "chance": 100, "repeat": [ 2, 10 ] } ]
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "reflecting_pool_5x5_1",
+ "object": {
+ "mapgensize": [ 5, 5 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " ",
+ " MMM ",
+ " fMf ",
+ " MMM ",
+ " "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ],
+ "terrain": { " ": "t_concrete", "f": "t_concrete" }
+ }
+ },
+ {
+ "type": "mapgen",
+ "method": "json",
+ "//": "a nested map for lawns",
+ "nested_mapgen_id": "reflecting_pool_5x5_2",
+ "object": {
+ "mapgensize": [ 5, 5 ],
+ "rotation": [ 0, 3 ],
+ "rows": [
+ " ",
+ " MMM ",
+ " MZM ",
+ " MMM ",
+ " "
+ ],
+ "palettes": [ "house_w_nest_garden_palette" ],
+ "terrain": { " ": "t_concrete" }
+ }
}
]
diff --git a/data/json/mapgen_palettes/house_w_palette.json b/data/json/mapgen_palettes/house_w_palette.json
index b4c495bcafdae..525748a064b26 100644
--- a/data/json/mapgen_palettes/house_w_palette.json
+++ b/data/json/mapgen_palettes/house_w_palette.json
@@ -153,7 +153,8 @@
"C": "t_column",
"^": "t_gutter_downspout",
",": "t_linoleum_white",
- ";": "t_linoleum_gray"
+ ";": "t_linoleum_gray",
+ "M": [ "t_shrub_lilac", "t_shrub_hydrangea", "t_shrub_rose" ]
},
"toilets": { "t": { } },
"liquids": { "g": { "liquid": "water_clean", "amount": [ 0, 100 ] } },
@@ -224,8 +225,8 @@
"J": "t_water_pump",
"K": "t_water_sh",
"k": "t_water_sh",
- "L": "t_water_pool",
- "M": "t_water_pool_shallow",
+ "L": "t_water_pool_outdoors",
+ "M": "t_water_pool_shallow_outdoors",
"N": [ "t_shrub_lilac", "t_shrub_hydrangea", "t_shrub_rose" ],
"O": [
"t_shrub_grape",
@@ -238,6 +239,7 @@
"P": "t_dirtmound",
"Q": "t_dirt",
"R": "t_dirtfloor",
+ "S": "t_trunk",
"Z": [
"t_tree_blackjack",
"t_tree_walnut",
diff --git a/data/json/overmap/multitile_city_buildings.json b/data/json/overmap/multitile_city_buildings.json
index 758d79af84534..203dff890f31a 100644
--- a/data/json/overmap/multitile_city_buildings.json
+++ b/data/json/overmap/multitile_city_buildings.json
@@ -25,6 +25,16 @@
{ "point": [ 0, 0, -1 ], "overmap": "basement" }
]
},
+ {
+ "type": "city_building",
+ "id": "house_w_2",
+ "locations": [ "land" ],
+ "overmaps": [
+ { "point": [ 0, 0, 0 ], "overmap": "house_w_2_north" },
+ { "point": [ 0, 0, 1 ], "overmap": "house_w_2_roof_north" },
+ { "point": [ 0, 0, -1 ], "overmap": "basement" }
+ ]
+ },
{
"type": "city_building",
"id": "s_electronics",
diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
index b50faa860dc22..2494246165eba 100644
--- a/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
+++ b/data/json/overmap/overmap_terrain/overmap_terrain_residential.json
@@ -363,6 +363,14 @@
"see_cost": 2,
"flags": [ "SIDEWALK", "GENERIC_LOOT" ]
},
+ {
+ "type": "overmap_terrain",
+ "id": "house_w_2_roof",
+ "name": "house",
+ "copy-from": "generic_city_building",
+ "color": "light_green",
+ "see_cost": 2
+ },
{
"type": "overmap_terrain",
"id": "house_w_3",
From bd401060ba2f98266b5f6c0c62c5bb9cb060854f Mon Sep 17 00:00:00 2001
From: Dru
Date: Tue, 15 Oct 2019 20:17:36 +0200
Subject: [PATCH 71/86] Usuable not dirty bionics in inv always green
---
src/item.cpp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/item.cpp b/src/item.cpp
index aff624fbe8e3f..a66c167b1fd8d 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -3115,11 +3115,11 @@ nc_color item::color_in_inventory() const
ret = c_red;
} else if( is_filthy() || item_tags.count( "DIRTY" ) ) {
ret = c_brown;
- } else if( is_bionic() && !has_flag( "NO_STERILE" ) ) {
- if( !has_flag( "NO_PACKED" ) ) {
+ } else if( is_bionic() ) {
+ if( !u.has_bionic( type->bionic->id ) ) {
+ ret = u.bionic_installation_issues( type->bionic->id ).empty() ? c_green : c_red;
+ } else if( !has_flag( "NO_STERILE" ) ) {
ret = c_dark_gray;
- } else {
- ret = c_cyan;
}
} else if( has_flag( "LEAK_DAM" ) && has_flag( "RADIOACTIVE" ) && damage() > 0 ) {
ret = c_light_green;
@@ -3242,10 +3242,6 @@ nc_color item::color_in_inventory() const
} else {
ret = c_red; // Book hasn't been identified yet: red
}
- } else if( is_bionic() ) {
- if( !u.has_bionic( type->bionic->id ) ) {
- ret = u.bionic_installation_issues( type->bionic->id ).empty() ? c_green : c_red;
- }
}
return ret;
}
From d386e878858df3ae25096a0915fd07ead570bc01 Mon Sep 17 00:00:00 2001
From: curstwist <39442864+curstwist@users.noreply.github.com>
Date: Wed, 16 Oct 2019 02:53:08 -0400
Subject: [PATCH 72/86] finish reorganizing furniture.json (#34758)
* finish reorganizing furniture.json
* remove duplicats, add coat rack
---
.../furniture-appliances.json | 157 ++
.../furniture-decorative.json | 209 ++
.../furniture_and_terrain/furniture-eggs.json | 53 +
.../furniture-emitters.json | 32 +
.../furniture-fakes.json | 42 +
.../furniture-graves.json | 99 +
.../furniture-industrial.json | 123 +
.../furniture-recreation.json | 39 +
.../furniture-seats.json | 43 +
.../furniture-signs.json | 91 +
.../furniture-storage.json | 169 ++
.../furniture-surfaces.json | 35 +
.../furniture-terrains.json | 674 ++++++
.../furniture-tools.json | 228 ++
.../json/furniture_and_terrain/furniture.json | 2012 -----------------
15 files changed, 1994 insertions(+), 2012 deletions(-)
create mode 100644 data/json/furniture_and_terrain/furniture-decorative.json
create mode 100644 data/json/furniture_and_terrain/furniture-eggs.json
create mode 100644 data/json/furniture_and_terrain/furniture-emitters.json
create mode 100644 data/json/furniture_and_terrain/furniture-fakes.json
create mode 100644 data/json/furniture_and_terrain/furniture-graves.json
create mode 100644 data/json/furniture_and_terrain/furniture-industrial.json
create mode 100644 data/json/furniture_and_terrain/furniture-signs.json
create mode 100644 data/json/furniture_and_terrain/furniture-terrains.json
delete mode 100644 data/json/furniture_and_terrain/furniture.json
diff --git a/data/json/furniture_and_terrain/furniture-appliances.json b/data/json/furniture_and_terrain/furniture-appliances.json
index 4d0893c759c5b..8b1a5d4c3ae15 100644
--- a/data/json/furniture_and_terrain/furniture-appliances.json
+++ b/data/json/furniture_and_terrain/furniture-appliances.json
@@ -450,5 +450,162 @@
{ "item": "pipe", "count": [ 1, 3 ] }
]
}
+ },
+ {
+ "type": "furniture",
+ "id": "f_shredder",
+ "name": "document shredder",
+ "description": "It's not all about hiding government secrets, sometimes you just want to stop identity theft.",
+ "symbol": "H",
+ "bgcolor": "white",
+ "move_cost_mod": 5,
+ "required_str": 6,
+ "looks_like": "f_filing_cabinet",
+ "flags": [ "TRANSPARENT", "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR" ],
+ "deconstruct": {
+ "items": [
+ { "item": "scrap", "count": [ 2, 6 ] },
+ { "item": "steel_chunk", "count": [ 1, 3 ] },
+ { "item": "steel_lump", "count": [ 1, 3 ] },
+ { "item": "plastic_chunk", "count": [ 1, 3 ] },
+ { "item": "sheet_metal_small", "count": [ 0, 4 ] },
+ { "item": "sheet_metal", "count": [ 2, 4 ] },
+ { "item": "pipe", "count": [ 1, 4 ] },
+ { "item": "cable", "charges": [ 1, 15 ] },
+ { "item": "motor", "count": 1 },
+ { "item": "solder_wire", "charges": [ 1, 15 ] }
+ ]
+ },
+ "bash": {
+ "str_min": 18,
+ "str_max": 50,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 2, 7 ] },
+ { "item": "steel_chunk", "count": [ 0, 3 ] },
+ { "item": "sheet_metal_small", "count": [ 8, 12 ] },
+ { "item": "sheet_metal", "count": [ 1, 2 ] },
+ { "item": "pipe", "count": [ 1, 2 ] },
+ { "item": "cable", "charges": [ 1, 15 ] },
+ { "item": "e_scrap", "count": [ 5, 10 ] },
+ { "item": "plastic_chunk", "count": [ 0, 2 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_server",
+ "looks_like": "f_utility_shelf",
+ "name": "server stack",
+ "description": "This is a big pile of computers. They're all turned off.",
+ "symbol": ":",
+ "color": "blue_white",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": 8,
+ "flags": [ "BLOCKSDOOR" ],
+ "deconstruct": {
+ "items": [
+ { "item": "sheet_metal_small", "count": [ 4, 6 ] },
+ { "item": "plastic_chunk", "count": [ 2, 12 ] },
+ { "item": "pipe", "count": [ 4, 8 ] },
+ { "item": "laptop", "count": [ 2, 4 ] },
+ { "item": "cable", "charges": [ 5, 10 ] }
+ ]
+ },
+ "bash": {
+ "str_min": 16,
+ "str_max": 40,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 4, 8 ] },
+ { "item": "plastic_chunk", "count": [ 1, 6 ] },
+ { "item": "sheet_metal_small", "count": [ 1, 4 ] },
+ { "item": "pipe", "count": 1 },
+ { "item": "e_scrap", "count": [ 20, 50 ] },
+ { "item": "cable", "charges": [ 2, 8 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_satellite",
+ "name": "large satellite dish",
+ "looks_like": "t_radio_tower",
+ "description": "Somewhere up there, there are still satellites, orbiting and doing their thing, sending signals down to an Earth that is no longer listening.",
+ "symbol": ")",
+ "color": "white_green",
+ "move_cost_mod": -1,
+ "coverage": 70,
+ "required_str": -1,
+ "deconstruct": {
+ "items": [
+ { "item": "pipe", "count": [ 6, 12 ] },
+ { "item": "rebar", "count": [ 6, 12 ] },
+ { "item": "scrap", "count": [ 2, 6 ] },
+ { "item": "steel_chunk", "count": [ 1, 3 ] },
+ { "item": "steel_lump", "count": [ 4, 6 ] },
+ { "item": "sheet_metal_small", "count": [ 0, 4 ] },
+ { "item": "sheet_metal", "count": [ 8, 10 ] },
+ { "item": "cable", "charges": [ 1, 15 ] },
+ { "item": "motor", "count": 1 }
+ ]
+ },
+ "bash": {
+ "str_min": 18,
+ "str_max": 50,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "pipe", "count": [ 1, 10 ] },
+ { "item": "rebar", "count": [ 1, 10 ] },
+ { "item": "scrap", "count": [ 6, 16 ] },
+ { "item": "steel_chunk", "count": [ 1, 4 ] },
+ { "item": "steel_lump", "count": [ 0, 6 ] },
+ { "item": "sheet_metal_small", "count": [ 8, 12 ] },
+ { "item": "sheet_metal", "count": [ 1, 2 ] },
+ { "item": "cable", "charges": [ 1, 15 ] },
+ { "item": "scrap_copper", "count": [ 0, 2 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_solar_unit",
+ "name": "mounted solar panel",
+ "description": "A mounted solar panel.",
+ "symbol": "#",
+ "color": "yellow",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "BASHABLE" ],
+ "deconstruct": {
+ "items": [
+ { "item": "scrap", "count": [ 4, 6 ] },
+ { "item": "plastic_chunk", "count": [ 1, 2 ] },
+ { "item": "steel_chunk", "count": 3 },
+ { "item": "pipe", "count": 4 },
+ { "item": "2x4", "count": 4 },
+ { "item": "solar_panel", "count": 1 }
+ ]
+ },
+ "bash": {
+ "str_min": 10,
+ "str_max": 20,
+ "sound": "whack!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "solar_cell", "count": [ 1, 5 ] },
+ { "item": "scrap", "count": [ 3, 6 ] },
+ { "item": "amplifier", "prob": 50 },
+ { "item": "cable", "charges": [ 10, 15 ] },
+ { "item": "power_supply", "prob": 50 },
+ { "item": "scrap", "count": [ 4, 6 ] },
+ { "item": "plastic_chunk", "count": [ 1, 2 ] },
+ { "item": "steel_chunk", "count": 3 }
+ ]
+ }
}
]
diff --git a/data/json/furniture_and_terrain/furniture-decorative.json b/data/json/furniture_and_terrain/furniture-decorative.json
new file mode 100644
index 0000000000000..49a9603030e94
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-decorative.json
@@ -0,0 +1,209 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_bigmirror",
+ "name": "standing mirror",
+ "symbol": "{",
+ "description": "Lookin' good - is that blood?",
+ "color": "white",
+ "move_cost_mod": 2,
+ "coverage": 80,
+ "required_str": 5,
+ "flags": [ "NOITEM", "BLOCKSDOOR" ],
+ "bash": {
+ "str_min": 5,
+ "str_max": 16,
+ "sound": "glass breaking",
+ "sound_fail": "whack!",
+ "sound_vol": 16,
+ "furn_set": "f_bigmirror_b",
+ "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_bigmirror_b",
+ "name": "broken standing mirror",
+ "description": "You could look at yourself, if the mirror wasn't covered in cracks and fractures.",
+ "symbol": "{",
+ "color": "light_gray",
+ "move_cost_mod": 2,
+ "coverage": 80,
+ "required_str": 5,
+ "flags": [ "NOITEM", "BLOCKSDOOR" ],
+ "bash": {
+ "str_min": 8,
+ "str_max": 30,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "scrap", "count": [ 2, 4 ] } ]
+ }
+ },
+ {
+ "id": "f_bitts",
+ "type": "furniture",
+ "name": "bitts",
+ "description": "Paired vertical iron posts mounted on a wharf, pier or quay. They are used to secure mooring lines, ropes, hawsers, or cables.",
+ "symbol": "B",
+ "color": [ "light_gray" ],
+ "move_cost_mod": 2,
+ "coverage": 30,
+ "required_str": 0,
+ "bash": {
+ "str_min": 80,
+ "str_max": 200,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "steel_chunk", "count": [ 5, 10 ] } ]
+ },
+ "flags": [ "TRANSPARENT", "MOUNTABLE", "SHORT" ]
+ },
+ {
+ "id": "f_bitts",
+ "type": "furniture",
+ "name": "bitts",
+ "description": "Paired vertical iron posts mounted on a wharf, pier or quay. They are used to secure mooring lines, ropes, hawsers, or cables.",
+ "symbol": "B",
+ "color": [ "light_gray" ],
+ "move_cost_mod": 2,
+ "coverage": 30,
+ "required_str": 0,
+ "bash": {
+ "str_min": 80,
+ "str_max": 200,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "steel_chunk", "count": [ 5, 10 ] } ]
+ },
+ "flags": [ "TRANSPARENT", "MOUNTABLE", "SHORT" ]
+ },
+ {
+ "type": "furniture",
+ "id": "f_shackle",
+ "name": "manacles",
+ "description": "Chain serfs in your dungeon. All you need now is an iron ball to chain to it.",
+ "symbol": "8",
+ "color": "light_gray",
+ "move_cost_mod": 1,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "SHORT" ],
+ "bash": {
+ "str_min": 18,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "crack.",
+ "items": [ { "item": "chain", "count": [ 0, 2 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_statue",
+ "name": "statue",
+ "description": "A carved statue made of stone.",
+ "symbol": "S",
+ "color": "dark_gray",
+ "move_cost_mod": -1,
+ "coverage": 50,
+ "required_str": 10,
+ "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE" ],
+ "bash": {
+ "str_min": 16,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [ { "item": "rock", "count": [ 1, 6 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_mannequin",
+ "name": "mannequin",
+ "description": "Put clothes on it, talk to it. Who's around to judge you? Wait... did it just move?",
+ "symbol": "@",
+ "color": "brown",
+ "move_cost_mod": 2,
+ "coverage": 40,
+ "required_str": 5,
+ "flags": [ "PLACE_ITEM", "TRANSPARENT", "FLAMMABLE" ],
+ "bash": {
+ "str_min": 6,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "splinter", "count": [ 9, 12 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_birdbath",
+ "name": "birdbath",
+ "description": "A decorative cement birdbath and pedestal.",
+ "symbol": "o",
+ "color": "light_gray",
+ "move_cost_mod": -1,
+ "required_str": 10,
+ "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE", "LIQUIDCONT" ],
+ "bash": {
+ "str_min": 16,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "rebar", "count": [ 1, 2 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_rotary_clothesline",
+ "name": "rotary clothes dryer line",
+ "description": "A umbrella shaped clothes line mounted on a pole.",
+ "symbol": "X",
+ "color": "white",
+ "move_cost_mod": -2,
+ "required_str": 10,
+ "flags": [ "TRANSPARENT", "BLOCKSDOOR", "BASHABLE", "PLACE_ITEM" ],
+ "deconstruct": {
+ "items": [ { "item": "pipe", "count": 6 }, { "item": "steel_chunk", "count": [ 2, 6 ] }, { "item": "wire", "count": 10 } ]
+ },
+ "bash": {
+ "str_min": 6,
+ "str_max": 10,
+ "sound": "smash!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "pipe", "count": [ 1, 6 ] }, { "item": "wire", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 1, 6 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_floor_lamp",
+ "name": "floor lamp",
+ "symbol": "T",
+ "looks_like": "f_rack_coat",
+ "description": "A tall standing lamp, meant to plug into a wall and light up a room.",
+ "color": "light_gray",
+ "move_cost_mod": 2,
+ "required_str": 1,
+ "flags": [ "BLOCKSDOOR", "PLACE_ITEM", "EASY_DECONSTRUCT" ],
+ "deconstruct": {
+ "items": [
+ { "item": "cable", "charges": [ 1, 2 ] },
+ { "item": "amplifier", "count": [ 1, 4 ] },
+ { "item": "light_bulb", "count": [ 1, 4 ] },
+ { "item": "steel_lump", "count": 1 },
+ { "item": "pipe", "count": 1 }
+ ]
+ },
+ "bash": {
+ "str_min": 12,
+ "str_max": 40,
+ "sound": "metal screeching!",
+ "sound_fail": "bonk!",
+ "items": [
+ { "item": "scrap", "count": [ 1, 2 ] },
+ { "item": "cable", "charges": [ 0, 1 ] },
+ { "item": "e_scrap", "count": [ 0, 1 ] },
+ { "item": "glass_shard", "count": [ 0, 8 ] },
+ { "item": "pipe", "count": [ 0, 1 ] }
+ ]
+ }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-eggs.json b/data/json/furniture_and_terrain/furniture-eggs.json
new file mode 100644
index 0000000000000..3c93235d58e73
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-eggs.json
@@ -0,0 +1,53 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_egg_sackbw",
+ "name": "spider egg sack",
+ "description": "Much too large, off-white egg sack. Kind of icky. Something IS moving in there.",
+ "symbol": "O",
+ "color": "white",
+ "move_cost_mod": 3,
+ "required_str": 6,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
+ "examine_action": "egg_sackbw",
+ "bash": { "str_min": 8, "str_max": 16, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_egg_sackcs",
+ "name": "spider egg sack",
+ "description": "Bulbous mass of spider eggs. More than kind of icky. Something IS moving in there.",
+ "symbol": "O",
+ "color": "white",
+ "move_cost_mod": 3,
+ "required_str": 6,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
+ "examine_action": "egg_sackcs",
+ "bash": { "str_min": 8, "str_max": 16, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_egg_sackws",
+ "name": "spider egg sack",
+ "description": "A horrifyingly oversized egg sack. Something IS moving in there. If you're seeing this, you're already too close to it.",
+ "symbol": "O",
+ "color": "yellow",
+ "move_cost_mod": 3,
+ "required_str": 6,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
+ "examine_action": "egg_sackws",
+ "bash": { "str_min": 4, "str_max": 8, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_egg_sacke",
+ "name": "ruptured egg sack",
+ "description": "Super icky. Spider stuff's spilling out.",
+ "symbol": "X",
+ "color": "white",
+ "move_cost_mod": 3,
+ "required_str": 6,
+ "flags": [ "TRANSPARENT", "CONTAINER", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
+ "bash": { "str_min": 2, "str_max": 6, "sound": "splat!", "sound_fail": "whump." }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-emitters.json b/data/json/furniture_and_terrain/furniture-emitters.json
new file mode 100644
index 0000000000000..695dcd7112ce7
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-emitters.json
@@ -0,0 +1,32 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_swamp_gas",
+ "name": "swamp gas",
+ "description": "This is a pool of murkey water, it occassionaly bubbles, releasing a mildly toxic gas.",
+ "looks_like": "t_water_sh",
+ "symbol": "~",
+ "color": "blue",
+ "move_cost_mod": 1,
+ "coverage": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "EMITTER" ],
+ "emissions": [ "emit_swamp_gas_leak" ],
+ "//": "a very mild toxicant, inducing nausea.",
+ "bash": { "str_min": 30, "str_max": 60, "sound": "splash!", "sound_fail": "splash!", "furn_set": "f_swamp_gas" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_fog",
+ "name": "fog",
+ "description": "This is a misty cloud of fog.",
+ "looks_like": "t_moss",
+ "symbol": "^",
+ "color": "light_gray",
+ "move_cost_mod": 2,
+ "coverage": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "EMITTER" ],
+ "emissions": [ "emit_fog_plume" ]
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-fakes.json b/data/json/furniture_and_terrain/furniture-fakes.json
new file mode 100644
index 0000000000000..7bd3baa8d2c56
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-fakes.json
@@ -0,0 +1,42 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_fake_bench_hands",
+ "name": "fake workbench hands",
+ "description": "This fake workbench holds the stats for working on a wielded item.",
+ "symbol": "#",
+ "color": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "workbench": { "multiplier": 1.0, "mass": 5000, "volume": "10L" }
+ },
+ {
+ "type": "furniture",
+ "//": "This furniture object also gets used as a fake workbench whenever a player crafts on the ground anywhere else.",
+ "id": "f_ground_crafting_spot",
+ "name": "ground crafting spot",
+ "looks_like": "tr_firewood_source",
+ "description": "A cleared spot on the ground for crafting. Slower than using a workbench or holding a project in your hands, but readily available.",
+ "symbol": "x",
+ "color": "white",
+ "move_cost_mod": 2,
+ "required_str": 0,
+ "deconstruct": { "items": [ ] },
+ "bash": { "str_min": 0, "str_max": 0, "items": [ ] },
+ "flags": [ "PLACE_ITEM", "TRANSPARENT", "EASY_DECONSTRUCT" ],
+ "examine_action": "workbench",
+ "workbench": { "multiplier": 0.7, "mass": 1000000, "volume": "1000L" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_no_item",
+ "//": "This is used in a hack to clear furniture with the keg iexamine of all items execept the stored liquid before usage.",
+ "name": "seeing this is a bug",
+ "description": "Seeing this is a bug. If seen, please report and destroy.",
+ "symbol": "#",
+ "color": "black",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "flags": [ "NOITEM" ]
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-graves.json b/data/json/furniture_and_terrain/furniture-graves.json
new file mode 100644
index 0000000000000..9602d4df9119d
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-graves.json
@@ -0,0 +1,99 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_slab",
+ "name": "stone slab",
+ "description": "A flat slab of heavy stone.",
+ "symbol": "n",
+ "color": "dark_gray",
+ "move_cost_mod": 2,
+ "coverage": 30,
+ "required_str": 12,
+ "crafting_pseudo_item": "boulder_anvil",
+ "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "SHORT", "MINEABLE" ],
+ "bash": {
+ "str_min": 20,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [ { "item": "rock", "count": [ 2, 7 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_grave_head",
+ "name": "headstone",
+ "description": "Keeps the bodies.",
+ "symbol": "_",
+ "color": "light_gray",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "crafting_pseudo_item": "boulder_anvil",
+ "flags": [ "MINEABLE", "TRANSPARENT", "SHORT", "NOCOLLIDE", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "PLACE_ITEM" ],
+ "bash": {
+ "str_min": 50,
+ "str_max": 150,
+ "sound": "crash!",
+ "sound_fail": "thump!",
+ "items": [ { "item": "rock", "count": [ 2, 4 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_grave_stone",
+ "name": "gravestone",
+ "description": "Keeps the bodies. More fancy.",
+ "symbol": "^",
+ "color": "light_gray",
+ "move_cost_mod": 2,
+ "coverage": 50,
+ "required_str": -1,
+ "crafting_pseudo_item": "boulder_anvil",
+ "flags": [ "MINEABLE", "NOITEM", "TRANSPARENT", "MOUNTABLE", "ROUGH", "PLACE_ITEM" ],
+ "bash": {
+ "str_min": 60,
+ "str_max": 160,
+ "sound": "crash!",
+ "sound_fail": "thump!",
+ "items": [ { "item": "rock", "count": [ 8, 14 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_grave_stone_old",
+ "name": "worn gravestone",
+ "description": "A worn-out gravestone.",
+ "symbol": "^",
+ "color": "dark_gray",
+ "move_cost_mod": 1.5,
+ "coverage": 50,
+ "required_str": -1,
+ "flags": [ "MINEABLE", "NOITEM", "TRANSPARENT", "MOUNTABLE", "ROUGH", "PLACE_ITEM", "UNSTABLE" ],
+ "bash": {
+ "str_min": 40,
+ "str_max": 120,
+ "sound": "crash!",
+ "sound_fail": "thump!",
+ "items": [ { "item": "rock", "count": [ 5, 10 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_grave_monument",
+ "name": "obelisk",
+ "description": "Monument to pride.",
+ "symbol": "$",
+ "color": "black_white",
+ "move_cost_mod": -1,
+ "coverage": 55,
+ "required_str": -1,
+ "flags": [ "MINEABLE", "NOITEM" ],
+ "bash": {
+ "str_min": 80,
+ "str_max": 180,
+ "sound": "crash!",
+ "sound_fail": "thunk!",
+ "items": [ { "item": "rock", "count": [ 18, 30 ] } ]
+ }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-industrial.json b/data/json/furniture_and_terrain/furniture-industrial.json
new file mode 100644
index 0000000000000..557b592f69b44
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-industrial.json
@@ -0,0 +1,123 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_robotic_assembler",
+ "name": "robotic assembler",
+ "looks_like": "f_robotic_arm",
+ "description": "A durable and versatile robotic arm with a tool fitted to the end, for working on an assembly line.",
+ "symbol": "3",
+ "color": "magenta_cyan",
+ "move_cost_mod": -1,
+ "coverage": 35,
+ "required_str": -1,
+ "bash": {
+ "str_min": 40,
+ "str_max": 150,
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "processor", "count": [ 1, 2 ] },
+ { "item": "RAM", "count": [ 4, 8 ] },
+ { "item": "cable", "charges": [ 4, 6 ] },
+ { "item": "small_lcd_screen", "count": [ 1, 2 ] },
+ { "item": "e_scrap", "count": [ 5, 8 ] },
+ { "item": "circuit", "count": [ 3, 5 ] },
+ { "item": "power_supply", "count": [ 1, 2 ] },
+ { "item": "amplifier", "count": [ 1, 2 ] },
+ { "item": "plastic_chunk", "count": [ 10, 12 ] },
+ { "item": "scrap", "count": [ 6, 8 ] }
+ ]
+ },
+ "deconstruct": {
+ "items": [
+ { "item": "processor", "count": [ 2, 4 ] },
+ { "item": "RAM", "count": [ 8, 16 ] },
+ { "item": "cable", "charges": [ 8, 12 ] },
+ { "item": "small_lcd_screen", "count": [ 2, 4 ] },
+ { "item": "e_scrap", "count": [ 10, 16 ] },
+ { "item": "circuit", "count": [ 6, 10 ] },
+ { "item": "power_supply", "count": [ 2, 4 ] },
+ { "item": "amplifier", "count": [ 2, 4 ] },
+ { "item": "plastic_chunk", "count": [ 10, 12 ] },
+ { "item": "scrap", "count": [ 6, 8 ] },
+ { "item": "motor_small", "count": [ 0, 1 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_chemical_mixer",
+ "description": "When chemicals need to be mixed in large quantities at just the right combinations and temperatures, this is the tool for the job.",
+ "name": "chemical mixer",
+ "symbol": "0",
+ "color": "red_green",
+ "move_cost_mod": -1,
+ "coverage": 40,
+ "required_str": 16,
+ "bash": {
+ "str_min": 40,
+ "str_max": 150,
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "cable", "charges": [ 0, 4 ] },
+ { "item": "scrap", "count": [ 8, 12 ] },
+ { "item": "steel_chunk", "count": [ 2, 4 ] },
+ { "item": "metal_tank_little", "count": [ 0, 2 ] },
+ { "item": "jerrycan", "count": [ 0, 2 ] },
+ { "item": "metal_tank", "count": [ 0, 2 ] }
+ ]
+ },
+ "deconstruct": {
+ "items": [
+ { "item": "cable", "charges": [ 4, 8 ] },
+ { "item": "steel_chunk", "count": [ 4, 6 ] },
+ { "item": "scrap", "count": [ 12, 16 ] },
+ { "item": "metal_tank_little", "count": [ 2, 4 ] },
+ { "item": "jerrycan", "count": [ 2, 4 ] },
+ { "item": "metal_tank", "count": [ 2, 4 ] },
+ { "item": "motor_small", "count": 1 }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_robotic_arm",
+ "name": "robotic arm",
+ "description": "Automation! Science! Industry! Make a better horse! This robot arm promises to do it all. Except it's currently unpowered. You could remove the casing and retrieve the electronics through disassembly.",
+ "symbol": "&",
+ "bgcolor": "yellow",
+ "move_cost_mod": 3,
+ "required_str": 18,
+ "flags": [ "TRANSPARENT", "MOUNTABLE" ],
+ "deconstruct": {
+ "items": [
+ { "item": "processor", "prob": 75 },
+ { "item": "RAM", "prob": 80 },
+ { "item": "power_supply", "prob": 70 },
+ { "item": "amplifier", "prob": 90 },
+ { "item": "steel_chunk", "count": [ 1, 4 ] },
+ { "item": "spring", "prob": 80 },
+ { "item": "steel_lump", "prob": 60 },
+ { "item": "sheet_metal", "prob": 50 },
+ { "item": "motor", "prob": 60 }
+ ]
+ },
+ "bash": {
+ "str_min": 8,
+ "str_max": 45,
+ "sound": "smash!",
+ "sound_fail": "thunk.",
+ "items": [
+ { "item": "processor", "prob": 15 },
+ { "item": "RAM", "prob": 30 },
+ { "item": "power_supply", "prob": 50 },
+ { "item": "amplifier", "prob": 70 },
+ { "item": "steel_chunk", "count": [ 1, 3 ] },
+ { "item": "spring", "prob": 80 },
+ { "item": "steel_lump", "prob": 50 },
+ { "item": "sheet_metal", "prob": 30 },
+ { "item": "scrap", "count": [ 2, 5 ] },
+ { "item": "motor", "prob": 30 }
+ ]
+ }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-recreation.json b/data/json/furniture_and_terrain/furniture-recreation.json
index 8c7e0ac0189ae..cac041cc5a6a0 100644
--- a/data/json/furniture_and_terrain/furniture-recreation.json
+++ b/data/json/furniture_and_terrain/furniture-recreation.json
@@ -347,5 +347,44 @@
{ "item": "plastic_chunk", "count": [ 1, 5 ] }
]
}
+ },
+ {
+ "type": "furniture",
+ "id": "f_speaker_cabinet",
+ "name": "speaker cabinet",
+ "description": "A cabinet loaded with 12-inch speakers, intended to help make various things loud. It can't serve its original purpose these days, but it could be disassembled for various electronic parts.",
+ "symbol": "7",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 50,
+ "max_volume": 15,
+ "required_str": 7,
+ "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM" ],
+ "deconstruct": {
+ "items": [
+ { "item": "scrap", "count": [ 4, 6 ] },
+ { "item": "e_scrap", "count": [ 1, 2 ] },
+ { "item": "plastic_chunk", "count": [ 0, 2 ] },
+ { "item": "wood_panel", "count": 1 },
+ { "item": "2x4", "count": 4 },
+ { "item": "nail", "charges": [ 8, 10 ] },
+ { "item": "cable", "charges": [ 3, 4 ] }
+ ]
+ },
+ "bash": {
+ "str_min": 8,
+ "str_max": 20,
+ "sound": "smash!",
+ "sound_fail": "whump!",
+ "items": [
+ { "item": "splinter", "count": [ 0, 6 ] },
+ { "item": "scrap", "count": [ 0, 3 ] },
+ { "item": "2x4", "count": [ 1, 2 ] },
+ { "item": "nail", "charges": [ 2, 6 ] },
+ { "item": "cable", "charges": [ 1, 3 ] },
+ { "item": "e_scrap", "prob": 25 },
+ { "item": "plastic_chunk", "count": [ 0, 1 ] }
+ ]
+ }
}
]
diff --git a/data/json/furniture_and_terrain/furniture-seats.json b/data/json/furniture_and_terrain/furniture-seats.json
index be502d2814df1..c20d6dce42dd1 100644
--- a/data/json/furniture_and_terrain/furniture-seats.json
+++ b/data/json/furniture_and_terrain/furniture-seats.json
@@ -161,5 +161,48 @@
"sound_fail": "whump.",
"items": [ { "item": "2x4", "count": 1 }, { "item": "nail", "charges": [ 1, 5 ] }, { "item": "splinter", "count": 3 } ]
}
+ },
+ {
+ "type": "furniture",
+ "id": "f_camp_chair",
+ "name": "camp chair",
+ "symbol": "#",
+ "looks_like": "f_chair",
+ "description": "Sit down, have a drink. It can folded for easy transportation.",
+ "color": "brown",
+ "move_cost_mod": 1,
+ "coverage": 35,
+ "floor_bedding_warmth": -1000,
+ "bonus_fire_warmth_feet": 1000,
+ "required_str": 3,
+ "deployed_item": "camp_chair",
+ "examine_action": "deployed_furniture",
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "CAN_SIT" ],
+ "max_volume": 3500,
+ "deconstruct": { "items": [ { "item": "camp_chair", "count": 1 } ] }
+ },
+ {
+ "type": "furniture",
+ "id": "f_bench",
+ "name": "bench",
+ "symbol": "#",
+ "description": "Hobo bed. Airy. Use at your own risk.",
+ "color": "brown",
+ "move_cost_mod": 1,
+ "coverage": 35,
+ "comfort": 1,
+ "floor_bedding_warmth": -1500,
+ "bonus_fire_warmth_feet": 1000,
+ "required_str": 5,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SHORT", "CAN_SIT" ],
+ "max_volume": 4000,
+ "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "nail", "charges": [ 6, 10 ] } ] },
+ "bash": {
+ "str_min": 12,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ]
+ }
}
]
diff --git a/data/json/furniture_and_terrain/furniture-signs.json b/data/json/furniture_and_terrain/furniture-signs.json
new file mode 100644
index 0000000000000..fd3c6d62dc145
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-signs.json
@@ -0,0 +1,91 @@
+[
+ {
+ "type": "furniture",
+ "id": "f_bulletin",
+ "name": "bulletin board",
+ "description": "A big, cork bulletin board capable of sporting various notices. Pin some notes for other survivors to read.",
+ "symbol": "6",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 75,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE", "NOITEM", "ORGANIC", "TRANSPARENT" ],
+ "examine_action": "bulletin_board",
+ "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "nail", "charges": [ 4, 8 ] } ] },
+ "bash": {
+ "str_min": 3,
+ "str_max": 40,
+ "sound": "crunch!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 0, 3 ] },
+ { "item": "nail", "charges": [ 4, 6 ] },
+ { "item": "splinter", "count": [ 1, 4 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_sign",
+ "name": "sign",
+ "symbol": "P",
+ "description": "Read it. Warnings ahead.",
+ "color": "brown",
+ "examine_action": "sign",
+ "move_cost_mod": 1,
+ "coverage": 35,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
+ "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
+ "bash": {
+ "str_min": 6,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_sign",
+ "name": "sign",
+ "symbol": "P",
+ "description": "Read it. Warnings ahead.",
+ "color": "brown",
+ "examine_action": "sign",
+ "move_cost_mod": 1,
+ "coverage": 35,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
+ "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
+ "bash": {
+ "str_min": 6,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_sign_warning",
+ "name": "warning sign",
+ "symbol": "P",
+ "description": "A triangle-shaped sign on a post meant to indicate something important or hazard.",
+ "color": "red",
+ "examine_action": "sign",
+ "looks_like": "f_sign",
+ "move_cost_mod": 1,
+ "coverage": 35,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
+ "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
+ "bash": {
+ "str_min": 6,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
+ }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json
index 4b214ebbbb044..10b1edf65da2a 100644
--- a/data/json/furniture_and_terrain/furniture-storage.json
+++ b/data/json/furniture_and_terrain/furniture-storage.json
@@ -189,6 +189,31 @@
"items": [ { "item": "2x4", "count": [ 1, 5 ] }, { "item": "nail", "charges": [ 2, 10 ] } ]
}
},
+ {
+ "type": "furniture",
+ "id": "f_cardboard_box",
+ "name": "large cardboard box",
+ "symbol": "X",
+ "description": "A large cardboard box: this could be used to store things, or as a hiding place.",
+ "color": "brown",
+ "move_cost_mod": 7,
+ "coverage": 90,
+ "comfort": 1,
+ "floor_bedding_warmth": 200,
+ "required_str": 3,
+ "deconstruct": { "items": [ { "item": "box_large", "count": 1 } ] },
+ "max_volume": 6000,
+ "deployed_item": "box_large",
+ "examine_action": "deployed_furniture",
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "PLACE_ITEM", "ORGANIC", "EASY_DECONSTRUCT", "BASHABLE", "HIDE_PLACE", "NO_SIGHT" ],
+ "bash": {
+ "str_min": 2,
+ "str_max": 15,
+ "sound": "crumple!",
+ "sound_fail": "thud.",
+ "items": [ { "item": "paper", "charges": [ 50, 100 ] } ]
+ }
+ },
{
"type": "furniture",
"id": "f_cupboard",
@@ -607,6 +632,64 @@
"items": [ { "item": "plastic_chunk", "count": [ 1, 2 ] } ]
}
},
+ {
+ "type": "furniture",
+ "id": "f_wardrobe",
+ "name": "wardrobe",
+ "looks_like": "f_dresser",
+ "description": "A tall piece of furniture - basically a freestanding closet.",
+ "symbol": "{",
+ "color": "i_brown",
+ "move_cost_mod": -1,
+ "coverage": 85,
+ "required_str": 9,
+ "flags": [ "CONTAINER", "FLAMMABLE", "PLACE_ITEM", "ORGANIC", "BLOCKSDOOR", "MOUNTABLE" ],
+ "deconstruct": {
+ "items": [ { "item": "2x4", "count": 20 }, { "item": "nail", "charges": [ 16, 24 ] }, { "item": "pipe", "count": 2 } ]
+ },
+ "max_volume": 2000,
+ "bash": {
+ "str_min": 12,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 8, 12 ] },
+ { "item": "nail", "charges": [ 8, 14 ] },
+ { "item": "splinter", "count": [ 4, 10 ] },
+ { "item": "pipe", "count": [ 0, 1 ] },
+ { "item": "scrap", "count": [ 2, 5 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_filing_cabinet",
+ "name": "filing cabinet",
+ "looks_like": "f_rack",
+ "description": "A set of drawers in a sturdy metal cabinet, used to hold files. It can be locked to protect important information. If you're lucky, there are often keys nearby.",
+ "symbol": "}",
+ "color": "dark_gray",
+ "move_cost_mod": 2,
+ "coverage": 70,
+ "required_str": 7,
+ "flags": [ "PLACE_ITEM", "TRANSPARENT", "CONTAINER", "BLOCKSDOOR", "MOUNTABLE" ],
+ "deconstruct": {
+ "items": [
+ { "item": "sheet_metal", "count": [ 2, 6 ] },
+ { "item": "scrap", "count": [ 2, 6 ] },
+ { "item": "lock", "count": [ 0, 1 ] }
+ ]
+ },
+ "max_volume": 800,
+ "bash": {
+ "str_min": 8,
+ "str_max": 30,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "scrap", "count": [ 0, 6 ] }, { "item": "sheet_metal", "count": [ 0, 4 ] } ]
+ }
+ },
{
"type": "furniture",
"id": "f_utility_shelf",
@@ -676,5 +759,91 @@
{ "item": "splinter", "count": 1 }
]
}
+ },
+ {
+ "type": "furniture",
+ "id": "f_displaycase",
+ "name": "display case",
+ "description": "Display your stuff fancily and securely.",
+ "symbol": "#",
+ "color": "light_cyan",
+ "move_cost_mod": 2,
+ "coverage": 80,
+ "required_str": 9,
+ "flags": [ "TRANSPARENT", "SEALED", "PLACE_ITEM" ],
+ "bash": {
+ "str_min": 6,
+ "str_max": 20,
+ "sound": "glass breaking",
+ "sound_fail": "whack!",
+ "sound_vol": 16,
+ "sound_fail_vol": 12,
+ "furn_set": "f_displaycase_b",
+ "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_displaycase_b",
+ "name": "broken display case",
+ "description": "Display your stuff. It'll get stolen.",
+ "symbol": "#",
+ "color": "light_gray",
+ "move_cost_mod": 2,
+ "coverage": 80,
+ "required_str": 9,
+ "flags": [ "TRANSPARENT", "PLACE_ITEM" ],
+ "bash": {
+ "str_min": 8,
+ "str_max": 30,
+ "sound": "crunch!",
+ "sound_fail": "whump.",
+ "items": [ { "item": "2x4", "count": [ 3, 6 ] }, { "item": "splinter", "count": [ 2, 4 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_standing_tank",
+ "name": "standing tank",
+ "description": "A large freestanding metal tank, useful for holding liquids.",
+ "symbol": "O",
+ "color": "light_gray",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": -1,
+ "flags": [ "BASHABLE", "CONTAINER", "DECONSTRUCT", "LIQUIDCONT", "NOITEM", "SEALED", "TRANSPARENT" ],
+ "deconstruct": { "items": [ { "item": "metal_tank", "count": 4 }, { "item": "water_faucet", "count": 1 } ] },
+ "examine_action": "keg",
+ "keg_capacity": 1200,
+ "bash": {
+ "str_min": 10,
+ "str_max": 20,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [ { "item": "scrap", "count": [ 8, 32 ] }, { "item": "water_faucet", "prob": 50 } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_dumpster",
+ "name": "dumpster",
+ "description": "Stores trash. Doesn't get picked up anymore. Note the smell.",
+ "symbol": "{",
+ "color": "green",
+ "move_cost_mod": 3,
+ "coverage": 70,
+ "required_str": 16,
+ "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT" ],
+ "bash": {
+ "str_min": 8,
+ "str_max": 45,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 2, 8 ] },
+ { "item": "steel_chunk", "count": [ 1, 3 ] },
+ { "item": "pipe", "count": [ 1, 2 ] }
+ ]
+ }
}
]
diff --git a/data/json/furniture_and_terrain/furniture-surfaces.json b/data/json/furniture_and_terrain/furniture-surfaces.json
index 1d5772db58a54..d24d7deb240d4 100644
--- a/data/json/furniture_and_terrain/furniture-surfaces.json
+++ b/data/json/furniture_and_terrain/furniture-surfaces.json
@@ -97,6 +97,41 @@
"examine_action": "workbench",
"workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }
},
+ {
+ "type": "furniture",
+ "id": "f_workbench",
+ "name": "workbench",
+ "description": "A sturdy workbench built out of metal. It is perfect for crafting large and heavy things.",
+ "symbol": "#",
+ "color": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "looks_like": "f_lab_bench",
+ "flags": [ "TRANSPARENT", "PLACE_ITEM", "MOUNTABLE", "FLAT_SURF" ],
+ "deconstruct": {
+ "items": [
+ { "item": "pipe", "count": [ 6, 8 ] },
+ { "item": "sheet_metal", "count": 2 },
+ { "item": "sheet_metal_small", "count": [ 2, 4 ] }
+ ]
+ },
+ "max_volume": 4000,
+ "bash": {
+ "str_min": 35,
+ "str_max": 80,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "pipe", "count": [ 4, 6 ] },
+ { "item": "sheet_metal", "count": [ 0, 1 ] },
+ { "item": "sheet_metal_small", "count": [ 12, 24 ] },
+ { "item": "steel_chunk", "count": [ 4, 8 ] },
+ { "item": "scrap", "count": [ 12, 24 ] }
+ ]
+ },
+ "examine_action": "workbench",
+ "workbench": { "multiplier": 1.2, "mass": 500000, "volume": "200L" }
+ },
{
"type": "furniture",
"id": "f_leather_tarp",
diff --git a/data/json/furniture_and_terrain/furniture-terrains.json b/data/json/furniture_and_terrain/furniture-terrains.json
new file mode 100644
index 0000000000000..abd9276c24e29
--- /dev/null
+++ b/data/json/furniture_and_terrain/furniture-terrains.json
@@ -0,0 +1,674 @@
+[
+ {
+ "id": "f_tatami",
+ "type": "furniture",
+ "name": "tatami mat",
+ "description": "A tatami is a type of mat used as a flooring material in traditional Japanese-style rooms.",
+ "symbol": "#",
+ "color": [ "brown" ],
+ "move_cost_mod": 0,
+ "comfort": 2,
+ "floor_bedding_warmth": -1500,
+ "max_volume": 4000,
+ "required_str": 7,
+ "bash": {
+ "str_min": 8,
+ "str_max": 30,
+ "sound": "crunch.",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "straw_pile", "count": [ 5, 8 ] },
+ { "item": "rag", "count": [ 2, 4 ] },
+ { "item": "string_36", "count": [ 1, 2 ] }
+ ]
+ },
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC" ]
+ },
+ {
+ "type": "furniture",
+ "id": "f_pillow_fort",
+ "name": "pillow fort",
+ "symbol": "^",
+ "description": "A comfy place to hide from the world. Not very defensible, though.",
+ "color": "white",
+ "move_cost_mod": 3,
+ "coverage": 90,
+ "comfort": 4,
+ "floor_bedding_warmth": 1000,
+ "required_str": -1,
+ "deconstruct": { "items": [ { "item": "pillow", "count": 19 }, { "item": "blanket", "count": 3 } ] },
+ "max_volume": 4000,
+ "flags": [
+ "TRANSPARENT",
+ "FLAMMABLE_ASH",
+ "PLACE_ITEM",
+ "ORGANIC",
+ "REDUCE_SCENT",
+ "EASY_DECONSTRUCT",
+ "BASHABLE",
+ "HIDE_PLACE",
+ "NO_SIGHT"
+ ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 1,
+ "sound": "paf!",
+ "sound_fail": "poof.",
+ "items": [ { "item": "pillow", "count": 19 }, { "item": "blanket", "count": 3 } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_cardboard_fort",
+ "name": "cardboard fort",
+ "symbol": "^",
+ "description": "A fort built by tipping a cardboard box on its side, lining it with blankets, and partly weather sealing it with a plastic sheet.",
+ "color": "brown",
+ "move_cost_mod": 3,
+ "coverage": 95,
+ "comfort": 4,
+ "floor_bedding_warmth": 700,
+ "required_str": 3,
+ "deconstruct": {
+ "items": [
+ { "item": "box_large", "count": 1 },
+ { "item": "plastic_sheet", "count": 1 },
+ { "item": "blanket", "count": 2 },
+ { "item": "pillow", "count": 4 }
+ ]
+ },
+ "max_volume": 4000,
+ "flags": [
+ "TRANSPARENT",
+ "FLAMMABLE_ASH",
+ "PLACE_ITEM",
+ "ORGANIC",
+ "REDUCE_SCENT",
+ "EASY_DECONSTRUCT",
+ "BASHABLE",
+ "HIDE_PLACE",
+ "NO_SIGHT",
+ "BLOCK_WIND"
+ ],
+ "bash": {
+ "str_min": 4,
+ "str_max": 15,
+ "sound": "crumple!",
+ "sound_fail": "thud.",
+ "items": [ { "item": "paper", "count": [ 50, 100 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_cardboard_wall",
+ "name": "cardboard wall",
+ "symbol": "#",
+ "bgcolor": "brown",
+ "move_cost_mod": -1,
+ "coverage": 100,
+ "description": "This is a pile of cardboard boxes that have been filled with rags and junk and stacked together like bricks to form a wall.",
+ "required_str": -1,
+ "flags": [ "NOITEM", "BLOCKSDOOR", "FLAMMABLE_ASH", "ORGANIC", "EASY_DECONSTRUCT", "BLOCK_WIND" ],
+ "deconstruct": {
+ "items": [
+ { "item": "box_large", "count": 1 },
+ { "item": "box_medium", "count": 2 },
+ { "item": "box_small", "count": 4 },
+ { "item": "rag", "count": 50 },
+ { "item": "paper", "count": 50 },
+ { "item": "plastic_chunk", "count": 20 },
+ { "item": "plastic_sheet", "count": 2 }
+ ]
+ },
+ "bash": {
+ "str_min": 8,
+ "str_max": 30,
+ "sound": "crash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "box_large", "count": [ 0, 1 ] },
+ { "item": "box_medium", "count": [ 0, 2 ] },
+ { "item": "box_small", "count": [ 0, 4 ] },
+ { "item": "rag", "count": [ 20, 50 ] },
+ { "item": "paper", "count": [ 50, 150 ] },
+ { "item": "plastic_chunk", "count": [ 5, 20 ] },
+ { "item": "plastic_sheet", "count": [ 0, 2 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_beaded_door",
+ "name": "beaded curtain",
+ "description": "This beaded curtain could be pulled aside.",
+ "symbol": "+",
+ "color": "pink",
+ "looks_like": "f_canvas_door",
+ "move_cost_mod": 6,
+ "coverage": 90,
+ "required_str": -1,
+ "flags": [ "NOITEM", "DOOR", "PERMEABLE", "FLAMMABLE_ASH", "MOUNTABLE" ],
+ "open": "f_beaded_door_o",
+ "deconstruct": {
+ "items": [ { "item": "stick_long", "count": 1 }, { "item": "string_36", "count": 20 }, { "item": "wooden_bead", "count": 2000 } ]
+ },
+ "bash": {
+ "str_min": 1,
+ "str_max": 1,
+ "sound": "clickity clack...clack...clack",
+ "sound_fail": "clickity clack...clack",
+ "sound_vol": 15,
+ "items": [
+ { "item": "string_36", "count": [ 3, 15 ] },
+ { "item": "stick_long", "count": 1 },
+ { "item": "wooden_bead", "count": [ 200, 500 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_beaded_door_o",
+ "name": "open beaded curtain",
+ "description": "This beaded curtain has been pulled aside.",
+ "symbol": ".",
+ "color": "pink",
+ "looks_like": "f_canvas_door_o",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT" ],
+ "close": "f_beaded_door",
+ "deconstruct": {
+ "items": [ { "item": "stick_long", "count": 1 }, { "item": "string_36", "count": 20 }, { "item": "wooden_bead", "count": 2000 } ]
+ },
+ "bash": {
+ "str_min": 1,
+ "str_max": 1,
+ "sound": "clickity clack...clack...clack!",
+ "sound_fail": "clickity clack...clack",
+ "sound_vol": 15,
+ "items": [
+ { "item": "string_36", "count": [ 3, 15 ] },
+ { "item": "stick_long", "count": 1 },
+ { "item": "wooden_bead", "count": [ 200, 500 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_canvas_floor",
+ "name": "canvas floor",
+ "description": "Flooring made out of stretched, waterproof cloth. Helps keep the dirt out of the tent.",
+ "symbol": "#",
+ "color": "white",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM" ]
+ },
+ {
+ "type": "furniture",
+ "id": "f_canvas_wall",
+ "name": "canvas wall",
+ "description": "A wall made of stretched, waterproof cloth.",
+ "symbol": "#",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_large_canvas_wall",
+ "name": "canvas wall",
+ "description": "A wall made of stretched, heavy-duty, waterproof cloth.",
+ "symbol": "#",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "collapse_radius": 2,
+ "tent_centers": [ "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_canvas_door",
+ "name": "canvas flap",
+ "description": "This canvas flap door could be pulled aside.",
+ "symbol": "+",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND" ],
+ "open": "f_canvas_door_o",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_canvas_door_o",
+ "name": "open canvas flap",
+ "description": "This canvas flap door has been pulled aside.",
+ "symbol": ".",
+ "color": "blue",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT" ],
+ "close": "f_canvas_door",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet", "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_large_canvas_door",
+ "name": "canvas flap",
+ "description": "This heavy canvas flap door could be pulled aside.",
+ "symbol": "+",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND" ],
+ "open": "f_large_canvas_door_o",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "collapse_radius": 2,
+ "tent_centers": [ "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_large_canvas_door_o",
+ "name": "open canvas flap",
+ "description": "This heavy canvas flap door has been pulled aside.",
+ "symbol": ".",
+ "color": "blue",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT" ],
+ "close": "f_large_canvas_door",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "collapse_radius": 2,
+ "tent_centers": [ "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_groundsheet",
+ "name": "groundsheet",
+ "description": "This plastic groundsheet could keep you dry.",
+ "symbol": ";",
+ "color": "green",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
+ "examine_action": "portable_structure",
+ "deployed_item": "tent_kit",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "items": [ { "item": "broketent" } ],
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_large_groundsheet",
+ "name": "groundsheet",
+ "description": "This large plastic groundsheet could keep you dry.",
+ "symbol": ";",
+ "color": "green",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "collapse_radius": 2,
+ "tent_centers": [ "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_center_groundsheet",
+ "name": "groundsheet",
+ "description": "This plastic groundsheet could keep you dry.",
+ "symbol": ";",
+ "color": "green",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
+ "examine_action": "portable_structure",
+ "deployed_item": "large_tent_kit",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "collapse_radius": 2,
+ "items": [ { "item": "largebroketent" } ],
+ "tent_centers": [ "f_center_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_fema_groundsheet",
+ "name": "groundsheet",
+ "description": "This plastic government-issue groundsheet could keep you dry, but was made by the lowest bidder.",
+ "symbol": ";",
+ "color": "green",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "INDOORS", "ORGANIC", "NOCOLLIDE" ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_skin_wall",
+ "name": "animalskin wall",
+ "symbol": "#",
+ "description": "Wall made out of animal skin. Either an amazing or horrifying sight.",
+ "color": "brown",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_skin_door",
+ "name": "animalskin flap",
+ "description": "This animal skin flap could be pulled aside.",
+ "symbol": "+",
+ "color": "white",
+ "move_cost_mod": -1,
+ "coverage": 95,
+ "required_str": -1,
+ "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
+ "open": "f_skin_door_o",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_skin_door_o",
+ "name": "open animalskin flap",
+ "description": "This animal skin flap has been pulled aside.",
+ "symbol": ".",
+ "color": "white",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT" ],
+ "close": "f_skin_door",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_skin_groundsheet",
+ "name": "animalskin floor",
+ "description": "This animal skin groundsheet could keep you dry.",
+ "symbol": ";",
+ "color": "brown",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
+ "examine_action": "portable_structure",
+ "deployed_item": "shelter_kit",
+ "bash": {
+ "str_min": 1,
+ "str_max": 8,
+ "sound": "rrrrip!",
+ "sound_fail": "slap!",
+ "sound_vol": 8,
+ "items": [ { "item": "damaged_shelter_kit" } ],
+ "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_rubble",
+ "name": "pile of rubble",
+ "symbol": "^",
+ "description": "Pile of various metals, bricks, and other building materials. You could clear it with a shovel.",
+ "color": "light_gray",
+ "move_cost_mod": 6,
+ "max_volume": 3000,
+ "required_str": -1,
+ "flags": [
+ "TRANSPARENT",
+ "UNSTABLE",
+ "ROUGH",
+ "PLACE_ITEM",
+ "MOUNTABLE",
+ "CONTAINER",
+ "SEALED",
+ "ALLOW_FIELD_EFFECT",
+ "TINY",
+ "RUBBLE"
+ ],
+ "examine_action": "rubble"
+ },
+ {
+ "type": "furniture",
+ "id": "f_rubble_rock",
+ "name": "pile of rocky rubble",
+ "description": "Pile of rocks. Useless?",
+ "symbol": "^",
+ "color": "dark_gray",
+ "move_cost_mod": 6,
+ "max_volume": 3000,
+ "required_str": -1,
+ "flags": [
+ "TRANSPARENT",
+ "UNSTABLE",
+ "ROUGH",
+ "PLACE_ITEM",
+ "MOUNTABLE",
+ "CONTAINER",
+ "SEALED",
+ "ALLOW_FIELD_EFFECT",
+ "SHORT",
+ "RUBBLE"
+ ],
+ "examine_action": "rubble"
+ },
+ {
+ "type": "furniture",
+ "id": "f_rubble_landfill",
+ "name": "pile of trashy rubble",
+ "description": "Trash topped with dirt and grass, it smells gross, but another man's trash...",
+ "symbol": "#",
+ "color": "green",
+ "move_cost_mod": 8,
+ "max_volume": 3000,
+ "required_str": -1,
+ "flags": [
+ "TRANSPARENT",
+ "UNSTABLE",
+ "ROUGH",
+ "PLACE_ITEM",
+ "MOUNTABLE",
+ "CONTAINER",
+ "SEALED",
+ "ALLOW_FIELD_EFFECT",
+ "SHORT",
+ "RUBBLE"
+ ],
+ "examine_action": "rubble"
+ },
+ {
+ "type": "furniture",
+ "id": "f_wreckage",
+ "name": "metal wreckage",
+ "description": "Pile of various bent and twisted metals.",
+ "symbol": "#",
+ "color": "cyan",
+ "move_cost_mod": 6,
+ "max_volume": 3000,
+ "required_str": -1,
+ "flags": [
+ "TRANSPARENT",
+ "UNSTABLE",
+ "ROUGH",
+ "SHARP",
+ "PLACE_ITEM",
+ "MOUNTABLE",
+ "CONTAINER",
+ "SEALED",
+ "ALLOW_FIELD_EFFECT",
+ "SHORT",
+ "RUBBLE"
+ ],
+ "examine_action": "rubble"
+ },
+ {
+ "type": "furniture",
+ "id": "f_ash",
+ "name": "pile of ash",
+ "symbol": "#",
+ "description": "Some ash, from wood or possibly bodies.",
+ "color": "light_gray",
+ "move_cost_mod": 0,
+ "required_str": -1,
+ "flags": [ "TRANSPARENT", "NOCOLLIDE", "CONTAINER", "SEALED", "PLACE_ITEM", "RUBBLE" ],
+ "examine_action": "rubble"
+ },
+ {
+ "type": "furniture",
+ "id": "f_boulder_small",
+ "name": "small boulder",
+ "description": "Blocking your path. Should be easy to move. It can be used as a primitive anvil.",
+ "symbol": "o",
+ "color": "dark_gray",
+ "move_cost_mod": 3,
+ "coverage": 30,
+ "required_str": 10,
+ "crafting_pseudo_item": "boulder_anvil",
+ "flags": [ "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "TINY" ],
+ "bash": {
+ "str_min": 16,
+ "str_max": 40,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "sharp_rock", "count": [ 0, 2 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_boulder_medium",
+ "name": "medium boulder",
+ "description": "Blocking your path. It'll be a struggle to move. It can be used as a primitive anvil.",
+ "symbol": "0",
+ "color": "dark_gray",
+ "move_cost_mod": 6,
+ "coverage": 45,
+ "required_str": 16,
+ "crafting_pseudo_item": "boulder_anvil",
+ "flags": [ "NOITEM", "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "SHORT", "BASHABLE" ],
+ "bash": {
+ "str_min": 32,
+ "str_max": 80,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [ { "item": "rock", "count": [ 5, 11 ] }, { "item": "sharp_rock", "count": [ 1, 4 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_boulder_large",
+ "name": "large boulder",
+ "description": "Now how are you going to move this?",
+ "symbol": "O",
+ "color": "dark_gray",
+ "move_cost_mod": -1,
+ "coverage": 65,
+ "required_str": 32,
+ "flags": [ "NOITEM", "MINEABLE", "BASHABLE", "BLOCK_WIND" ],
+ "bash": {
+ "str_min": 64,
+ "str_max": 160,
+ "sound": "smash!",
+ "sound_fail": "thump.",
+ "items": [
+ { "item": "rock", "count": [ 10, 22 ] },
+ { "item": "sharp_rock", "count": [ 3, 7 ] },
+ { "item": "material_limestone", "charges": [ 2, 5 ], "prob": 30 },
+ { "item": "material_rocksalt", "count": [ 0, 1 ], "prob": 10 },
+ { "item": "material_rhodonite", "count": [ 0, 1 ], "prob": 1 },
+ { "item": "material_zincite", "count": [ 0, 5 ], "prob": 2 }
+ ]
+ }
+ }
+]
diff --git a/data/json/furniture_and_terrain/furniture-tools.json b/data/json/furniture_and_terrain/furniture-tools.json
index 4075ca0343aa6..5bd4fad664b52 100644
--- a/data/json/furniture_and_terrain/furniture-tools.json
+++ b/data/json/furniture_and_terrain/furniture-tools.json
@@ -878,5 +878,233 @@
"sound_fail": "clang!",
"items": [ { "item": "scrap", "count": [ 1, 3 ] }, { "item": "pipe", "count": [ 1, 3 ] } ]
}
+ },
+ {
+ "id": "f_hanging_meathook",
+ "type": "furniture",
+ "name": "hanging meathook",
+ "description": "A hefty hook suspended from a chain for stringing up corpses.",
+ "symbol": "g",
+ "required_str": -1,
+ "move_cost_mod": 2,
+ "color": "light_gray",
+ "deconstruct": { "items": [ { "item": "grip_hook", "count": 1 }, { "item": "chain", "count": 1 } ] },
+ "flags": [ "TRANSPARENT", "BUTCHER_EQ" ]
+ },
+ {
+ "type": "furniture",
+ "id": "f_wind_mill",
+ "name": "wind mill",
+ "description": "A small wind-powered mill that can convert starchy products into flour.",
+ "symbol": "T",
+ "bgcolor": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "examine_action": "quern_examine",
+ "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
+ "deconstruct": { "items": [ { "item": "wind_mill", "count": 1 } ] },
+ "bash": {
+ "str_min": 16,
+ "str_max": 50,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 4, 8 ] },
+ { "item": "pipe", "count": [ 1, 3 ] },
+ { "item": "sheet_metal_small", "count": [ 4, 8 ] },
+ { "item": "rock", "count": [ 8, 15 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_wind_mill_active",
+ "name": "active wind mill",
+ "description": "A small wind-powered mill that can convert starchy products into flour. Its brake has been removed and it is turning.",
+ "symbol": "T",
+ "bgcolor": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "examine_action": "quern_examine",
+ "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
+ "deconstruct": { "items": [ { "item": "wind_mill", "count": 1 } ] },
+ "bash": {
+ "str_min": 16,
+ "str_max": 50,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 4, 8 ] },
+ { "item": "pipe", "count": [ 1, 3 ] },
+ { "item": "sheet_metal_small", "count": [ 4, 8 ] },
+ { "item": "rock", "count": [ 8, 15 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_water_mill",
+ "name": "water mill",
+ "description": "A small water-powered mill that can convert starchy products into flour.",
+ "symbol": "*",
+ "bgcolor": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "examine_action": "quern_examine",
+ "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
+ "deconstruct": { "items": [ { "item": "water_mill", "count": 1 } ] },
+ "bash": {
+ "str_min": 12,
+ "str_max": 50,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 1, 5 ] },
+ { "item": "nail", "charges": [ 5, 15 ] },
+ { "item": "splinter", "count": [ 20, 30 ] },
+ { "item": "sheet_metal_small", "count": [ 2, 3 ] },
+ { "item": "scrap", "count": [ 3, 5 ] },
+ { "item": "rock", "count": [ 8, 15 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_water_mill_active",
+ "name": "active water mill",
+ "description": "A small water-powered mill that can convert starchy products into flour. Its brake has been removed and it is turning.",
+ "symbol": "*",
+ "bgcolor": "red",
+ "move_cost_mod": 2,
+ "required_str": -1,
+ "examine_action": "quern_examine",
+ "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
+ "deconstruct": { "items": [ { "item": "water_mill", "count": 1 } ] },
+ "bash": {
+ "str_min": 12,
+ "str_max": 50,
+ "sound": "smash!",
+ "sound_fail": "whump.",
+ "items": [
+ { "item": "2x4", "count": [ 1, 5 ] },
+ { "item": "nail", "charges": [ 5, 15 ] },
+ { "item": "splinter", "count": [ 20, 30 ] },
+ { "item": "sheet_metal_small", "count": [ 2, 3 ] },
+ { "item": "scrap", "count": [ 3, 5 ] },
+ { "item": "rock", "count": [ 8, 15 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_aut_gas_console",
+ "name": "automated gas console",
+ "description": "Automated gas flow control console.",
+ "symbol": "9",
+ "color": "blue",
+ "move_cost_mod": -1,
+ "coverage": 40,
+ "required_str": 25,
+ "flags": [ "SEALED", "ALARMED", "BLOCKSDOOR" ],
+ "examine_action": "pay_gas",
+ "bash": { "str_min": 7, "str_max": 30, "sound": "glass breaking!", "sound_fail": "whack!", "furn_set": "f_aut_gas_console_o" }
+ },
+ {
+ "type": "furniture",
+ "id": "f_aut_gas_console_o",
+ "name": "broken automated gas console",
+ "description": "Automated gas flow control console. Broken. This is not a good thing.",
+ "symbol": "9",
+ "color": "dark_gray",
+ "move_cost_mod": -1,
+ "coverage": 40,
+ "required_str": 20,
+ "flags": [ "BLOCKSDOOR" ],
+ "bash": {
+ "str_min": 5,
+ "str_max": 45,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 2, 8 ] },
+ { "item": "steel_chunk", "count": [ 0, 3 ] },
+ { "item": "hose", "count": 1 },
+ { "item": "cu_pipe", "count": [ 1, 4 ] },
+ { "item": "scrap_copper", "count": [ 0, 2 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_vending_reinforced",
+ "name": "reinforced vending machine",
+ "description": "A bit tougher to crack open than regular vending machines. That just makes it all the sweeter a target, doesn't it?",
+ "symbol": "{",
+ "color": "light_red",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": 30,
+ "flags": [ "SEALED", "PLACE_ITEM", "ALARMED", "CONTAINER", "BLOCKSDOOR", "FLAMMABLE_HARD", "MINEABLE" ],
+ "examine_action": "vending",
+ "bash": {
+ "str_min": 150,
+ "str_max": 520,
+ "sound": "glass breaking!",
+ "sound_fail": "whack!",
+ "furn_set": "f_vending_o",
+ "items": [
+ { "item": "glass_shard", "count": [ 8, 25 ] },
+ { "item": "sheet_metal", "count": [ 0, 2 ] },
+ { "item": "steel_chunk", "count": [ 1, 5 ] }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_vending_c",
+ "name": "vending machine",
+ "symbol": "{",
+ "description": "Buy stuff with a cash card.",
+ "color": "light_cyan",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": 12,
+ "flags": [ "SEALED", "PLACE_ITEM", "ALARMED", "CONTAINER", "BLOCKSDOOR", "MINEABLE" ],
+ "examine_action": "vending",
+ "bash": {
+ "str_min": 20,
+ "str_max": 40,
+ "sound": "glass breaking!",
+ "sound_fail": "whack!",
+ "sound_vol": 16,
+ "sound_fail_vol": 12,
+ "furn_set": "f_vending_o",
+ "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_vending_o",
+ "name": "broken vending machine",
+ "description": "Ponder if you could buy stuff, as it's broken. Maybe if you broke it more, you wouldn't need to pay at all!",
+ "symbol": "{",
+ "color": "dark_gray",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": 12,
+ "flags": [ "PLACE_ITEM", "CONTAINER", "BLOCKSDOOR", "MINEABLE" ],
+ "bash": {
+ "str_min": 30,
+ "str_max": 50,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "scrap", "count": [ 2, 8 ] },
+ { "item": "steel_chunk", "count": [ 0, 3 ] },
+ { "item": "hose", "count": 1 },
+ { "item": "cu_pipe", "count": [ 1, 4 ] },
+ { "item": "scrap_copper", "count": [ 0, 2 ] }
+ ]
+ }
}
]
diff --git a/data/json/furniture_and_terrain/furniture.json b/data/json/furniture_and_terrain/furniture.json
deleted file mode 100644
index e75a6ff32db25..0000000000000
--- a/data/json/furniture_and_terrain/furniture.json
+++ /dev/null
@@ -1,2012 +0,0 @@
-[
- {
- "type": "furniture",
- "id": "f_rubble",
- "name": "pile of rubble",
- "symbol": "^",
- "description": "Pile of various metals, bricks, and other building materials. You could clear it with a shovel.",
- "color": "light_gray",
- "move_cost_mod": 6,
- "max_volume": 3000,
- "required_str": -1,
- "flags": [
- "TRANSPARENT",
- "UNSTABLE",
- "ROUGH",
- "PLACE_ITEM",
- "MOUNTABLE",
- "CONTAINER",
- "SEALED",
- "ALLOW_FIELD_EFFECT",
- "TINY",
- "RUBBLE"
- ],
- "examine_action": "rubble"
- },
- {
- "type": "furniture",
- "id": "f_rubble_rock",
- "name": "pile of rocky rubble",
- "description": "Pile of rocks. Useless?",
- "symbol": "^",
- "color": "dark_gray",
- "move_cost_mod": 6,
- "max_volume": 3000,
- "required_str": -1,
- "flags": [
- "TRANSPARENT",
- "UNSTABLE",
- "ROUGH",
- "PLACE_ITEM",
- "MOUNTABLE",
- "CONTAINER",
- "SEALED",
- "ALLOW_FIELD_EFFECT",
- "SHORT",
- "RUBBLE"
- ],
- "examine_action": "rubble"
- },
- {
- "type": "furniture",
- "id": "f_rubble_landfill",
- "name": "pile of trashy rubble",
- "description": "Trash topped with dirt and grass, it smells gross, but another man's trash...",
- "symbol": "#",
- "color": "green",
- "move_cost_mod": 8,
- "max_volume": 3000,
- "required_str": -1,
- "flags": [
- "TRANSPARENT",
- "UNSTABLE",
- "ROUGH",
- "PLACE_ITEM",
- "MOUNTABLE",
- "CONTAINER",
- "SEALED",
- "ALLOW_FIELD_EFFECT",
- "SHORT",
- "RUBBLE"
- ],
- "examine_action": "rubble"
- },
- {
- "type": "furniture",
- "id": "f_wreckage",
- "name": "metal wreckage",
- "description": "Pile of various bent and twisted metals.",
- "symbol": "#",
- "color": "cyan",
- "move_cost_mod": 6,
- "max_volume": 3000,
- "required_str": -1,
- "flags": [
- "TRANSPARENT",
- "UNSTABLE",
- "ROUGH",
- "SHARP",
- "PLACE_ITEM",
- "MOUNTABLE",
- "CONTAINER",
- "SEALED",
- "ALLOW_FIELD_EFFECT",
- "SHORT",
- "RUBBLE"
- ],
- "examine_action": "rubble"
- },
- {
- "type": "furniture",
- "id": "f_ash",
- "name": "pile of ash",
- "symbol": "#",
- "description": "Some ash, from wood or possibly bodies.",
- "color": "light_gray",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "NOCOLLIDE", "CONTAINER", "SEALED", "PLACE_ITEM", "RUBBLE" ],
- "examine_action": "rubble"
- },
- {
- "type": "furniture",
- "id": "f_bulletin",
- "name": "bulletin board",
- "description": "A big, cork bulletin board capable of sporting various notices. Pin some notes for other survivors to read.",
- "symbol": "6",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 75,
- "required_str": -1,
- "flags": [ "FLAMMABLE", "NOITEM", "ORGANIC", "TRANSPARENT" ],
- "examine_action": "bulletin_board",
- "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "nail", "charges": [ 4, 8 ] } ] },
- "bash": {
- "str_min": 3,
- "str_max": 40,
- "sound": "crunch!",
- "sound_fail": "whump.",
- "items": [
- { "item": "2x4", "count": [ 0, 3 ] },
- { "item": "nail", "charges": [ 4, 6 ] },
- { "item": "splinter", "count": [ 1, 4 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_sign",
- "name": "sign",
- "symbol": "P",
- "description": "Read it. Warnings ahead.",
- "color": "brown",
- "examine_action": "sign",
- "move_cost_mod": 1,
- "coverage": 35,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
- "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
- "bash": {
- "str_min": 6,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_bench",
- "name": "bench",
- "symbol": "#",
- "description": "Hobo bed. Airy. Use at your own risk.",
- "color": "brown",
- "move_cost_mod": 1,
- "coverage": 35,
- "comfort": 1,
- "floor_bedding_warmth": -1500,
- "bonus_fire_warmth_feet": 1000,
- "required_str": 5,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SHORT", "CAN_SIT" ],
- "max_volume": 4000,
- "deconstruct": { "items": [ { "item": "2x4", "count": 4 }, { "item": "nail", "charges": [ 6, 10 ] } ] },
- "bash": {
- "str_min": 12,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "2x4", "count": [ 1, 3 ] }, { "item": "nail", "charges": [ 2, 6 ] }, { "item": "splinter", "count": 1 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_table",
- "name": "table",
- "description": "Sit down when you eat!",
- "symbol": "#",
- "color": "red",
- "move_cost_mod": 2,
- "coverage": 50,
- "required_str": 5,
- "max_volume": 4000,
- "flags": [ "TRANSPARENT", "FLAMMABLE", "ORGANIC", "MOUNTABLE", "SHORT", "FLAT_SURF" ],
- "deconstruct": {
- "items": [ { "item": "2x4", "count": 4 }, { "item": "wood_panel", "count": 1 }, { "item": "nail", "charges": [ 6, 8 ] } ]
- },
- "bash": {
- "str_min": 12,
- "str_max": 50,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [
- { "item": "2x4", "count": [ 2, 4 ] },
- { "item": "wood_panel", "count": [ 0, 1 ] },
- { "item": "nail", "charges": [ 4, 8 ] },
- { "item": "splinter", "count": 1 }
- ]
- },
- "examine_action": "workbench",
- "workbench": { "multiplier": 1.1, "mass": 200000, "volume": "75L" }
- },
- {
- "type": "furniture",
- "id": "f_rack_coat",
- "name": "coat rack",
- "description": "A hooked rack for hanging jackets and hats.",
- "symbol": "Y",
- "color": "brown",
- "move_cost_mod": -1,
- "coverage": 30,
- "required_str": 4,
- "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM", "BLOCKSDOOR", "MOUNTABLE" ],
- "deconstruct": { "items": [ { "item": "nail", "charges": [ 2, 6 ] }, { "item": "2x4", "count": 2 } ] },
- "max_volume": 120,
- "bash": {
- "str_min": 6,
- "str_max": 30,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "splinter", "count": [ 3, 8 ] }, { "item": "nail", "charges": [ 1, 3 ] }, { "item": "2x4", "count": 1 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_sign",
- "name": "sign",
- "symbol": "P",
- "description": "Read it. Warnings ahead.",
- "color": "brown",
- "examine_action": "sign",
- "move_cost_mod": 1,
- "coverage": 35,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
- "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
- "bash": {
- "str_min": 6,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_sign_warning",
- "name": "warning sign",
- "symbol": "P",
- "description": "A triangle-shaped sign on a post meant to indicate something important or hazard.",
- "color": "red",
- "examine_action": "sign",
- "looks_like": "f_sign",
- "move_cost_mod": 1,
- "coverage": 35,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "SIGN" ],
- "deconstruct": { "items": [ { "item": "2x4", "count": 3 }, { "item": "nail", "charges": [ 2, 5 ] } ] },
- "bash": {
- "str_min": 6,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "2x4", "count": [ 1, 2 ] }, { "item": "nail", "charges": [ 2, 4 ] }, { "item": "splinter", "count": 2 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_bigmirror",
- "name": "standing mirror",
- "symbol": "{",
- "description": "Lookin' good - is that blood?",
- "color": "white",
- "move_cost_mod": 2,
- "coverage": 80,
- "required_str": 5,
- "flags": [ "NOITEM", "BLOCKSDOOR" ],
- "bash": {
- "str_min": 5,
- "str_max": 16,
- "sound": "glass breaking",
- "sound_fail": "whack!",
- "sound_vol": 16,
- "furn_set": "f_bigmirror_b",
- "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_bigmirror_b",
- "name": "broken standing mirror",
- "description": "You could look at yourself, if the mirror wasn't covered in cracks and fractures.",
- "symbol": "{",
- "color": "light_gray",
- "move_cost_mod": 2,
- "coverage": 80,
- "required_str": 5,
- "flags": [ "NOITEM", "BLOCKSDOOR" ],
- "bash": {
- "str_min": 8,
- "str_max": 30,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [ { "item": "scrap", "count": [ 2, 4 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_vending_c",
- "name": "vending machine",
- "symbol": "{",
- "description": "Buy stuff with a cash card.",
- "color": "light_cyan",
- "move_cost_mod": -1,
- "coverage": 90,
- "required_str": 12,
- "flags": [ "SEALED", "PLACE_ITEM", "ALARMED", "CONTAINER", "BLOCKSDOOR", "MINEABLE" ],
- "examine_action": "vending",
- "bash": {
- "str_min": 20,
- "str_max": 40,
- "sound": "glass breaking!",
- "sound_fail": "whack!",
- "sound_vol": 16,
- "sound_fail_vol": 12,
- "furn_set": "f_vending_o",
- "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_vending_o",
- "name": "broken vending machine",
- "description": "Ponder if you could buy stuff, as it's broken. Maybe if you broke it more, you wouldn't need to pay at all!",
- "symbol": "{",
- "color": "dark_gray",
- "move_cost_mod": -1,
- "coverage": 90,
- "required_str": 12,
- "flags": [ "PLACE_ITEM", "CONTAINER", "BLOCKSDOOR", "MINEABLE" ],
- "bash": {
- "str_min": 30,
- "str_max": 50,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 2, 8 ] },
- { "item": "steel_chunk", "count": [ 0, 3 ] },
- { "item": "hose", "count": 1 },
- { "item": "cu_pipe", "count": [ 1, 4 ] },
- { "item": "scrap_copper", "count": [ 0, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_dumpster",
- "name": "dumpster",
- "description": "Stores trash. Doesn't get picked up anymore. Note the smell.",
- "symbol": "{",
- "color": "green",
- "move_cost_mod": 3,
- "coverage": 70,
- "required_str": 16,
- "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT" ],
- "bash": {
- "str_min": 8,
- "str_max": 45,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 2, 8 ] },
- { "item": "steel_chunk", "count": [ 1, 3 ] },
- { "item": "pipe", "count": [ 1, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_canvas_wall",
- "name": "canvas wall",
- "description": "A wall made of stretched, waterproof cloth.",
- "symbol": "#",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_large_canvas_wall",
- "name": "canvas wall",
- "description": "A wall made of stretched, heavy-duty, waterproof cloth.",
- "symbol": "#",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "collapse_radius": 2,
- "tent_centers": [ "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_canvas_door",
- "name": "canvas flap",
- "description": "This canvas flap door could be pulled aside.",
- "symbol": "+",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND" ],
- "open": "f_canvas_door_o",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_canvas_door_o",
- "name": "open canvas flap",
- "description": "This canvas flap door has been pulled aside.",
- "symbol": ".",
- "color": "blue",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT" ],
- "close": "f_canvas_door",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet", "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_large_canvas_door",
- "name": "canvas flap",
- "description": "This heavy canvas flap door could be pulled aside.",
- "symbol": "+",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "DOOR", "BLOCK_WIND" ],
- "open": "f_large_canvas_door_o",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "collapse_radius": 2,
- "tent_centers": [ "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_large_canvas_door_o",
- "name": "open canvas flap",
- "description": "This heavy canvas flap door has been pulled aside.",
- "symbol": ".",
- "color": "blue",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT" ],
- "close": "f_large_canvas_door",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "collapse_radius": 2,
- "tent_centers": [ "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_groundsheet",
- "name": "groundsheet",
- "description": "This plastic groundsheet could keep you dry.",
- "symbol": ";",
- "color": "green",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
- "examine_action": "portable_structure",
- "deployed_item": "tent_kit",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "items": [ { "item": "broketent" } ],
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_large_groundsheet",
- "name": "groundsheet",
- "description": "This large plastic groundsheet could keep you dry.",
- "symbol": ";",
- "color": "green",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "collapse_radius": 2,
- "tent_centers": [ "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_center_groundsheet",
- "name": "groundsheet",
- "description": "This plastic groundsheet could keep you dry.",
- "symbol": ";",
- "color": "green",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
- "examine_action": "portable_structure",
- "deployed_item": "large_tent_kit",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "collapse_radius": 2,
- "items": [ { "item": "largebroketent" } ],
- "tent_centers": [ "f_center_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_fema_groundsheet",
- "name": "groundsheet",
- "description": "This plastic government-issue groundsheet could keep you dry, but was made by the lowest bidder.",
- "symbol": ";",
- "color": "green",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "INDOORS", "ORGANIC", "NOCOLLIDE" ],
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_skin_wall",
- "name": "animalskin wall",
- "symbol": "#",
- "description": "Wall made out of animal skin. Either an amazing or horrifying sight.",
- "color": "brown",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_skin_door",
- "name": "animalskin flap",
- "description": "This animal skin flap could be pulled aside.",
- "symbol": "+",
- "color": "white",
- "move_cost_mod": -1,
- "coverage": 95,
- "required_str": -1,
- "flags": [ "FLAMMABLE_HARD", "NOITEM", "BLOCK_WIND" ],
- "open": "f_skin_door_o",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_skin_door_o",
- "name": "open animalskin flap",
- "description": "This animal skin flap has been pulled aside.",
- "symbol": ".",
- "color": "white",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT" ],
- "close": "f_skin_door",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_skin_groundsheet",
- "name": "animalskin floor",
- "description": "This animal skin groundsheet could keep you dry.",
- "symbol": ";",
- "color": "brown",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "INDOORS", "NOCOLLIDE" ],
- "examine_action": "portable_structure",
- "deployed_item": "shelter_kit",
- "bash": {
- "str_min": 1,
- "str_max": 8,
- "sound": "rrrrip!",
- "sound_fail": "slap!",
- "sound_vol": 8,
- "items": [ { "item": "damaged_shelter_kit" } ],
- "tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ]
- }
- },
- {
- "type": "furniture",
- "id": "f_statue",
- "name": "statue",
- "description": "A carved statue made of stone.",
- "symbol": "S",
- "color": "dark_gray",
- "move_cost_mod": -1,
- "coverage": 50,
- "required_str": 10,
- "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE" ],
- "bash": {
- "str_min": 16,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [ { "item": "rock", "count": [ 1, 6 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_mannequin",
- "name": "mannequin",
- "description": "Put clothes on it, talk to it. Who's around to judge you? Wait... did it just move?",
- "symbol": "@",
- "color": "brown",
- "move_cost_mod": 2,
- "coverage": 40,
- "required_str": 5,
- "flags": [ "PLACE_ITEM", "TRANSPARENT", "FLAMMABLE" ],
- "bash": {
- "str_min": 6,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [ { "item": "splinter", "count": [ 9, 12 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_birdbath",
- "name": "birdbath",
- "description": "A decorative cement birdbath and pedestal.",
- "symbol": "o",
- "color": "light_gray",
- "move_cost_mod": -1,
- "required_str": 10,
- "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "MINEABLE", "LIQUIDCONT" ],
- "bash": {
- "str_min": 16,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "rebar", "count": [ 1, 2 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_rotary_clothesline",
- "name": "rotary clothes dryer line",
- "description": "A umbrella shaped clothes line mounted on a pole.",
- "symbol": "X",
- "color": "white",
- "move_cost_mod": -2,
- "required_str": 10,
- "flags": [ "TRANSPARENT", "BLOCKSDOOR", "BASHABLE", "PLACE_ITEM" ],
- "deconstruct": {
- "items": [ { "item": "pipe", "count": 6 }, { "item": "steel_chunk", "count": [ 2, 6 ] }, { "item": "wire", "count": 10 } ]
- },
- "bash": {
- "str_min": 6,
- "str_max": 10,
- "sound": "smash!",
- "sound_fail": "clang!",
- "items": [ { "item": "pipe", "count": [ 1, 6 ] }, { "item": "wire", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 1, 6 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_solar_unit",
- "name": "mounted solar panel",
- "description": "A mounted solar panel.",
- "symbol": "#",
- "color": "yellow",
- "move_cost_mod": 2,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "BASHABLE" ],
- "deconstruct": {
- "items": [
- { "item": "scrap", "count": [ 4, 6 ] },
- { "item": "plastic_chunk", "count": [ 1, 2 ] },
- { "item": "steel_chunk", "count": 3 },
- { "item": "pipe", "count": 4 },
- { "item": "2x4", "count": 4 },
- { "item": "solar_panel", "count": 1 }
- ]
- },
- "bash": {
- "str_min": 10,
- "str_max": 20,
- "sound": "whack!",
- "sound_fail": "clang!",
- "items": [
- { "item": "solar_cell", "count": [ 1, 5 ] },
- { "item": "scrap", "count": [ 3, 6 ] },
- { "item": "amplifier", "prob": 50 },
- { "item": "cable", "charges": [ 10, 15 ] },
- { "item": "power_supply", "prob": 50 },
- { "item": "scrap", "count": [ 4, 6 ] },
- { "item": "plastic_chunk", "count": [ 1, 2 ] },
- { "item": "steel_chunk", "count": 3 }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_egg_sackbw",
- "name": "spider egg sack",
- "description": "Much too large, off-white egg sack. Kind of icky. Something IS moving in there.",
- "symbol": "O",
- "color": "white",
- "move_cost_mod": 3,
- "required_str": 6,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
- "examine_action": "egg_sackbw",
- "bash": { "str_min": 8, "str_max": 16, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
- },
- {
- "type": "furniture",
- "id": "f_egg_sackcs",
- "name": "spider egg sack",
- "description": "Bulbous mass of spider eggs. More than kind of icky. Something IS moving in there.",
- "symbol": "O",
- "color": "white",
- "move_cost_mod": 3,
- "required_str": 6,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
- "examine_action": "egg_sackcs",
- "bash": { "str_min": 8, "str_max": 16, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
- },
- {
- "type": "furniture",
- "id": "f_egg_sackws",
- "name": "spider egg sack",
- "description": "A horrifyingly oversized egg sack. Something IS moving in there. If you're seeing this, you're already too close to it.",
- "symbol": "O",
- "color": "yellow",
- "move_cost_mod": 3,
- "required_str": 6,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
- "examine_action": "egg_sackws",
- "bash": { "str_min": 4, "str_max": 8, "sound": "splat!", "sound_fail": "whump.", "furn_set": "f_egg_sacke" }
- },
- {
- "type": "furniture",
- "id": "f_egg_sacke",
- "name": "ruptured egg sack",
- "description": "Super icky. Spider stuff's spilling out.",
- "symbol": "X",
- "color": "white",
- "move_cost_mod": 3,
- "required_str": 6,
- "flags": [ "TRANSPARENT", "CONTAINER", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ],
- "bash": { "str_min": 2, "str_max": 6, "sound": "splat!", "sound_fail": "whump." }
- },
- {
- "type": "furniture",
- "id": "f_vending_reinforced",
- "name": "reinforced vending machine",
- "description": "A bit tougher to crack open than regular vending machines. That just makes it all the sweeter a target, doesn't it?",
- "symbol": "{",
- "color": "light_red",
- "move_cost_mod": -1,
- "coverage": 90,
- "required_str": 30,
- "flags": [ "SEALED", "PLACE_ITEM", "ALARMED", "CONTAINER", "BLOCKSDOOR", "FLAMMABLE_HARD", "MINEABLE" ],
- "examine_action": "vending",
- "bash": {
- "str_min": 150,
- "str_max": 520,
- "sound": "glass breaking!",
- "sound_fail": "whack!",
- "furn_set": "f_vending_o",
- "items": [
- { "item": "glass_shard", "count": [ 8, 25 ] },
- { "item": "sheet_metal", "count": [ 0, 2 ] },
- { "item": "steel_chunk", "count": [ 1, 5 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_displaycase",
- "name": "display case",
- "description": "Display your stuff fancily and securely.",
- "symbol": "#",
- "color": "light_cyan",
- "move_cost_mod": 2,
- "coverage": 80,
- "required_str": 9,
- "flags": [ "TRANSPARENT", "SEALED", "PLACE_ITEM" ],
- "bash": {
- "str_min": 6,
- "str_max": 20,
- "sound": "glass breaking",
- "sound_fail": "whack!",
- "sound_vol": 16,
- "sound_fail_vol": 12,
- "furn_set": "f_displaycase_b",
- "items": [ { "item": "glass_shard", "count": [ 25, 50 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_displaycase_b",
- "name": "broken display case",
- "description": "Display your stuff. It'll get stolen.",
- "symbol": "#",
- "color": "light_gray",
- "move_cost_mod": 2,
- "coverage": 80,
- "required_str": 9,
- "flags": [ "TRANSPARENT", "PLACE_ITEM" ],
- "bash": {
- "str_min": 8,
- "str_max": 30,
- "sound": "crunch!",
- "sound_fail": "whump.",
- "items": [ { "item": "2x4", "count": [ 3, 6 ] }, { "item": "splinter", "count": [ 2, 4 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_standing_tank",
- "name": "standing tank",
- "description": "A large freestanding metal tank, useful for holding liquids.",
- "symbol": "O",
- "color": "light_gray",
- "move_cost_mod": -1,
- "coverage": 90,
- "required_str": -1,
- "flags": [ "BASHABLE", "CONTAINER", "DECONSTRUCT", "LIQUIDCONT", "NOITEM", "SEALED", "TRANSPARENT" ],
- "deconstruct": { "items": [ { "item": "metal_tank", "count": 4 }, { "item": "water_faucet", "count": 1 } ] },
- "examine_action": "keg",
- "keg_capacity": 1200,
- "bash": {
- "str_min": 10,
- "str_max": 20,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [ { "item": "scrap", "count": [ 8, 32 ] }, { "item": "water_faucet", "prob": 50 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_canvas_floor",
- "name": "canvas floor",
- "description": "Flooring made out of stretched, waterproof cloth. Helps keep the dirt out of the tent.",
- "symbol": "#",
- "color": "white",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM" ]
- },
- {
- "type": "furniture",
- "id": "f_robotic_arm",
- "name": "robotic arm",
- "description": "Automation! Science! Industry! Make a better horse! This robot arm promises to do it all. Except it's currently unpowered. You could remove the casing and retrieve the electronics through disassembly.",
- "symbol": "&",
- "bgcolor": "yellow",
- "move_cost_mod": 3,
- "required_str": 18,
- "flags": [ "TRANSPARENT", "MOUNTABLE" ],
- "deconstruct": {
- "items": [
- { "item": "processor", "prob": 75 },
- { "item": "RAM", "prob": 80 },
- { "item": "power_supply", "prob": 70 },
- { "item": "amplifier", "prob": 90 },
- { "item": "steel_chunk", "count": [ 1, 4 ] },
- { "item": "spring", "prob": 80 },
- { "item": "steel_lump", "prob": 60 },
- { "item": "sheet_metal", "prob": 50 },
- { "item": "motor", "prob": 60 }
- ]
- },
- "bash": {
- "str_min": 8,
- "str_max": 45,
- "sound": "smash!",
- "sound_fail": "thunk.",
- "items": [
- { "item": "processor", "prob": 15 },
- { "item": "RAM", "prob": 30 },
- { "item": "power_supply", "prob": 50 },
- { "item": "amplifier", "prob": 70 },
- { "item": "steel_chunk", "count": [ 1, 3 ] },
- { "item": "spring", "prob": 80 },
- { "item": "steel_lump", "prob": 50 },
- { "item": "sheet_metal", "prob": 30 },
- { "item": "scrap", "count": [ 2, 5 ] },
- { "item": "motor", "prob": 30 }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_aut_gas_console",
- "name": "automated gas console",
- "description": "Automated gas flow control console.",
- "symbol": "9",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 40,
- "required_str": 25,
- "flags": [ "SEALED", "ALARMED", "BLOCKSDOOR" ],
- "examine_action": "pay_gas",
- "bash": { "str_min": 7, "str_max": 30, "sound": "glass breaking!", "sound_fail": "whack!", "furn_set": "f_aut_gas_console_o" }
- },
- {
- "type": "furniture",
- "id": "f_aut_gas_console_o",
- "name": "broken automated gas console",
- "description": "Automated gas flow control console. Broken. This is not a good thing.",
- "symbol": "9",
- "color": "dark_gray",
- "move_cost_mod": -1,
- "coverage": 40,
- "required_str": 20,
- "flags": [ "BLOCKSDOOR" ],
- "bash": {
- "str_min": 5,
- "str_max": 45,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 2, 8 ] },
- { "item": "steel_chunk", "count": [ 0, 3 ] },
- { "item": "hose", "count": 1 },
- { "item": "cu_pipe", "count": [ 1, 4 ] },
- { "item": "scrap_copper", "count": [ 0, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_boulder_small",
- "name": "small boulder",
- "description": "Blocking your path. Should be easy to move. It can be used as a primitive anvil.",
- "symbol": "o",
- "color": "dark_gray",
- "move_cost_mod": 3,
- "coverage": 30,
- "required_str": 10,
- "crafting_pseudo_item": "boulder_anvil",
- "flags": [ "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "TINY" ],
- "bash": {
- "str_min": 16,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [ { "item": "rock", "count": [ 1, 6 ] }, { "item": "sharp_rock", "count": [ 0, 2 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_boulder_medium",
- "name": "medium boulder",
- "description": "Blocking your path. It'll be a struggle to move. It can be used as a primitive anvil.",
- "symbol": "0",
- "color": "dark_gray",
- "move_cost_mod": 6,
- "coverage": 45,
- "required_str": 16,
- "crafting_pseudo_item": "boulder_anvil",
- "flags": [ "NOITEM", "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "SHORT", "BASHABLE" ],
- "bash": {
- "str_min": 32,
- "str_max": 80,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [ { "item": "rock", "count": [ 5, 11 ] }, { "item": "sharp_rock", "count": [ 1, 4 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_boulder_large",
- "name": "large boulder",
- "description": "Now how are you going to move this?",
- "symbol": "O",
- "color": "dark_gray",
- "move_cost_mod": -1,
- "coverage": 65,
- "required_str": 32,
- "flags": [ "NOITEM", "MINEABLE", "BASHABLE", "BLOCK_WIND" ],
- "bash": {
- "str_min": 64,
- "str_max": 160,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [
- { "item": "rock", "count": [ 10, 22 ] },
- { "item": "sharp_rock", "count": [ 3, 7 ] },
- { "item": "material_limestone", "charges": [ 2, 5 ], "prob": 30 },
- { "item": "material_rocksalt", "count": [ 0, 1 ], "prob": 10 },
- { "item": "material_rhodonite", "count": [ 0, 1 ], "prob": 1 },
- { "item": "material_zincite", "count": [ 0, 5 ], "prob": 2 }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_slab",
- "name": "stone slab",
- "description": "A flat slab of heavy stone.",
- "symbol": "n",
- "color": "dark_gray",
- "move_cost_mod": 2,
- "coverage": 30,
- "required_str": 12,
- "crafting_pseudo_item": "boulder_anvil",
- "flags": [ "PLACE_ITEM", "BLOCKSDOOR", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "SHORT", "MINEABLE" ],
- "bash": {
- "str_min": 20,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "thump.",
- "items": [ { "item": "rock", "count": [ 2, 7 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_shackle",
- "name": "manacles",
- "description": "Chain serfs in your dungeon. All you need now is an iron ball to chain to it.",
- "symbol": "8",
- "color": "light_gray",
- "move_cost_mod": 1,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "SHORT" ],
- "bash": {
- "str_min": 18,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "crack.",
- "items": [ { "item": "chain", "count": [ 0, 2 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_grave_head",
- "name": "headstone",
- "description": "Keeps the bodies.",
- "symbol": "_",
- "color": "light_gray",
- "move_cost_mod": 0,
- "required_str": -1,
- "crafting_pseudo_item": "boulder_anvil",
- "flags": [ "MINEABLE", "TRANSPARENT", "SHORT", "NOCOLLIDE", "ALLOW_FIELD_EFFECT", "MOUNTABLE", "PLACE_ITEM" ],
- "bash": {
- "str_min": 50,
- "str_max": 150,
- "sound": "crash!",
- "sound_fail": "thump!",
- "items": [ { "item": "rock", "count": [ 2, 4 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_grave_stone",
- "name": "gravestone",
- "description": "Keeps the bodies. More fancy.",
- "symbol": "^",
- "color": "light_gray",
- "move_cost_mod": 2,
- "coverage": 50,
- "required_str": -1,
- "crafting_pseudo_item": "boulder_anvil",
- "flags": [ "MINEABLE", "NOITEM", "TRANSPARENT", "MOUNTABLE", "ROUGH", "PLACE_ITEM" ],
- "bash": {
- "str_min": 60,
- "str_max": 160,
- "sound": "crash!",
- "sound_fail": "thump!",
- "items": [ { "item": "rock", "count": [ 8, 14 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_grave_stone_old",
- "name": "worn gravestone",
- "description": "A worn-out gravestone.",
- "symbol": "^",
- "color": "dark_gray",
- "move_cost_mod": 1.5,
- "coverage": 50,
- "required_str": -1,
- "flags": [ "MINEABLE", "NOITEM", "TRANSPARENT", "MOUNTABLE", "ROUGH", "PLACE_ITEM", "UNSTABLE" ],
- "bash": {
- "str_min": 40,
- "str_max": 120,
- "sound": "crash!",
- "sound_fail": "thump!",
- "items": [ { "item": "rock", "count": [ 5, 10 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_grave_monument",
- "name": "obelisk",
- "description": "Monument to pride.",
- "symbol": "$",
- "color": "black_white",
- "move_cost_mod": -1,
- "coverage": 55,
- "required_str": -1,
- "flags": [ "MINEABLE", "NOITEM" ],
- "bash": {
- "str_min": 80,
- "str_max": 180,
- "sound": "crash!",
- "sound_fail": "thunk!",
- "items": [ { "item": "rock", "count": [ 18, 30 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_camp_chair",
- "name": "camp chair",
- "symbol": "#",
- "looks_like": "f_chair",
- "description": "Sit down, have a drink. It can folded for easy transportation.",
- "color": "brown",
- "move_cost_mod": 1,
- "coverage": 35,
- "floor_bedding_warmth": -1000,
- "bonus_fire_warmth_feet": 1000,
- "required_str": 3,
- "deployed_item": "camp_chair",
- "examine_action": "deployed_furniture",
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "CAN_SIT" ],
- "max_volume": 3500,
- "deconstruct": { "items": [ { "item": "camp_chair", "count": 1 } ] }
- },
- {
- "type": "furniture",
- "id": "f_wind_mill",
- "name": "wind mill",
- "description": "A small wind-powered mill that can convert starchy products into flour.",
- "symbol": "T",
- "bgcolor": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "examine_action": "quern_examine",
- "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
- "deconstruct": { "items": [ { "item": "wind_mill", "count": 1 } ] },
- "bash": {
- "str_min": 16,
- "str_max": 50,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 4, 8 ] },
- { "item": "pipe", "count": [ 1, 3 ] },
- { "item": "sheet_metal_small", "count": [ 4, 8 ] },
- { "item": "rock", "count": [ 8, 15 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_wind_mill_active",
- "name": "active wind mill",
- "description": "A small wind-powered mill that can convert starchy products into flour. Its brake has been removed and it is turning.",
- "symbol": "T",
- "bgcolor": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "examine_action": "quern_examine",
- "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
- "deconstruct": { "items": [ { "item": "wind_mill", "count": 1 } ] },
- "bash": {
- "str_min": 16,
- "str_max": 50,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 4, 8 ] },
- { "item": "pipe", "count": [ 1, 3 ] },
- { "item": "sheet_metal_small", "count": [ 4, 8 ] },
- { "item": "rock", "count": [ 8, 15 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_water_mill",
- "name": "water mill",
- "description": "A small water-powered mill that can convert starchy products into flour.",
- "symbol": "*",
- "bgcolor": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "examine_action": "quern_examine",
- "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
- "deconstruct": { "items": [ { "item": "water_mill", "count": 1 } ] },
- "bash": {
- "str_min": 12,
- "str_max": 50,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [
- { "item": "2x4", "count": [ 1, 5 ] },
- { "item": "nail", "charges": [ 5, 15 ] },
- { "item": "splinter", "count": [ 20, 30 ] },
- { "item": "sheet_metal_small", "count": [ 2, 3 ] },
- { "item": "scrap", "count": [ 3, 5 ] },
- { "item": "rock", "count": [ 8, 15 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_water_mill_active",
- "name": "active water mill",
- "description": "A small water-powered mill that can convert starchy products into flour. Its brake has been removed and it is turning.",
- "symbol": "*",
- "bgcolor": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "examine_action": "quern_examine",
- "flags": [ "SEALED", "ALLOW_FIELD_EFFECT", "CONTAINER", "NOITEM", "BLOCKSDOOR" ],
- "deconstruct": { "items": [ { "item": "water_mill", "count": 1 } ] },
- "bash": {
- "str_min": 12,
- "str_max": 50,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [
- { "item": "2x4", "count": [ 1, 5 ] },
- { "item": "nail", "charges": [ 5, 15 ] },
- { "item": "splinter", "count": [ 20, 30 ] },
- { "item": "sheet_metal_small", "count": [ 2, 3 ] },
- { "item": "scrap", "count": [ 3, 5 ] },
- { "item": "rock", "count": [ 8, 15 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_pillow_fort",
- "name": "pillow fort",
- "symbol": "^",
- "description": "A comfy place to hide from the world. Not very defensible, though.",
- "color": "white",
- "move_cost_mod": 3,
- "coverage": 90,
- "comfort": 4,
- "floor_bedding_warmth": 1000,
- "required_str": -1,
- "deconstruct": { "items": [ { "item": "pillow", "count": 19 }, { "item": "blanket", "count": 3 } ] },
- "max_volume": 4000,
- "flags": [
- "TRANSPARENT",
- "FLAMMABLE_ASH",
- "PLACE_ITEM",
- "ORGANIC",
- "REDUCE_SCENT",
- "EASY_DECONSTRUCT",
- "BASHABLE",
- "HIDE_PLACE",
- "NO_SIGHT"
- ],
- "bash": {
- "str_min": 1,
- "str_max": 1,
- "sound": "paf!",
- "sound_fail": "poof.",
- "items": [ { "item": "pillow", "count": 19 }, { "item": "blanket", "count": 3 } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_cardboard_fort",
- "name": "cardboard fort",
- "symbol": "^",
- "description": "A fort built by tipping a cardboard box on its side, lining it with blankets, and partly weather sealing it with a plastic sheet.",
- "color": "brown",
- "move_cost_mod": 3,
- "coverage": 95,
- "comfort": 4,
- "floor_bedding_warmth": 700,
- "required_str": 3,
- "deconstruct": {
- "items": [
- { "item": "box_large", "count": 1 },
- { "item": "plastic_sheet", "count": 1 },
- { "item": "blanket", "count": 2 },
- { "item": "pillow", "count": 4 }
- ]
- },
- "max_volume": 4000,
- "flags": [
- "TRANSPARENT",
- "FLAMMABLE_ASH",
- "PLACE_ITEM",
- "ORGANIC",
- "REDUCE_SCENT",
- "EASY_DECONSTRUCT",
- "BASHABLE",
- "HIDE_PLACE",
- "NO_SIGHT",
- "BLOCK_WIND"
- ],
- "bash": {
- "str_min": 4,
- "str_max": 15,
- "sound": "crumple!",
- "sound_fail": "thud.",
- "items": [ { "item": "paper", "count": [ 50, 100 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_cardboard_wall",
- "name": "cardboard wall",
- "symbol": "#",
- "bgcolor": "brown",
- "move_cost_mod": -1,
- "coverage": 100,
- "description": "This is a pile of cardboard boxes that have been filled with rags and junk and stacked together like bricks to form a wall.",
- "required_str": -1,
- "flags": [ "NOITEM", "BLOCKSDOOR", "FLAMMABLE_ASH", "ORGANIC", "EASY_DECONSTRUCT", "BLOCK_WIND" ],
- "deconstruct": {
- "items": [
- { "item": "box_large", "count": 1 },
- { "item": "box_medium", "count": 2 },
- { "item": "box_small", "count": 4 },
- { "item": "rag", "count": 50 },
- { "item": "paper", "count": 50 },
- { "item": "plastic_chunk", "count": 20 },
- { "item": "plastic_sheet", "count": 2 }
- ]
- },
- "bash": {
- "str_min": 8,
- "str_max": 30,
- "sound": "crash!",
- "sound_fail": "whump.",
- "items": [
- { "item": "box_large", "count": [ 0, 1 ] },
- { "item": "box_medium", "count": [ 0, 2 ] },
- { "item": "box_small", "count": [ 0, 4 ] },
- { "item": "rag", "count": [ 20, 50 ] },
- { "item": "paper", "count": [ 50, 150 ] },
- { "item": "plastic_chunk", "count": [ 5, 20 ] },
- { "item": "plastic_sheet", "count": [ 0, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_cardboard_box",
- "name": "large cardboard box",
- "symbol": "X",
- "description": "A large cardboard box: this could be used to store things, or as a hiding place.",
- "color": "brown",
- "move_cost_mod": 7,
- "coverage": 90,
- "comfort": 1,
- "floor_bedding_warmth": 200,
- "required_str": 3,
- "deconstruct": { "items": [ { "item": "box_large", "count": 1 } ] },
- "max_volume": 6000,
- "deployed_item": "box_large",
- "examine_action": "deployed_furniture",
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "PLACE_ITEM", "ORGANIC", "EASY_DECONSTRUCT", "BASHABLE", "HIDE_PLACE", "NO_SIGHT" ],
- "bash": {
- "str_min": 2,
- "str_max": 15,
- "sound": "crumple!",
- "sound_fail": "thud.",
- "items": [ { "item": "paper", "charges": [ 50, 100 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_beaded_door",
- "name": "beaded curtain",
- "description": "This beaded curtain could be pulled aside.",
- "symbol": "+",
- "color": "pink",
- "looks_like": "f_canvas_door",
- "move_cost_mod": 6,
- "coverage": 90,
- "required_str": -1,
- "flags": [ "NOITEM", "DOOR", "PERMEABLE", "FLAMMABLE_ASH", "MOUNTABLE" ],
- "open": "f_beaded_door_o",
- "deconstruct": {
- "items": [ { "item": "stick_long", "count": 1 }, { "item": "string_36", "count": 20 }, { "item": "wooden_bead", "count": 2000 } ]
- },
- "bash": {
- "str_min": 1,
- "str_max": 1,
- "sound": "clickity clack...clack...clack",
- "sound_fail": "clickity clack...clack",
- "sound_vol": 15,
- "items": [
- { "item": "string_36", "count": [ 3, 15 ] },
- { "item": "stick_long", "count": 1 },
- { "item": "wooden_bead", "count": [ 200, 500 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_beaded_door_o",
- "name": "open beaded curtain",
- "description": "This beaded curtain has been pulled aside.",
- "symbol": ".",
- "color": "pink",
- "looks_like": "f_canvas_door_o",
- "move_cost_mod": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "FLAT" ],
- "close": "f_beaded_door",
- "deconstruct": {
- "items": [ { "item": "stick_long", "count": 1 }, { "item": "string_36", "count": 20 }, { "item": "wooden_bead", "count": 2000 } ]
- },
- "bash": {
- "str_min": 1,
- "str_max": 1,
- "sound": "clickity clack...clack...clack!",
- "sound_fail": "clickity clack...clack",
- "sound_vol": 15,
- "items": [
- { "item": "string_36", "count": [ 3, 15 ] },
- { "item": "stick_long", "count": 1 },
- { "item": "wooden_bead", "count": [ 200, 500 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_filing_cabinet",
- "name": "filing cabinet",
- "looks_like": "f_rack",
- "description": "A set of drawers in a sturdy metal cabinet, used to hold files. It can be locked to protect important information. If you're lucky, there are often keys nearby.",
- "symbol": "}",
- "color": "dark_gray",
- "move_cost_mod": 2,
- "coverage": 70,
- "required_str": 7,
- "flags": [ "PLACE_ITEM", "TRANSPARENT", "CONTAINER", "BLOCKSDOOR", "MOUNTABLE" ],
- "deconstruct": {
- "items": [
- { "item": "sheet_metal", "count": [ 2, 6 ] },
- { "item": "scrap", "count": [ 2, 6 ] },
- { "item": "lock", "count": [ 0, 1 ] }
- ]
- },
- "max_volume": 800,
- "bash": {
- "str_min": 8,
- "str_max": 30,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [ { "item": "scrap", "count": [ 0, 6 ] }, { "item": "sheet_metal", "count": [ 0, 4 ] } ]
- }
- },
- {
- "type": "furniture",
- "id": "f_wardrobe",
- "name": "wardrobe",
- "looks_like": "f_dresser",
- "description": "A tall piece of furniture - basically a freestanding closet.",
- "symbol": "{",
- "color": "i_brown",
- "move_cost_mod": -1,
- "coverage": 85,
- "required_str": 9,
- "flags": [ "CONTAINER", "FLAMMABLE", "PLACE_ITEM", "ORGANIC", "BLOCKSDOOR", "MOUNTABLE" ],
- "deconstruct": {
- "items": [ { "item": "2x4", "count": 20 }, { "item": "nail", "charges": [ 16, 24 ] }, { "item": "pipe", "count": 2 } ]
- },
- "max_volume": 2000,
- "bash": {
- "str_min": 12,
- "str_max": 40,
- "sound": "smash!",
- "sound_fail": "whump.",
- "items": [
- { "item": "2x4", "count": [ 8, 12 ] },
- { "item": "nail", "charges": [ 8, 14 ] },
- { "item": "splinter", "count": [ 4, 10 ] },
- { "item": "pipe", "count": [ 0, 1 ] },
- { "item": "scrap", "count": [ 2, 5 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_robotic_assembler",
- "name": "robotic assembler",
- "looks_like": "f_robotic_arm",
- "description": "A durable and versatile robotic arm with a tool fitted to the end, for working on an assembly line.",
- "symbol": "3",
- "color": "magenta_cyan",
- "move_cost_mod": -1,
- "coverage": 35,
- "required_str": -1,
- "bash": {
- "str_min": 40,
- "str_max": 150,
- "sound_fail": "clang!",
- "items": [
- { "item": "processor", "count": [ 1, 2 ] },
- { "item": "RAM", "count": [ 4, 8 ] },
- { "item": "cable", "charges": [ 4, 6 ] },
- { "item": "small_lcd_screen", "count": [ 1, 2 ] },
- { "item": "e_scrap", "count": [ 5, 8 ] },
- { "item": "circuit", "count": [ 3, 5 ] },
- { "item": "power_supply", "count": [ 1, 2 ] },
- { "item": "amplifier", "count": [ 1, 2 ] },
- { "item": "plastic_chunk", "count": [ 10, 12 ] },
- { "item": "scrap", "count": [ 6, 8 ] }
- ]
- },
- "deconstruct": {
- "items": [
- { "item": "processor", "count": [ 2, 4 ] },
- { "item": "RAM", "count": [ 8, 16 ] },
- { "item": "cable", "charges": [ 8, 12 ] },
- { "item": "small_lcd_screen", "count": [ 2, 4 ] },
- { "item": "e_scrap", "count": [ 10, 16 ] },
- { "item": "circuit", "count": [ 6, 10 ] },
- { "item": "power_supply", "count": [ 2, 4 ] },
- { "item": "amplifier", "count": [ 2, 4 ] },
- { "item": "plastic_chunk", "count": [ 10, 12 ] },
- { "item": "scrap", "count": [ 6, 8 ] },
- { "item": "motor_small", "count": [ 0, 1 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_chemical_mixer",
- "description": "When chemicals need to be mixed in large quantities at just the right combinations and temperatures, this is the tool for the job.",
- "name": "chemical mixer",
- "symbol": "0",
- "color": "red_green",
- "move_cost_mod": -1,
- "coverage": 40,
- "required_str": 16,
- "bash": {
- "str_min": 40,
- "str_max": 150,
- "sound_fail": "clang!",
- "items": [
- { "item": "cable", "charges": [ 0, 4 ] },
- { "item": "scrap", "count": [ 8, 12 ] },
- { "item": "steel_chunk", "count": [ 2, 4 ] },
- { "item": "metal_tank_little", "count": [ 0, 2 ] },
- { "item": "jerrycan", "count": [ 0, 2 ] },
- { "item": "metal_tank", "count": [ 0, 2 ] }
- ]
- },
- "deconstruct": {
- "items": [
- { "item": "cable", "charges": [ 4, 8 ] },
- { "item": "steel_chunk", "count": [ 4, 6 ] },
- { "item": "scrap", "count": [ 12, 16 ] },
- { "item": "metal_tank_little", "count": [ 2, 4 ] },
- { "item": "jerrycan", "count": [ 2, 4 ] },
- { "item": "metal_tank", "count": [ 2, 4 ] },
- { "item": "motor_small", "count": 1 }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_floor_lamp",
- "name": "floor lamp",
- "symbol": "T",
- "looks_like": "f_rack_coat",
- "description": "A tall standing lamp, meant to plug into a wall and light up a room.",
- "color": "light_gray",
- "move_cost_mod": 2,
- "required_str": 1,
- "flags": [ "BLOCKSDOOR", "PLACE_ITEM", "EASY_DECONSTRUCT" ],
- "deconstruct": {
- "items": [
- { "item": "cable", "charges": [ 1, 2 ] },
- { "item": "amplifier", "count": [ 1, 4 ] },
- { "item": "light_bulb", "count": [ 1, 4 ] },
- { "item": "steel_lump", "count": 1 },
- { "item": "pipe", "count": 1 }
- ]
- },
- "bash": {
- "str_min": 12,
- "str_max": 40,
- "sound": "metal screeching!",
- "sound_fail": "bonk!",
- "items": [
- { "item": "scrap", "count": [ 1, 2 ] },
- { "item": "cable", "charges": [ 0, 1 ] },
- { "item": "e_scrap", "count": [ 0, 1 ] },
- { "item": "glass_shard", "count": [ 0, 8 ] },
- { "item": "pipe", "count": [ 0, 1 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_shredder",
- "name": "document shredder",
- "description": "It's not all about hiding government secrets, sometimes you just want to stop identity theft.",
- "symbol": "H",
- "bgcolor": "white",
- "move_cost_mod": 5,
- "required_str": 6,
- "looks_like": "f_filing_cabinet",
- "flags": [ "TRANSPARENT", "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR" ],
- "deconstruct": {
- "items": [
- { "item": "scrap", "count": [ 2, 6 ] },
- { "item": "steel_chunk", "count": [ 1, 3 ] },
- { "item": "steel_lump", "count": [ 1, 3 ] },
- { "item": "plastic_chunk", "count": [ 1, 3 ] },
- { "item": "sheet_metal_small", "count": [ 0, 4 ] },
- { "item": "sheet_metal", "count": [ 2, 4 ] },
- { "item": "pipe", "count": [ 1, 4 ] },
- { "item": "cable", "charges": [ 1, 15 ] },
- { "item": "motor", "count": 1 },
- { "item": "solder_wire", "charges": [ 1, 15 ] }
- ]
- },
- "bash": {
- "str_min": 18,
- "str_max": 50,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 2, 7 ] },
- { "item": "steel_chunk", "count": [ 0, 3 ] },
- { "item": "sheet_metal_small", "count": [ 8, 12 ] },
- { "item": "sheet_metal", "count": [ 1, 2 ] },
- { "item": "pipe", "count": [ 1, 2 ] },
- { "item": "cable", "charges": [ 1, 15 ] },
- { "item": "e_scrap", "count": [ 5, 10 ] },
- { "item": "plastic_chunk", "count": [ 0, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_server",
- "looks_like": "f_utility_shelf",
- "name": "server stack",
- "description": "This is a big pile of computers. They're all turned off.",
- "symbol": ":",
- "color": "blue_white",
- "move_cost_mod": -1,
- "coverage": 90,
- "required_str": 8,
- "flags": [ "BLOCKSDOOR" ],
- "deconstruct": {
- "items": [
- { "item": "sheet_metal_small", "count": [ 4, 6 ] },
- { "item": "plastic_chunk", "count": [ 2, 12 ] },
- { "item": "pipe", "count": [ 4, 8 ] },
- { "item": "laptop", "count": [ 2, 4 ] },
- { "item": "cable", "charges": [ 5, 10 ] }
- ]
- },
- "bash": {
- "str_min": 16,
- "str_max": 40,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "scrap", "count": [ 4, 8 ] },
- { "item": "plastic_chunk", "count": [ 1, 6 ] },
- { "item": "sheet_metal_small", "count": [ 1, 4 ] },
- { "item": "pipe", "count": 1 },
- { "item": "e_scrap", "count": [ 20, 50 ] },
- { "item": "cable", "charges": [ 2, 8 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_satellite",
- "name": "large satellite dish",
- "looks_like": "t_radio_tower",
- "description": "Somewhere up there, there are still satellites, orbiting and doing their thing, sending signals down to an Earth that is no longer listening.",
- "symbol": ")",
- "color": "white_green",
- "move_cost_mod": -1,
- "coverage": 70,
- "required_str": -1,
- "deconstruct": {
- "items": [
- { "item": "pipe", "count": [ 6, 12 ] },
- { "item": "rebar", "count": [ 6, 12 ] },
- { "item": "scrap", "count": [ 2, 6 ] },
- { "item": "steel_chunk", "count": [ 1, 3 ] },
- { "item": "steel_lump", "count": [ 4, 6 ] },
- { "item": "sheet_metal_small", "count": [ 0, 4 ] },
- { "item": "sheet_metal", "count": [ 8, 10 ] },
- { "item": "cable", "charges": [ 1, 15 ] },
- { "item": "motor", "count": 1 }
- ]
- },
- "bash": {
- "str_min": 18,
- "str_max": 50,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "pipe", "count": [ 1, 10 ] },
- { "item": "rebar", "count": [ 1, 10 ] },
- { "item": "scrap", "count": [ 6, 16 ] },
- { "item": "steel_chunk", "count": [ 1, 4 ] },
- { "item": "steel_lump", "count": [ 0, 6 ] },
- { "item": "sheet_metal_small", "count": [ 8, 12 ] },
- { "item": "sheet_metal", "count": [ 1, 2 ] },
- { "item": "cable", "charges": [ 1, 15 ] },
- { "item": "scrap_copper", "count": [ 0, 2 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_workbench",
- "name": "workbench",
- "description": "A sturdy workbench built out of metal. It is perfect for crafting large and heavy things.",
- "symbol": "#",
- "color": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "looks_like": "f_lab_bench",
- "flags": [ "TRANSPARENT", "PLACE_ITEM", "MOUNTABLE", "FLAT_SURF" ],
- "deconstruct": {
- "items": [
- { "item": "pipe", "count": [ 6, 8 ] },
- { "item": "sheet_metal", "count": 2 },
- { "item": "sheet_metal_small", "count": [ 2, 4 ] }
- ]
- },
- "max_volume": 4000,
- "bash": {
- "str_min": 35,
- "str_max": 80,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [
- { "item": "pipe", "count": [ 4, 6 ] },
- { "item": "sheet_metal", "count": [ 0, 1 ] },
- { "item": "sheet_metal_small", "count": [ 12, 24 ] },
- { "item": "steel_chunk", "count": [ 4, 8 ] },
- { "item": "scrap", "count": [ 12, 24 ] }
- ]
- },
- "examine_action": "workbench",
- "workbench": { "multiplier": 1.2, "mass": 500000, "volume": "200L" }
- },
- {
- "id": "f_hanging_meathook",
- "type": "furniture",
- "name": "hanging meathook",
- "description": "A hefty hook suspended from a chain for stringing up corpses.",
- "symbol": "g",
- "required_str": -1,
- "move_cost_mod": 2,
- "color": "light_gray",
- "deconstruct": { "items": [ { "item": "grip_hook", "count": 1 }, { "item": "chain", "count": 1 } ] },
- "flags": [ "TRANSPARENT", "BUTCHER_EQ" ]
- },
- {
- "type": "furniture",
- "id": "f_fake_bench_hands",
- "name": "fake workbench hands",
- "description": "This fake workbench holds the stats for working on a wielded item.",
- "symbol": "#",
- "color": "red",
- "move_cost_mod": 2,
- "required_str": -1,
- "workbench": { "multiplier": 1.0, "mass": 5000, "volume": "10L" }
- },
- {
- "type": "furniture",
- "//": "This furniture object also gets used as a fake workbench whenever a player crafts on the ground anywhere else.",
- "id": "f_ground_crafting_spot",
- "name": "ground crafting spot",
- "looks_like": "tr_firewood_source",
- "description": "A cleared spot on the ground for crafting. Slower than using a workbench or holding a project in your hands, but readily available.",
- "symbol": "x",
- "color": "white",
- "move_cost_mod": 2,
- "required_str": 0,
- "deconstruct": { "items": [ ] },
- "bash": { "str_min": 0, "str_max": 0, "items": [ ] },
- "flags": [ "PLACE_ITEM", "TRANSPARENT", "EASY_DECONSTRUCT" ],
- "examine_action": "workbench",
- "workbench": { "multiplier": 0.7, "mass": 1000000, "volume": "1000L" }
- },
- {
- "id": "f_tatami",
- "type": "furniture",
- "name": "tatami mat",
- "description": "A tatami is a type of mat used as a flooring material in traditional Japanese-style rooms.",
- "symbol": "#",
- "color": [ "brown" ],
- "move_cost_mod": 0,
- "comfort": 2,
- "floor_bedding_warmth": -1500,
- "max_volume": 4000,
- "required_str": 7,
- "bash": {
- "str_min": 8,
- "str_max": 30,
- "sound": "crunch.",
- "sound_fail": "whump.",
- "items": [
- { "item": "straw_pile", "count": [ 5, 8 ] },
- { "item": "rag", "count": [ 2, 4 ] },
- { "item": "string_36", "count": [ 1, 2 ] }
- ]
- },
- "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC" ]
- },
- {
- "id": "f_bitts",
- "type": "furniture",
- "name": "bitts",
- "description": "Paired vertical iron posts mounted on a wharf, pier or quay. They are used to secure mooring lines, ropes, hawsers, or cables.",
- "symbol": "B",
- "color": [ "light_gray" ],
- "move_cost_mod": 2,
- "coverage": 30,
- "required_str": 0,
- "bash": {
- "str_min": 80,
- "str_max": 200,
- "sound": "metal screeching!",
- "sound_fail": "clang!",
- "items": [ { "item": "steel_chunk", "count": [ 5, 10 ] } ]
- },
- "flags": [ "TRANSPARENT", "MOUNTABLE", "SHORT" ]
- },
- {
- "type": "furniture",
- "id": "f_speaker_cabinet",
- "name": "speaker cabinet",
- "description": "A cabinet loaded with 12-inch speakers, intended to help make various things loud. It can't serve its original purpose these days, but it could be disassembled for various electronic parts.",
- "symbol": "7",
- "color": "blue",
- "move_cost_mod": -1,
- "coverage": 50,
- "max_volume": 15,
- "required_str": 7,
- "flags": [ "TRANSPARENT", "FLAMMABLE", "PLACE_ITEM" ],
- "deconstruct": {
- "items": [
- { "item": "scrap", "count": [ 4, 6 ] },
- { "item": "e_scrap", "count": [ 1, 2 ] },
- { "item": "plastic_chunk", "count": [ 0, 2 ] },
- { "item": "wood_panel", "count": 1 },
- { "item": "2x4", "count": 4 },
- { "item": "nail", "charges": [ 8, 10 ] },
- { "item": "cable", "charges": [ 3, 4 ] }
- ]
- },
- "bash": {
- "str_min": 8,
- "str_max": 20,
- "sound": "smash!",
- "sound_fail": "whump!",
- "items": [
- { "item": "splinter", "count": [ 0, 6 ] },
- { "item": "scrap", "count": [ 0, 3 ] },
- { "item": "2x4", "count": [ 1, 2 ] },
- { "item": "nail", "charges": [ 2, 6 ] },
- { "item": "cable", "charges": [ 1, 3 ] },
- { "item": "e_scrap", "prob": 25 },
- { "item": "plastic_chunk", "count": [ 0, 1 ] }
- ]
- }
- },
- {
- "type": "furniture",
- "id": "f_no_item",
- "//": "This is used in a hack to clear furniture with the keg iexamine of all items execept the stored liquid before usage.",
- "name": "seeing this is a bug",
- "description": "Seeing this is a bug. If seen, please report and destroy.",
- "symbol": "#",
- "color": "black",
- "move_cost_mod": 2,
- "required_str": -1,
- "flags": [ "NOITEM" ]
- },
- {
- "type": "furniture",
- "id": "f_swamp_gas",
- "name": "swamp gas",
- "description": "This is a pool of murkey water, it occassionaly bubbles, releasing a mildly toxic gas.",
- "looks_like": "t_water_sh",
- "symbol": "~",
- "color": "blue",
- "move_cost_mod": 1,
- "coverage": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "EMITTER" ],
- "emissions": [ "emit_swamp_gas_leak" ],
- "//": "a very mild toxicant, inducing nausea.",
- "bash": { "str_min": 30, "str_max": 60, "sound": "splash!", "sound_fail": "splash!", "furn_set": "f_swamp_gas" }
- },
- {
- "type": "furniture",
- "id": "f_fog",
- "name": "fog",
- "description": "This is a misty cloud of fog.",
- "looks_like": "t_moss",
- "symbol": "^",
- "color": "light_gray",
- "move_cost_mod": 2,
- "coverage": 0,
- "required_str": -1,
- "flags": [ "TRANSPARENT", "EMITTER" ],
- "emissions": [ "emit_fog_plume" ]
- }
-]
From a6aef181d46bdb2e8e2103614bd10a33660e9eb6 Mon Sep 17 00:00:00 2001
From: Curtis Merrill
Date: Wed, 16 Oct 2019 02:53:29 -0400
Subject: [PATCH 73/86] change crossed_threshold() scope and
test_crossing_threshold() parameter to Character (#34761)
* change scope of crossed_threshold()
* moved crossed_threshold to character.cpp
* change parameter of test_crossing_threshold to Character
* change "p" to "guy"
---
src/character.cpp | 10 ++++++++++
src/character.h | 4 ++++
src/mutation.cpp | 46 +++++++++++++++++++++++-----------------------
src/mutation.h | 2 +-
src/player.cpp | 10 ----------
src/player.h | 4 ----
6 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/character.cpp b/src/character.cpp
index ad1a74db5982c..7959ac5b22a6b 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -4690,6 +4690,16 @@ void Character::on_hurt( Creature *source, bool disturb /*= true*/ )
}
}
+bool Character::crossed_threshold() const
+{
+ for( const std::pair &mut : my_mutations ) {
+ if( mut.first->threshold ) {
+ return true;
+ }
+ }
+ return false;
+}
+
void Character::spores()
{
fungal_effects fe( *g, g->m );
diff --git a/src/character.h b/src/character.h
index 3d84a9988ba58..f6f43c0499841 100644
--- a/src/character.h
+++ b/src/character.h
@@ -999,6 +999,10 @@ class Character : public Creature, public visitable
*/
void add_traits();
void add_traits( points_left &points );
+ /** Returns true if the player has crossed a mutation threshold
+ * Player can only cross one mutation threshold.
+ */
+ bool crossed_threshold() const;
// --------------- Values ---------------
std::string name;
diff --git a/src/mutation.cpp b/src/mutation.cpp
index a0bd2835ddb88..e44474a7505ac 100644
--- a/src/mutation.cpp
+++ b/src/mutation.cpp
@@ -1339,10 +1339,10 @@ mutagen_attempt mutagen_common_checks( player &p, const item &it, bool strong,
return mutagen_attempt( true, 0 );
}
-void test_crossing_threshold( player &p, const mutation_category_trait &m_category )
+void test_crossing_threshold( Character &guy, const mutation_category_trait &m_category )
{
// Threshold-check. You only get to cross once!
- if( p.crossed_threshold() ) {
+ if( guy.crossed_threshold() ) {
return;
}
@@ -1355,11 +1355,11 @@ void test_crossing_threshold( player &p, const mutation_category_trait &m_catego
std::string mutation_category = m_category.id;
int total = 0;
for( const auto &iter : mutation_category_trait::get_all() ) {
- total += p.mutation_category_level[ iter.first ];
+ total += guy.mutation_category_level[ iter.first ];
}
// Threshold-breaching
- const std::string &primary = p.get_highest_category();
- int breach_power = p.mutation_category_level[primary];
+ const std::string &primary = guy.get_highest_category();
+ int breach_power = guy.mutation_category_level[primary];
// Only if you were pushing for more in your primary category.
// You wanted to be more like it and less human.
// That said, you're required to have hit third-stage dreams first.
@@ -1374,33 +1374,33 @@ void test_crossing_threshold( player &p, const mutation_category_trait &m_catego
}
int breacher = breach_power + booster;
if( x_in_y( breacher, total ) ) {
- p.add_msg_if_player( m_good,
- _( "Something strains mightily for a moment... and then... you're... FREE!" ) );
- p.set_mutation( mutation_thresh );
- g->events().send( p.getID(), m_category.id );
+ guy.add_msg_if_player( m_good,
+ _( "Something strains mightily for a moment... and then... you're... FREE!" ) );
+ guy.set_mutation( mutation_thresh );
+ g->events().send( guy.getID(), m_category.id );
// Manually removing Carnivore, since it tends to creep in
// This is because carnivore is a prerequisite for the
// predator-style post-threshold mutations.
- if( mutation_category == "URSINE" && p.has_trait( trait_CARNIVORE ) ) {
- p.unset_mutation( trait_CARNIVORE );
- p.add_msg_if_player( _( "Your appetite for blood fades." ) );
+ if( mutation_category == "URSINE" && guy.has_trait( trait_CARNIVORE ) ) {
+ guy.unset_mutation( trait_CARNIVORE );
+ guy.add_msg_if_player( _( "Your appetite for blood fades." ) );
}
}
- } else if( p.has_trait( trait_NOPAIN ) ) {
+ } else if( guy.has_trait( trait_NOPAIN ) ) {
//~NOPAIN is a post-Threshold trait, so you shouldn't
//~legitimately have it and get here!
- p.add_msg_if_player( m_bad, _( "You feel extremely Bugged." ) );
+ guy.add_msg_if_player( m_bad, _( "You feel extremely Bugged." ) );
} else if( breach_power > 100 ) {
- p.add_msg_if_player( m_bad, _( "You stagger with a piercing headache!" ) );
- p.mod_pain_noresist( 8 );
- p.add_effect( effect_stunned, rng( 3_turns, 5_turns ) );
+ guy.add_msg_if_player( m_bad, _( "You stagger with a piercing headache!" ) );
+ guy.mod_pain_noresist( 8 );
+ guy.add_effect( effect_stunned, rng( 3_turns, 5_turns ) );
} else if( breach_power > 80 ) {
- p.add_msg_if_player( m_bad,
- _( "Your head throbs with memories of your life, before all this..." ) );
- p.mod_pain_noresist( 6 );
- p.add_effect( effect_stunned, rng( 2_turns, 4_turns ) );
+ guy.add_msg_if_player( m_bad,
+ _( "Your head throbs with memories of your life, before all this..." ) );
+ guy.mod_pain_noresist( 6 );
+ guy.add_effect( effect_stunned, rng( 2_turns, 4_turns ) );
} else if( breach_power > 60 ) {
- p.add_msg_if_player( m_bad, _( "Images of your past life flash before you." ) );
- p.add_effect( effect_stunned, rng( 2_turns, 3_turns ) );
+ guy.add_msg_if_player( m_bad, _( "Images of your past life flash before you." ) );
+ guy.add_effect( effect_stunned, rng( 2_turns, 3_turns ) );
}
}
diff --git a/src/mutation.h b/src/mutation.h
index 465fcbecfc01c..a38af7610bedc 100644
--- a/src/mutation.h
+++ b/src/mutation.h
@@ -469,6 +469,6 @@ struct mutagen_attempt {
mutagen_attempt mutagen_common_checks( player &p, const item &it, bool strong,
mutagen_technique technique );
-void test_crossing_threshold( player &p, const mutation_category_trait &m_category );
+void test_crossing_threshold( Character &guy, const mutation_category_trait &m_category );
#endif
diff --git a/src/player.cpp b/src/player.cpp
index 40f121f07e7ac..0a6d4a78b5df4 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -2012,16 +2012,6 @@ bool player::has_same_type_trait( const trait_id &flag ) const
return false;
}
-bool player::crossed_threshold() const
-{
- for( auto &mut : my_mutations ) {
- if( mut.first->threshold ) {
- return true;
- }
- }
- return false;
-}
-
bool player::purifiable( const trait_id &flag ) const
{
return flag->purifiable;
diff --git a/src/player.h b/src/player.h
index 1f0747a8e742f..b02251504fda3 100644
--- a/src/player.h
+++ b/src/player.h
@@ -296,10 +296,6 @@ class player : public Character
bool has_higher_trait( const trait_id &flag ) const;
/** Returns true if the player has a trait that shares a type with the entered trait */
bool has_same_type_trait( const trait_id &flag ) const;
- /** Returns true if the player has crossed a mutation threshold
- * Player can only cross one mutation threshold.
- */
- bool crossed_threshold() const;
/** Returns true if the entered trait may be purified away
* Defaults to true
*/
From 3f7b1f33590f2e4e006cd2be242b03535f6a3637 Mon Sep 17 00:00:00 2001
From: Isaac Freund
Date: Wed, 16 Oct 2019 08:54:11 +0200
Subject: [PATCH 74/86] Migrate move mode and related code from player (#34762)
* Migrate move mode and related code from player
- Hoist the move_mode variable up to character since NPCs should crouch
and run someday
- Drop UI-related code down to avatar
- Serialize/deserialize move_mode in the character functions
- Tweak related code to accomadate the changes
* Migrate get_overlay_ids() to Character
This fixes compilation of SDL builds
---
src/action.cpp | 4 +-
src/avatar.cpp | 152 ++++++++++++++++++
src/avatar.h | 9 ++
src/avatar_action.cpp | 6 +-
src/cata_tiles.cpp | 20 +--
src/cata_tiles.h | 3 +-
src/character.cpp | 274 +++++++++++++++++++++++++++++++++
src/character.h | 48 ++++++
src/creature.cpp | 24 +--
src/creature.h | 2 +-
src/game.cpp | 20 +--
src/handle_action.cpp | 8 +-
src/iuse.cpp | 4 +-
src/map.cpp | 2 +-
src/monexamine.cpp | 2 +-
src/monster.h | 2 +-
src/npc.h | 2 +
src/npcmove.cpp | 5 +
src/panels.cpp | 10 +-
src/player.cpp | 347 ++----------------------------------------
src/player.h | 50 +-----
src/savegame_json.cpp | 21 +--
src/sdltiles.cpp | 4 +-
src/trapfunc.cpp | 26 ++--
src/vehicle.cpp | 4 +-
25 files changed, 585 insertions(+), 464 deletions(-)
diff --git a/src/action.cpp b/src/action.cpp
index 7d7620bba5926..f3ae331e3a3b0 100644
--- a/src/action.cpp
+++ b/src/action.cpp
@@ -687,11 +687,11 @@ action_id handle_action_menu()
}
// If we're already running, make it simple to toggle running to off.
- if( g->u.movement_mode_is( PMM_RUN ) ) {
+ if( g->u.movement_mode_is( CMM_RUN ) ) {
action_weightings[ACTION_TOGGLE_RUN] = 300;
}
// If we're already crouching, make it simple to toggle crouching to off.
- if( g->u.movement_mode_is( PMM_CROUCH ) ) {
+ if( g->u.movement_mode_is( CMM_CROUCH ) ) {
action_weightings[ACTION_TOGGLE_CROUCH] = 300;
}
diff --git a/src/avatar.cpp b/src/avatar.cpp
index 78840c2e03117..7b5b73f606ac4 100644
--- a/src/avatar.cpp
+++ b/src/avatar.cpp
@@ -79,6 +79,7 @@ const efftype_id effect_sleep_deprived( "sleep_deprived" );
const efftype_id effect_slept_through_alarm( "slept_through_alarm" );
const efftype_id effect_stim( "stim" );
const efftype_id effect_stim_overdose( "stim_overdose" );
+const efftype_id effect_winded( "winded" );
static const bionic_id bio_eye_optic( "bio_eye_optic" );
static const bionic_id bio_memory( "bio_memory" );
@@ -1356,3 +1357,154 @@ faction *avatar::get_faction() const
{
return g->faction_manager_ptr->get( faction_id( "your_followers" ) );
}
+
+void avatar::set_movement_mode( character_movemode new_mode )
+{
+ switch( new_mode ) {
+ case CMM_WALK: {
+ if( is_mounted() ) {
+ if( mounted_creature->has_flag( MF_RIDEABLE_MECH ) ) {
+ add_msg( _( "You set your mech's leg power to a loping fast walk." ) );
+ } else {
+ add_msg( _( "You nudge your steed into a steady trot." ) );
+ }
+ } else {
+ add_msg( _( "You start walking." ) );
+ }
+ break;
+ }
+ case CMM_RUN: {
+ if( stamina > 0 && !has_effect( effect_winded ) ) {
+ if( is_hauling() ) {
+ stop_hauling();
+ }
+ if( is_mounted() ) {
+ if( mounted_creature->has_flag( MF_RIDEABLE_MECH ) ) {
+ add_msg( _( "You set the power of your mech's leg servos to maximum." ) );
+ } else {
+ add_msg( _( "You spur your steed into a gallop." ) );
+ }
+ } else {
+ add_msg( _( "You start running." ) );
+ }
+ } else {
+ if( is_mounted() ) {
+ // mounts dont currently have stamina, but may do in future.
+ add_msg( m_bad, _( "Your steed is too tired to go faster." ) );
+ } else {
+ add_msg( m_bad, _( "You're too tired to run." ) );
+ }
+ }
+ break;
+ }
+ case CMM_CROUCH: {
+ if( is_mounted() ) {
+ if( mounted_creature->has_flag( MF_RIDEABLE_MECH ) ) {
+ add_msg( _( "You reduce the power of your mech's leg servos to minimum." ) );
+ } else {
+ add_msg( _( "You slow your steed to a walk." ) );
+ }
+ } else {
+ add_msg( _( "You start crouching." ) );
+ }
+ break;
+ }
+ default: {
+ return;
+ }
+ }
+ move_mode = new_mode;
+}
+
+void avatar::toggle_run_mode()
+{
+ if( move_mode == CMM_RUN ) {
+ set_movement_mode( CMM_WALK );
+ } else {
+ set_movement_mode( CMM_RUN );
+ }
+}
+
+void avatar::toggle_crouch_mode()
+{
+ if( move_mode == CMM_CROUCH ) {
+ set_movement_mode( CMM_WALK );
+ } else {
+ set_movement_mode( CMM_CROUCH );
+ }
+}
+
+void avatar::reset_move_mode()
+{
+ if( move_mode != CMM_WALK ) {
+ set_movement_mode( CMM_WALK );
+ }
+}
+
+void avatar::cycle_move_mode()
+{
+ unsigned char as_uchar = static_cast( move_mode );
+ as_uchar = ( as_uchar + 1 + CMM_COUNT ) % CMM_COUNT;
+ set_movement_mode( static_cast( as_uchar ) );
+}
+
+bool avatar::wield( item &target )
+{
+ if( is_wielding( target ) ) {
+ return true;
+ }
+
+ if( !can_wield( target ).success() ) {
+ return false;
+ }
+
+ if( !unwield() ) {
+ return false;
+ }
+ cached_info.erase( "weapon_value" );
+ if( target.is_null() ) {
+ return true;
+ }
+
+ // Query whether to draw an item from a holster when attempting to wield the holster
+ if( target.get_use( "holster" ) && !target.contents.empty() ) {
+ //~ %1$s: weapon name, %2$s: holster name
+ if( query_yn( pgettext( "holster", "Draw %1$s from %2$s?" ), target.get_contained().tname(),
+ target.tname() ) ) {
+ invoke_item( &target );
+ return false;
+ }
+ }
+
+ // Wielding from inventory is relatively slow and does not improve with increasing weapon skill.
+ // Worn items (including guns with shoulder straps) are faster but still slower
+ // than a skilled player with a holster.
+ // There is an additional penalty when wielding items from the inventory whilst currently grabbed.
+
+ bool worn = is_worn( target );
+ int mv = item_handling_cost( target, true,
+ worn ? INVENTORY_HANDLING_PENALTY / 2 : INVENTORY_HANDLING_PENALTY );
+
+ if( worn ) {
+ target.on_takeoff( *this );
+ }
+
+ add_msg( m_debug, "wielding took %d moves", mv );
+ moves -= mv;
+
+ if( has_item( target ) ) {
+ weapon = i_rem( &target );
+ } else {
+ weapon = target;
+ }
+
+ last_item = weapon.typeId();
+ recoil = MAX_RECOIL;
+
+ weapon.on_wield( *this, mv );
+
+ inv.update_invlet( weapon );
+ inv.update_cache_with_item( weapon );
+
+ return true;
+}
diff --git a/src/avatar.h b/src/avatar.h
index 462bd1a7ffb1d..bf0e57f143fbf 100644
--- a/src/avatar.h
+++ b/src/avatar.h
@@ -163,6 +163,15 @@ class avatar : public player
faction *get_faction() const override;
+ void set_movement_mode( character_movemode mode ) override;
+
+ void cycle_move_mode(); // Cycles to the next move mode.
+ void reset_move_mode(); // Resets to walking.
+ void toggle_run_mode(); // Toggles running on/off.
+ void toggle_crouch_mode(); // Toggles crouching on/off.
+
+ bool wield( item &target ) override;
+
private:
map_memory player_map_memory;
bool show_map_memory;
diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp
index 12d350ead9328..0de397d122510 100644
--- a/src/avatar_action.cpp
+++ b/src/avatar_action.cpp
@@ -113,9 +113,9 @@ bool avatar_action::move( avatar &you, map &m, int dx, int dy, int dz )
}
// by this point we're either walking, running, crouching, or attacking, so update the activity level to match
- if( you.movement_mode_is( PMM_WALK ) ) {
+ if( you.movement_mode_is( CMM_WALK ) ) {
you.increase_activity_level( LIGHT_EXERCISE );
- } else if( you.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( you.movement_mode_is( CMM_CROUCH ) ) {
you.increase_activity_level( MODERATE_EXERCISE );
} else {
you.increase_activity_level( ACTIVE_EXERCISE );
@@ -352,7 +352,7 @@ bool avatar_action::move( avatar &you, map &m, int dx, int dy, int dz )
// open it if we are walking
// vault over it if we are running
if( m.passable_ter_furn( dest_loc )
- && you.movement_mode_is( PMM_WALK )
+ && you.movement_mode_is( CMM_WALK )
&& m.open_door( dest_loc, !m.is_outside( you.pos() ) ) ) {
you.moves -= 100;
// if auto-move is on, continue moving next turn
diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp
index f4d020b4132ca..567819258f732 100644
--- a/src/cata_tiles.cpp
+++ b/src/cata_tiles.cpp
@@ -2798,36 +2798,36 @@ bool cata_tiles::draw_zombie_revival_indicators( const tripoint &pos, const lit_
return false;
}
-void cata_tiles::draw_entity_with_overlays( const player &pl, const tripoint &p, lit_level ll,
+void cata_tiles::draw_entity_with_overlays( const Character &ch, const tripoint &p, lit_level ll,
int &height_3d )
{
std::string ent_name;
- if( pl.is_npc() ) {
- ent_name = pl.male ? "npc_male" : "npc_female";
+ if( ch.is_npc() ) {
+ ent_name = ch.male ? "npc_male" : "npc_female";
} else {
- ent_name = pl.male ? "player_male" : "player_female";
+ ent_name = ch.male ? "player_male" : "player_female";
}
// first draw the character itself(i guess this means a tileset that
// takes this seriously needs a naked sprite)
int prev_height_3d = height_3d;
// depending on the toggle flip sprite left or right
- if( pl.facing == FD_RIGHT ) {
+ if( ch.facing == FD_RIGHT ) {
draw_from_id_string( ent_name, C_NONE, "", p, corner, 0, ll, false, height_3d );
- } else if( pl.facing == FD_LEFT ) {
+ } else if( ch.facing == FD_LEFT ) {
draw_from_id_string( ent_name, C_NONE, "", p, corner, 4, ll, false, height_3d );
}
// next up, draw all the overlays
- std::vector overlays = pl.get_overlay_ids();
+ std::vector overlays = ch.get_overlay_ids();
for( const std::string &overlay : overlays ) {
std::string draw_id = overlay;
- if( find_overlay_looks_like( pl.male, overlay, draw_id ) ) {
+ if( find_overlay_looks_like( ch.male, overlay, draw_id ) ) {
int overlay_height_3d = prev_height_3d;
- if( pl.facing == FD_RIGHT ) {
+ if( ch.facing == FD_RIGHT ) {
draw_from_id_string( draw_id, C_NONE, "", p, corner, /*rota:*/ 0, ll, false, overlay_height_3d );
- } else if( pl.facing == FD_LEFT ) {
+ } else if( ch.facing == FD_LEFT ) {
draw_from_id_string( draw_id, C_NONE, "", p, corner, /*rota:*/ 4, ll, false, overlay_height_3d );
}
// the tallest height-having overlay is the one that counts
diff --git a/src/cata_tiles.h b/src/cata_tiles.h
index 08ea37cfbddef..07a258ff76f68 100644
--- a/src/cata_tiles.h
+++ b/src/cata_tiles.h
@@ -359,7 +359,8 @@ class cata_tiles
const bool ( &invisible )[5] );
bool draw_zombie_revival_indicators( const tripoint &pos, lit_level ll, int &height_3d,
const bool ( &invisible )[5] );
- void draw_entity_with_overlays( const player &pl, const tripoint &p, lit_level ll, int &height_3d );
+ void draw_entity_with_overlays( const Character &ch, const tripoint &p, lit_level ll,
+ int &height_3d );
bool draw_item_highlight( const tripoint &pos );
diff --git a/src/character.cpp b/src/character.cpp
index 7959ac5b22a6b..120ac266590d8 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -23,6 +23,7 @@
#include "game.h"
#include "game_constants.h"
#include "itype.h"
+#include "npc.h"
#include "material.h"
#include "map.h"
#include "map_iterator.h"
@@ -35,6 +36,7 @@
#include "mutation.h"
#include "options.h"
#include "output.h"
+#include "overlay_ordering.h"
#include "pathfinding.h"
#include "player.h"
#include "skill.h"
@@ -71,6 +73,7 @@ const efftype_id effect_bleed( "bleed" );
const efftype_id effect_blind( "blind" );
const efftype_id effect_boomered( "boomered" );
const efftype_id effect_contacts( "contacts" );
+const efftype_id effect_controlled( "controlled" );
const efftype_id effect_crushed( "crushed" );
const efftype_id effect_darkness( "darkness" );
const efftype_id effect_disinfected( "disinfected" );
@@ -79,6 +82,7 @@ const efftype_id effect_drunk( "drunk" );
const efftype_id effect_foodpoison( "foodpoison" );
const efftype_id effect_grabbed( "grabbed" );
const efftype_id effect_grabbing( "grabbing" );
+const efftype_id effect_harnessed( "harnessed" );
const efftype_id effect_heavysnare( "heavysnare" );
const efftype_id effect_infected( "infected" );
const efftype_id effect_in_pit( "in_pit" );
@@ -91,9 +95,11 @@ const efftype_id effect_onfire( "onfire" );
const efftype_id effect_pkill1( "pkill1" );
const efftype_id effect_pkill2( "pkill2" );
const efftype_id effect_pkill3( "pkill3" );
+const efftype_id effect_ridden( "ridden" );
const efftype_id effect_riding( "riding" );
const efftype_id effect_sleep( "sleep" );
const efftype_id effect_slept_through_alarm( "slept_through_alarm" );
+const efftype_id effect_tied( "tied" );
const efftype_id effect_webbed( "webbed" );
const efftype_id effect_winded( "winded" );
@@ -105,6 +111,7 @@ static const trait_id trait_ADRENALINE( "ADRENALINE" );
static const trait_id trait_BIRD_EYE( "BIRD_EYE" );
static const trait_id trait_CEPH_EYES( "CEPH_EYES" );
static const trait_id trait_CEPH_VISION( "CEPH_VISION" );
+static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" );
static const trait_id trait_DEBUG_NIGHTVISION( "DEBUG_NIGHTVISION" );
static const trait_id trait_DEBUG_NODMG( "DEBUG_NODMG" );
static const trait_id trait_DISORGANIZED( "DISORGANIZED" );
@@ -176,6 +183,8 @@ Character::Character() :
name.clear();
*path_settings = pathfinding_settings{ 0, 1000, 1000, 0, true, false, true, false };
+
+ move_mode = CMM_WALK;
}
// *INDENT-ON*
@@ -431,11 +440,187 @@ double Character::aim_per_move( const item &gun, double recoil ) const
return std::min( aim_speed, recoil - limit );
}
+void Character::mount_creature( monster &z )
+{
+ tripoint pnt = z.pos();
+ std::shared_ptr mons = g->shared_from( z );
+ if( mons == nullptr ) {
+ add_msg( m_debug, "mount_creature(): monster not found in critter_tracker" );
+ return;
+ }
+ add_effect( effect_riding, 1_turns, num_bp, true );
+ z.add_effect( effect_ridden, 1_turns, num_bp, true );
+ if( z.has_effect( effect_tied ) ) {
+ z.remove_effect( effect_tied );
+ if( z.tied_item ) {
+ i_add( *z.tied_item );
+ z.tied_item = cata::nullopt;
+ }
+ }
+ z.mounted_player_id = getID();
+ if( z.has_effect( effect_harnessed ) ) {
+ z.remove_effect( effect_harnessed );
+ add_msg_if_player( m_info, _( "You remove the %s's harness." ), z.get_name() );
+ }
+ mounted_creature = mons;
+ mons->mounted_player = this;
+ if( is_avatar() ) {
+ if( g->u.is_hauling() ) {
+ g->u.stop_hauling();
+ }
+ if( g->u.get_grab_type() != OBJECT_NONE ) {
+ add_msg( m_warning, _( "You let go of the grabbed object." ) );
+ g->u.grab( OBJECT_NONE );
+ }
+ g->place_player( pnt );
+ } else {
+ npc &guy = dynamic_cast( *this );
+ guy.setpos( pnt );
+ }
+ z.facing = facing;
+ add_msg_if_player( m_good, _( "You climb on the %s." ), z.get_name() );
+ if( z.has_flag( MF_RIDEABLE_MECH ) ) {
+ if( !z.type->mech_weapon.empty() ) {
+ item mechwep = item( z.type->mech_weapon );
+ wield( mechwep );
+ }
+ add_msg_if_player( m_good, _( "You hear your %s whir to life." ), z.get_name() );
+ }
+ // some rideable mechs have night-vision
+ recalc_sight_limits();
+ mod_moves( -100 );
+}
+
bool Character::is_mounted() const
{
return has_effect( effect_riding ) && mounted_creature;
}
+void Character::forced_dismount()
+{
+ remove_effect( effect_riding );
+ bool mech = false;
+ if( mounted_creature ) {
+ auto mon = mounted_creature.get();
+ if( mon->has_flag( MF_RIDEABLE_MECH ) && !mon->type->mech_weapon.empty() ) {
+ mech = true;
+ remove_item( weapon );
+ }
+ mon->mounted_player_id = character_id();
+ mon->remove_effect( effect_ridden );
+ mon->add_effect( effect_controlled, 5_turns );
+ mounted_creature = nullptr;
+ mon->mounted_player = nullptr;
+ }
+ std::vector valid;
+ for( const tripoint &jk : g->m.points_in_radius( pos(), 1 ) ) {
+ if( g->is_empty( jk ) ) {
+ valid.push_back( jk );
+ }
+ }
+ if( !valid.empty() ) {
+ setpos( random_entry( valid ) );
+ if( mech ) {
+ add_msg_player_or_npc( m_bad, _( "You are ejected from your mech!" ),
+ _( " is ejected from their mech!" ) );
+ } else {
+ add_msg_player_or_npc( m_bad, _( "You fall off your mount!" ),
+ _( " falls off their mount!" ) );
+ }
+ const int dodge = get_dodge();
+ const int damage = std::max( 0, rng( 1, 20 ) - rng( dodge, dodge * 2 ) );
+ body_part hit = num_bp;
+ switch( rng( 1, 10 ) ) {
+ case 1:
+ if( one_in( 2 ) ) {
+ hit = bp_foot_l;
+ } else {
+ hit = bp_foot_r;
+ }
+ break;
+ case 2:
+ case 3:
+ case 4:
+ if( one_in( 2 ) ) {
+ hit = bp_leg_l;
+ } else {
+ hit = bp_leg_r;
+ }
+ break;
+ case 5:
+ case 6:
+ case 7:
+ if( one_in( 2 ) ) {
+ hit = bp_arm_l;
+ } else {
+ hit = bp_arm_r;
+ }
+ break;
+ case 8:
+ case 9:
+ hit = bp_torso;
+ break;
+ case 10:
+ hit = bp_head;
+ break;
+ }
+ if( damage > 0 ) {
+ add_msg_if_player( m_bad, _( "You hurt yourself!" ) );
+ deal_damage( nullptr, hit, damage_instance( DT_BASH, damage ) );
+ if( is_avatar() ) {
+ g->memorial().add(
+ pgettext( "memorial_male", "Fell off a mount." ),
+ pgettext( "memorial_female", "Fell off a mount." ) );
+ }
+ check_dead_state();
+ }
+ add_effect( effect_downed, 5_turns, num_bp, true );
+ } else {
+ add_msg( m_debug, "Forced_dismount could not find a square to deposit player" );
+ }
+ if( is_avatar() ) {
+ if( g->u.get_grab_type() != OBJECT_NONE ) {
+ add_msg( m_warning, _( "You let go of the grabbed object." ) );
+ g->u.grab( OBJECT_NONE );
+ }
+ set_movement_mode( CMM_WALK );
+ g->update_map( g->u );
+ }
+ moves -= 150;
+}
+
+void Character::dismount()
+{
+ if( !is_mounted() ) {
+ add_msg( m_debug, "dismount called when not riding" );
+ return;
+ }
+ if( const cata::optional pnt = choose_adjacent( _( "Dismount where?" ) ) ) {
+ if( !g->is_empty( *pnt ) ) {
+ add_msg( m_warning, _( "You cannot dismount there!" ) );
+ return;
+ }
+ remove_effect( effect_riding );
+ monster *critter = mounted_creature.get();
+ critter->mounted_player_id = character_id();
+ if( critter->has_flag( MF_RIDEABLE_MECH ) && !critter->type->mech_weapon.empty() ) {
+ remove_item( g->u.weapon );
+ }
+ if( is_avatar() && g->u.get_grab_type() != OBJECT_NONE ) {
+ add_msg( m_warning, _( "You let go of the grabbed object." ) );
+ g->u.grab( OBJECT_NONE );
+ }
+ critter->remove_effect( effect_ridden );
+ critter->add_effect( effect_controlled, 5_turns );
+ mounted_creature = nullptr;
+ critter->mounted_player = nullptr;
+ setpos( *pnt );
+ g->refresh_all();
+ mod_moves( -100 );
+ set_movement_mode( CMM_WALK );
+ }
+}
+
/** Returns true if the character has two functioning arms */
bool Character::has_two_arms() const
{
@@ -716,6 +901,11 @@ bool Character::move_effects( bool attacking )
return true;
}
+bool Character::movement_mode_is( const character_movemode mode ) const
+{
+ return move_mode == mode;
+}
+
void Character::add_effect( const efftype_id &eff_id, const time_duration dur, body_part bp,
bool permanent, int intensity, bool force, bool deferred )
{
@@ -1836,6 +2026,54 @@ bool Character::worn_with_flag( const std::string &flag, body_part bp ) const
} );
}
+std::vector Character::get_overlay_ids() const
+{
+ std::vector rval;
+ std::multimap mutation_sorting;
+ int order;
+ std::string overlay_id;
+
+ // first get effects
+ for( const auto &eff_pr : *effects ) {
+ rval.push_back( "effect_" + eff_pr.first.str() );
+ }
+
+ // then get mutations
+ for( const auto &mut : my_mutations ) {
+ overlay_id = ( mut.second.powered ? "active_" : "" ) + mut.first.str();
+ order = get_overlay_order_of_mutation( overlay_id );
+ mutation_sorting.insert( std::pair( order, overlay_id ) );
+ }
+
+ // then get bionics
+ for( const bionic &bio : *my_bionics ) {
+ overlay_id = ( bio.powered ? "active_" : "" ) + bio.id.str();
+ order = get_overlay_order_of_mutation( overlay_id );
+ mutation_sorting.insert( std::pair( order, overlay_id ) );
+ }
+
+ for( auto &mutorder : mutation_sorting ) {
+ rval.push_back( "mutation_" + mutorder.second );
+ }
+
+ // next clothing
+ // TODO: worry about correct order of clothing overlays
+ for( const item &worn_item : worn ) {
+ rval.push_back( "worn_" + worn_item.typeId() );
+ }
+
+ // last weapon
+ // TODO: might there be clothing that covers the weapon?
+ if( is_armed() ) {
+ rval.push_back( "wielded_" + weapon.typeId() );
+ }
+
+ if( move_mode != CMM_WALK ) {
+ rval.push_back( character_movemode_str[ move_mode ] );
+ }
+ return rval;
+}
+
const SkillLevelMap &Character::get_all_skills() const
{
return *_skills;
@@ -2197,6 +2435,16 @@ bool Character::is_wearing_active_power_armor() const
return false;
}
+bool Character::is_wearing_active_optcloak() const
+{
+ for( auto &w : worn ) {
+ if( w.active && w.has_flag( "ACTIVE_CLOAKING" ) ) {
+ return true;
+ }
+ }
+ return false;
+}
+
void layer_details::reset()
{
*this = layer_details();
@@ -3277,6 +3525,32 @@ bool Character::is_blind() const
has_active_bionic( bionic_id( "bio_blindfold" ) ) );
}
+bool Character::is_invisible() const
+{
+ static const bionic_id str_bio_cloak( "bio_cloak" ); // This function used in monster::plan_moves
+ static const bionic_id str_bio_night( "bio_night" );
+ return (
+ has_effect_with_flag( "EFFECT_INVISIBLE" ) ||
+ has_active_bionic( str_bio_cloak ) ||
+ has_active_bionic( str_bio_night ) ||
+ is_wearing_active_optcloak() ||
+ has_trait( trait_DEBUG_CLOAK ) ||
+ has_artifact_with( AEP_INVISIBLE )
+ );
+}
+
+int Character::visibility( bool, int ) const
+{
+ // 0-100 %
+ if( is_invisible() ) {
+ return 0;
+ }
+ // TODO:
+ // if ( dark_clothing() && light check ...
+ int stealth_modifier = std::floor( mutation_value( "stealth_modifier" ) );
+ return clamp( 100 - stealth_modifier, 40, 160 );
+}
+
bool Character::pour_into( item &container, item &liquid )
{
std::string err;
diff --git a/src/character.h b/src/character.h
index f6f43c0499841..c247a96c77a6b 100644
--- a/src/character.h
+++ b/src/character.h
@@ -74,6 +74,20 @@ enum vision_modes {
NUM_VISION_MODES
};
+enum character_movemode : unsigned char {
+ CMM_WALK = 0,
+ CMM_RUN = 1,
+ CMM_CROUCH = 2,
+ CMM_COUNT
+};
+
+static const std::array< std::string, CMM_COUNT > character_movemode_str = { {
+ "walk",
+ "run",
+ "crouch"
+ }
+};
+
enum fatigue_levels {
TIRED = 191,
DEAD_TIRED = 383,
@@ -354,16 +368,27 @@ class Character : public Creature, public visitable
bool is_wearing_power_armor( bool *hasHelmet = nullptr ) const;
/** Returns true if the character is wearing active power */
bool is_wearing_active_power_armor() const;
+ /** Returns true if the player is wearing an active optical cloak */
+ bool is_wearing_active_optcloak() const;
/** Returns true if the player isn't able to see */
bool is_blind() const;
+ bool is_invisible() const;
+ /** Checks is_invisible() as well as other factors */
+ int visibility( bool check_color = false, int stillness = 0 ) const;
+
/** Bitset of all the body parts covered only with items with `flag` (or nothing) */
body_part_set exclusive_flag_coverage( const std::string &flag ) const;
/** Processes effects which may prevent the Character from moving (bear traps, crushed, etc.).
* Returns false if movement is stopped. */
bool move_effects( bool attacking ) override;
+ /** Check against the character's current movement mode */
+ bool movement_mode_is( character_movemode mode ) const;
+
+ virtual void set_movement_mode( character_movemode mode ) = 0;
+
/** Performs any Character-specific modifications to the arguments before passing to Creature::add_effect(). */
void add_effect( const efftype_id &eff_id, time_duration dur, body_part bp = num_bp,
bool permanent = false,
@@ -456,7 +481,11 @@ class Character : public Creature, public visitable
/** Converts an hp_part to a body_part */
static body_part hp_to_bp( hp_part hpart );
+ bool can_mount( const monster &critter ) const;
+ void mount_creature( monster &z );
bool is_mounted() const;
+ void dismount();
+ void forced_dismount();
/** Returns true if the player has two functioning arms */
bool has_two_arms() const;
@@ -874,6 +903,13 @@ class Character : public Creature, public visitable
*/
bool is_armed() const;
+ /**
+ * Removes currently wielded item (if any) and replaces it with the target item.
+ * @param target replacement item to wield or null item to remove existing weapon without replacing it
+ * @return whether both removal and replacement were successful (they are performed atomically)
+ */
+ virtual bool wield( item &target ) = 0;
+
void drop_invalid_inventory();
virtual bool has_artifact_with( art_effect_passive effect ) const;
@@ -886,6 +922,16 @@ class Character : public Creature, public visitable
/** Returns true if the player is wearing an item with the given flag. */
bool worn_with_flag( const std::string &flag, body_part bp = num_bp ) const;
+
+ // drawing related stuff
+ /**
+ * Returns a list of the IDs of overlays on this character,
+ * sorted from "lowest" to "highest".
+ *
+ * Only required for rendering.
+ */
+ std::vector get_overlay_ids() const;
+
// --------------- Skill Stuff ---------------
int get_skill_level( const skill_id &ident ) const;
int get_skill_level( const skill_id &ident, const item &context ) const;
@@ -1177,6 +1223,8 @@ class Character : public Creature, public visitable
faction_id fac_id; // A temp variable used to inform the game which faction to link
faction *my_fac = nullptr;
+ character_movemode move_mode;
+
private:
// a cache of all active enchantment values.
// is recalculated every turn in Character::recalculate_enchantment_cache
diff --git a/src/creature.cpp b/src/creature.cpp
index 72bcd3ecee4d7..b77f0018a4313 100644
--- a/src/creature.cpp
+++ b/src/creature.cpp
@@ -197,15 +197,15 @@ bool Creature::sees( const Creature &critter ) const
}
// This check is ridiculously expensive so defer it to after everything else.
- auto visible = []( const player * p ) {
- return p == nullptr || !p->is_invisible();
+ auto visible = []( const Character * ch ) {
+ return ch == nullptr || !ch->is_invisible();
};
- const player *p = critter.as_player();
+ const Character *ch = critter.as_character();
const int wanted_range = rl_dist( pos(), critter.pos() );
if( wanted_range <= 1 &&
( posz() == critter.posz() || g->m.valid_move( pos(), critter.pos(), false, true ) ) ) {
- return visible( p );
+ return visible( ch );
} else if( ( wanted_range > 1 && critter.digging() ) ||
( critter.has_flag( MF_NIGHT_INVISIBILITY ) && g->m.light_at( critter.pos() ) <= LL_LOW ) ||
( critter.is_underwater() && !is_underwater() && g->m.is_divable( critter.pos() ) ) ||
@@ -214,14 +214,14 @@ bool Creature::sees( const Creature &critter ) const
abs( posz() - critter.posz() ) <= 1 ) ) ) {
return false;
}
- if( p != nullptr ) {
- if( p->movement_mode_is( PMM_CROUCH ) ) {
+ if( ch != nullptr ) {
+ if( ch->movement_mode_is( CMM_CROUCH ) ) {
const int coverage = g->m.obstacle_coverage( pos(), critter.pos() );
if( coverage < 30 ) {
- return sees( critter.pos(), critter.is_player() ) && visible( p );
+ return sees( critter.pos(), critter.is_avatar() ) && visible( ch );
}
float size_modifier = 1.0;
- switch( p->get_size() ) {
+ switch( ch->get_size() ) {
case MS_TINY:
size_modifier = 2.0;
break;
@@ -239,15 +239,15 @@ bool Creature::sees( const Creature &critter ) const
}
const int vision_modifier = 30 - 0.5 * coverage * size_modifier;
if( vision_modifier > 1 ) {
- return sees( critter.pos(), critter.is_player(), vision_modifier ) && visible( p );
+ return sees( critter.pos(), critter.is_avatar(), vision_modifier ) && visible( ch );
}
return false;
}
}
- return sees( critter.pos(), p != nullptr ) && visible( p );
+ return sees( critter.pos(), ch != nullptr ) && visible( ch );
}
-bool Creature::sees( const tripoint &t, bool is_player, int range_mod ) const
+bool Creature::sees( const tripoint &t, bool is_avatar, int range_mod ) const
{
if( !fov_3d && posz() != t.z ) {
return false;
@@ -274,7 +274,7 @@ bool Creature::sees( const tripoint &t, bool is_player, int range_mod ) const
if( range_mod > 0 ) {
range = std::min( range, range_mod );
}
- if( is_player ) {
+ if( is_avatar ) {
// Special case monster -> player visibility, forcing it to be symmetric with player vision.
const float player_visibility_factor = g->u.visibility() / 100.0f;
int adj_range = std::floor( range * player_visibility_factor );
diff --git a/src/creature.h b/src/creature.h
index 1f328609ff683..dd4329eb75eca 100644
--- a/src/creature.h
+++ b/src/creature.h
@@ -180,7 +180,7 @@ class Creature
*/
/*@{*/
virtual bool sees( const Creature &critter ) const;
- virtual bool sees( const tripoint &t, bool is_player = false, int range_mod = 0 ) const;
+ virtual bool sees( const tripoint &t, bool is_avatar = false, int range_mod = 0 ) const;
/*@}*/
/**
diff --git a/src/game.cpp b/src/game.cpp
index b6bdba3cc0a04..f82a563fc6ce9 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -9144,11 +9144,11 @@ bool game::walk_move( const tripoint &dest_loc )
const double base_moves = u.run_cost( mcost, diag ) * 100.0 / crit->get_speed();
const double encumb_moves = u.get_weight() / 4800.0_gram;
u.moves -= static_cast( ceil( base_moves + encumb_moves ) );
- if( u.movement_mode_is( PMM_WALK ) ) {
+ if( u.movement_mode_is( CMM_WALK ) ) {
crit->use_mech_power( -2 );
- } else if( u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( u.movement_mode_is( CMM_CROUCH ) ) {
crit->use_mech_power( -1 );
- } else if( u.movement_mode_is( PMM_RUN ) ) {
+ } else if( u.movement_mode_is( CMM_RUN ) ) {
crit->use_mech_power( -3 );
}
} else {
@@ -9218,9 +9218,9 @@ bool game::walk_move( const tripoint &dest_loc )
} else if( u.has_bionic( bionic_id( "bio_ankles" ) ) ) {
volume = 12;
}
- if( u.movement_mode_is( PMM_RUN ) ) {
+ if( u.movement_mode_is( CMM_RUN ) ) {
volume *= 1.5;
- } else if( u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( u.movement_mode_is( CMM_CROUCH ) ) {
volume /= 2;
}
if( u.is_mounted() ) {
@@ -9956,7 +9956,7 @@ void game::on_move_effects()
}
}
if( u.has_active_bionic( bionic_id( "bio_jointservo" ) ) ) {
- if( u.movement_mode_is( PMM_RUN ) ) {
+ if( u.movement_mode_is( CMM_RUN ) ) {
u.mod_power_level( -20_kJ );
} else {
u.mod_power_level( -10_kJ );
@@ -9966,6 +9966,8 @@ void game::on_move_effects()
if( u.movement_mode_is( PMM_RUN ) ) {
if( !u.can_run() ) {
+ if( u.movement_mode_is( CMM_RUN ) ) {
+ if( u.stamina <= 0 ) {
u.toggle_run_mode();
}
if( u.stamina < u.get_stamina_max() / 5 && one_in( u.stamina ) ) {
@@ -10391,11 +10393,11 @@ void game::vertical_move( int movez, bool force )
monster *crit = u.mounted_creature.get();
if( crit->has_flag( MF_RIDEABLE_MECH ) ) {
crit->use_mech_power( -1 );
- if( u.movement_mode_is( PMM_WALK ) ) {
+ if( u.movement_mode_is( CMM_WALK ) ) {
crit->use_mech_power( -2 );
- } else if( u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( u.movement_mode_is( CMM_CROUCH ) ) {
crit->use_mech_power( -1 );
- } else if( u.movement_mode_is( PMM_RUN ) ) {
+ } else if( u.movement_mode_is( CMM_RUN ) ) {
crit->use_mech_power( -3 );
}
}
diff --git a/src/handle_action.cpp b/src/handle_action.cpp
index 7c40e33ace3ee..2c0831ce966dc 100644
--- a/src/handle_action.cpp
+++ b/src/handle_action.cpp
@@ -1367,7 +1367,7 @@ static void fire()
static void open_movement_mode_menu()
{
- player &u = g->u;
+ avatar &u = g->u;
uilist as_m;
as_m.text = _( "Change to which movement mode?" );
@@ -1379,13 +1379,13 @@ static void open_movement_mode_menu()
switch( as_m.ret ) {
case 0:
- u.set_movement_mode( PMM_WALK );
+ u.set_movement_mode( CMM_WALK );
break;
case 1:
- u.set_movement_mode( PMM_RUN );
+ u.set_movement_mode( CMM_RUN );
break;
case 2:
- u.set_movement_mode( PMM_CROUCH );
+ u.set_movement_mode( CMM_CROUCH );
break;
default:
break;
diff --git a/src/iuse.cpp b/src/iuse.cpp
index 37f22376bc784..41ce86a9ea0eb 100644
--- a/src/iuse.cpp
+++ b/src/iuse.cpp
@@ -7227,7 +7227,7 @@ static extended_photo_def photo_def_for_camera_point( const tripoint &aim_point,
continue; // disallow photos with non-visible objects
}
monster *const mon = g->critter_at( current, false );
- player *guy = g->critter_at( current );
+ avatar *guy = g->critter_at( current );
total_tiles_num++;
if( g->m.is_outside( current ) ) {
@@ -7248,7 +7248,7 @@ static extended_photo_def photo_def_for_camera_point( const tripoint &aim_point,
if( guy->is_hallucination() ) {
continue; // do not include hallucinations
}
- if( guy->movement_mode_is( PMM_CROUCH ) ) {
+ if( guy->movement_mode_is( CMM_CROUCH ) ) {
pose = _( "sits" );
} else {
pose = _( "stands" );
diff --git a/src/map.cpp b/src/map.cpp
index 0531f66297ef4..2d783e11fce95 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -8037,7 +8037,7 @@ void map::build_map_cache( const int zlev, bool skip_lightmap )
}
const tripoint &p = g->u.pos();
- bool is_crouching = g->u.movement_mode_is( PMM_CROUCH );
+ bool is_crouching = g->u.movement_mode_is( CMM_CROUCH );
for( const tripoint &loc : points_in_radius( p, 1 ) ) {
if( loc == p ) {
// The tile player is standing on should always be transparent
diff --git a/src/monexamine.cpp b/src/monexamine.cpp
index e1089831bc3b6..117a6e24a317e 100644
--- a/src/monexamine.cpp
+++ b/src/monexamine.cpp
@@ -386,7 +386,7 @@ void monexamine::attach_or_remove_saddle( monster &z )
}
}
-bool player::can_mount( const monster &critter ) const
+bool Character::can_mount( const monster &critter ) const
{
const auto &avoid = get_path_avoid();
auto route = g->m.route( pos(), critter.pos(), get_pathfinding_settings(), avoid );
diff --git a/src/monster.h b/src/monster.h
index 584434b3d351a..715fa2475863a 100644
--- a/src/monster.h
+++ b/src/monster.h
@@ -422,7 +422,7 @@ class monster : public Creature
tripoint wander_pos; // Wander destination - Just try to move in that direction
int wandf; // Urge to wander - Increased by sound, decrements each move
std::vector- inv; // Inventory
- player *mounted_player = nullptr; // player that is mounting this creature
+ Character *mounted_player = nullptr; // player that is mounting this creature
character_id mounted_player_id; // id of player that is mounting this creature ( for save/load )
character_id dragged_foe_id; // id of character being dragged by the monster
cata::optional
- tied_item; // item used to tie the monster
diff --git a/src/npc.h b/src/npc.h
index 57fe8a95d5b44..9133a30b24850 100644
--- a/src/npc.h
+++ b/src/npc.h
@@ -1093,6 +1093,8 @@ class npc : public player
// Same as if the player pressed '.'
void move_pause();
+ void set_movement_mode( character_movemode mode ) override;
+
const pathfinding_settings &get_pathfinding_settings() const override;
const pathfinding_settings &get_pathfinding_settings( bool no_bashing ) const;
std::set get_path_avoid() const override;
diff --git a/src/npcmove.cpp b/src/npcmove.cpp
index 986df7898078e..03750b49557d6 100644
--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -4378,3 +4378,8 @@ bool npc::adjust_worn()
return false;
}
+
+void npc::set_movement_mode( character_movemode new_mode )
+{
+ move_mode = new_mode;
+}
diff --git a/src/panels.cpp b/src/panels.cpp
index 3471d6a376d98..ada597795d51b 100644
--- a/src/panels.cpp
+++ b/src/panels.cpp
@@ -984,9 +984,9 @@ static void draw_stats( avatar &u, const catacurses::window &w )
static nc_color move_mode_color( avatar &u )
{
- if( u.movement_mode_is( PMM_RUN ) ) {
+ if( u.movement_mode_is( CMM_RUN ) ) {
return c_red;
- } else if( u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( u.movement_mode_is( CMM_CROUCH ) ) {
return c_light_blue;
} else {
return c_light_gray;
@@ -995,9 +995,9 @@ static nc_color move_mode_color( avatar &u )
static std::string move_mode_string( avatar &u )
{
- if( u.movement_mode_is( PMM_RUN ) ) {
+ if( u.movement_mode_is( CMM_RUN ) ) {
return pgettext( "movement-type", "R" );
- } else if( u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( u.movement_mode_is( CMM_CROUCH ) ) {
return pgettext( "movement-type", "C" );
} else {
return pgettext( "movement-type", "W" );
@@ -1589,7 +1589,7 @@ static void draw_health_classic( avatar &u, const catacurses::window &w )
if( !u.in_vehicle ) {
mvwprintz( w, point( 21, 5 ), u.get_speed() < 100 ? c_red : c_white,
_( "Spd " ) + to_string( u.get_speed() ) );
- nc_color move_color = u.movement_mode_is( PMM_WALK ) ? c_white : move_mode_color( u );
+ nc_color move_color = u.movement_mode_is( CMM_WALK ) ? c_white : move_mode_color( u );
std::string move_string = to_string( u.movecounter ) + " " + move_mode_string( u );
mvwprintz( w, point( 29, 5 ), move_color, move_string );
}
diff --git a/src/player.cpp b/src/player.cpp
index 0a6d4a78b5df4..474205cb35421 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -58,7 +58,6 @@
#include "npc.h"
#include "options.h"
#include "output.h"
-#include "overlay_ordering.h"
#include "overmapbuffer.h"
#include "pickup.h"
#include "profession.h"
@@ -128,7 +127,6 @@ const efftype_id effect_cig( "cig" );
const efftype_id effect_cold( "cold" );
const efftype_id effect_common_cold( "common_cold" );
const efftype_id effect_contacts( "contacts" );
-const efftype_id effect_controlled( "controlled" );
const efftype_id effect_corroding( "corroding" );
const efftype_id effect_cough_suppress( "cough_suppress" );
const efftype_id effect_darkness( "darkness" );
@@ -176,7 +174,6 @@ const efftype_id effect_pkill2( "pkill2" );
const efftype_id effect_pkill3( "pkill3" );
const efftype_id effect_recover( "recover" );
const efftype_id effect_riding( "riding" );
-const efftype_id effect_ridden( "ridden" );
const efftype_id effect_sad( "sad" );
const efftype_id effect_shakes( "shakes" );
const efftype_id effect_sleep( "sleep" );
@@ -195,9 +192,7 @@ const efftype_id effect_weed_high( "weed_high" );
const efftype_id effect_winded( "winded" );
const efftype_id effect_bleed( "bleed" );
const efftype_id effect_magnesium_supplements( "magnesium" );
-const efftype_id effect_harnessed( "harnessed" );
const efftype_id effect_pet( "pet" );
-const efftype_id effect_tied( "tied" );
const matype_id style_none( "style_none" );
const matype_id style_kicks( "style_kicks" );
@@ -504,7 +499,6 @@ player::player() :
controlling_vehicle = false;
grab_point = tripoint_zero;
hauling = false;
- move_mode = PMM_WALK;
style_selected = style_none;
keep_hands_free = false;
focus_pool = 100;
@@ -1604,7 +1598,7 @@ int player::run_cost( int base_cost, bool diag ) const
movecost *= .9f;
}
if( has_active_bionic( bio_jointservo ) ) {
- if( move_mode == PMM_RUN ) {
+ if( move_mode == CMM_RUN ) {
movecost *= 0.85f;
} else {
movecost *= 0.95f;
@@ -1667,11 +1661,11 @@ int player::run_cost( int base_cost, bool diag ) const
// Both walk and run speed drop to half their maximums as stamina approaches 0.
// Convert stamina to a float first to allow for decimal place carrying
float stamina_modifier = ( static_cast( stamina ) / get_stamina_max() + 1 ) / 2;
- if( move_mode == PMM_RUN && stamina > 0 ) {
+ if( move_mode == CMM_RUN && stamina > 0 ) {
// Rationale: Average running speed is 2x walking speed. (NOT sprinting)
stamina_modifier *= 2.0;
}
- if( move_mode == PMM_CROUCH ) {
+ if( move_mode == CMM_CROUCH ) {
stamina_modifier *= 0.5;
}
@@ -1766,11 +1760,11 @@ int player::swim_speed() const
}
// Running movement mode while swimming means faster swim style, like crawlstroke
- if( move_mode == PMM_RUN ) {
+ if( move_mode == CMM_RUN ) {
ret -= 80;
}
// Crouching movement mode while swimming means slower swim style, like breaststroke
- if( move_mode == PMM_CROUCH ) {
+ if( move_mode == CMM_CROUCH ) {
ret += 50;
}
@@ -1919,13 +1913,13 @@ nc_color player::basic_symbol_color() const
return c_blue;
}
if( has_active_bionic( bio_cloak ) || has_artifact_with( AEP_INVISIBLE ) ||
- has_active_optcloak() || has_trait( trait_DEBUG_CLOAK ) ) {
+ is_wearing_active_optcloak() || has_trait( trait_DEBUG_CLOAK ) ) {
return c_dark_gray;
}
- if( move_mode == PMM_RUN ) {
+ if( move_mode == CMM_RUN ) {
return c_yellow;
}
- if( move_mode == PMM_CROUCH ) {
+ if( move_mode == CMM_CROUCH ) {
return c_light_gray;
}
return c_white;
@@ -2125,16 +2119,6 @@ std::list
- player::get_artifact_items()
return art_items;
}
-bool player::has_active_optcloak() const
-{
- for( auto &w : worn ) {
- if( w.active && w.has_flag( "ACTIVE_CLOAKING" ) ) {
- return true;
- }
- }
- return false;
-}
-
/*
* Calculate player brightness based on the brightest active item, as
* per itype tag LIGHT_* and optional CHARGEDIM ( fade starting at 20% charge )
@@ -7539,67 +7523,6 @@ bool player::is_wielding( const item &target ) const
return &weapon == ⌖
}
-bool player::wield( item &target )
-{
- if( is_wielding( target ) ) {
- return true;
- }
-
- if( !can_wield( target ).success() ) {
- return false;
- }
-
- if( !unwield() ) {
- return false;
- }
- cached_info.erase( "weapon_value" );
- if( target.is_null() ) {
- return true;
- }
-
- // Query whether to draw an item from a holster when attempting to wield the holster
- if( target.get_use( "holster" ) && !target.contents.empty() ) {
- //~ %1$s: weapon name, %2$s: holster name
- if( query_yn( pgettext( "holster", "Draw %1$s from %2$s?" ), target.get_contained().tname(),
- target.tname() ) ) {
- invoke_item( &target );
- return false;
- }
- }
-
- // Wielding from inventory is relatively slow and does not improve with increasing weapon skill.
- // Worn items (including guns with shoulder straps) are faster but still slower
- // than a skilled player with a holster.
- // There is an additional penalty when wielding items from the inventory whilst currently grabbed.
-
- bool worn = is_worn( target );
- int mv = item_handling_cost( target, true,
- worn ? INVENTORY_HANDLING_PENALTY / 2 : INVENTORY_HANDLING_PENALTY );
-
- if( worn ) {
- target.on_takeoff( *this );
- }
-
- add_msg( m_debug, "wielding took %d moves", mv );
- moves -= mv;
-
- if( has_item( target ) ) {
- weapon = i_rem( &target );
- } else {
- weapon = target;
- }
-
- last_item = weapon.typeId();
- recoil = MAX_RECOIL;
-
- weapon.on_wield( *this, mv );
-
- inv.update_invlet( weapon );
- inv.update_cache_with_item( weapon );
-
- return true;
-}
-
bool player::unwield()
{
if( weapon.is_null() ) {
@@ -10408,32 +10331,6 @@ void player::environmental_revert_effect()
reset_encumbrance();
}
-bool player::is_invisible() const
-{
- static const bionic_id str_bio_cloak( "bio_cloak" ); // This function used in monster::plan_moves
- static const bionic_id str_bio_night( "bio_night" );
- return (
- has_effect_with_flag( "EFFECT_INVISIBLE" ) ||
- has_active_bionic( str_bio_cloak ) ||
- has_active_bionic( str_bio_night ) ||
- has_active_optcloak() ||
- has_trait( trait_DEBUG_CLOAK ) ||
- has_artifact_with( AEP_INVISIBLE )
- );
-}
-
-int player::visibility( bool, int ) const
-{
- // 0-100 %
- if( is_invisible() ) {
- return 0;
- }
- // TODO:
- // if ( dark_clothing() && light check ...
- int stealth_modifier = std::floor( mutation_value( "stealth_modifier" ) );
- return clamp( 100 - stealth_modifier, 40, 160 );
-}
-
void player::set_destination( const std::vector &route,
const player_activity &destination_activity )
{
@@ -10638,7 +10535,7 @@ void player::burn_move_stamina( int moves )
}
}
burn_ratio += overburden_percentage;
- if( move_mode == PMM_RUN ) {
+ if( move_mode == CMM_RUN ) {
burn_ratio = burn_ratio * 7;
}
mod_stat( "stamina", -( ( moves * burn_ratio ) / 100.0 ) );
@@ -10655,182 +10552,6 @@ void player::burn_move_stamina( int moves )
}
}
-void player::mount_creature( monster &z )
-{
- tripoint pnt = z.pos();
- std::shared_ptr mons = g->shared_from( z );
- if( mons == nullptr ) {
- add_msg( m_debug, "mount_creature(): monster not found in critter_tracker" );
- return;
- }
- add_effect( effect_riding, 1_turns, num_bp, true );
- z.add_effect( effect_ridden, 1_turns, num_bp, true );
- if( z.has_effect( effect_tied ) ) {
- z.remove_effect( effect_tied );
- if( z.tied_item ) {
- i_add( *z.tied_item );
- z.tied_item = cata::nullopt;
- }
- }
- z.mounted_player_id = getID();
- if( z.has_effect( effect_harnessed ) ) {
- z.remove_effect( effect_harnessed );
- add_msg_if_player( m_info, _( "You remove the %s's harness." ), z.get_name() );
- }
- mounted_creature = mons;
- mons->mounted_player = this;
- if( is_hauling() ) {
- stop_hauling();
- }
- if( is_player() ) {
- if( g->u.get_grab_type() != OBJECT_NONE ) {
- add_msg( m_warning, _( "You let go of the grabbed object." ) );
- g->u.grab( OBJECT_NONE );
- }
- g->place_player( pnt );
- } else {
- npc &guy = dynamic_cast( *this );
- guy.setpos( pnt );
- }
- z.facing = facing;
- add_msg_if_player( m_good, _( "You climb on the %s." ), z.get_name() );
- if( z.has_flag( MF_RIDEABLE_MECH ) ) {
- if( !z.type->mech_weapon.empty() ) {
- item mechwep = item( z.type->mech_weapon );
- wield( mechwep );
- }
- add_msg_if_player( m_good, _( "You hear your %s whir to life." ), z.get_name() );
- }
- // some rideable mechs have night-vision
- recalc_sight_limits();
- mod_moves( -100 );
-}
-
-void player::forced_dismount()
-{
- remove_effect( effect_riding );
- bool mech = false;
- if( mounted_creature ) {
- auto mon = mounted_creature.get();
- if( mon->has_flag( MF_RIDEABLE_MECH ) && !mon->type->mech_weapon.empty() ) {
- mech = true;
- remove_item( weapon );
- }
- mon->mounted_player_id = character_id();
- mon->remove_effect( effect_ridden );
- mon->add_effect( effect_controlled, 5_turns );
- mounted_creature = nullptr;
- mon->mounted_player = nullptr;
- }
- std::vector valid;
- for( const tripoint &jk : g->m.points_in_radius( pos(), 1 ) ) {
- if( g->is_empty( jk ) ) {
- valid.push_back( jk );
- }
- }
- if( !valid.empty() ) {
- setpos( random_entry( valid ) );
- if( mech ) {
- add_msg_player_or_npc( m_bad, _( "You are ejected from your mech!" ),
- _( " is ejected from their mech!" ) );
- } else {
- add_msg_player_or_npc( m_bad, _( "You fall off your mount!" ),
- _( " falls off their mount!" ) );
- }
- const int dodge = get_dodge();
- const int damage = std::max( 0, rng( 1, 20 ) - rng( dodge, dodge * 2 ) );
- body_part hit = num_bp;
- switch( rng( 1, 10 ) ) {
- case 1:
- if( one_in( 2 ) ) {
- hit = bp_foot_l;
- } else {
- hit = bp_foot_r;
- }
- break;
- case 2:
- case 3:
- case 4:
- if( one_in( 2 ) ) {
- hit = bp_leg_l;
- } else {
- hit = bp_leg_r;
- }
- break;
- case 5:
- case 6:
- case 7:
- if( one_in( 2 ) ) {
- hit = bp_arm_l;
- } else {
- hit = bp_arm_r;
- }
- break;
- case 8:
- case 9:
- hit = bp_torso;
- break;
- case 10:
- hit = bp_head;
- break;
- }
- if( damage > 0 ) {
- add_msg_if_player( m_bad, _( "You hurt yourself!" ) );
- deal_damage( nullptr, hit, damage_instance( DT_BASH, damage ) );
- if( is_avatar() ) {
- g->memorial().add(
- pgettext( "memorial_male", "Fell off a mount." ),
- pgettext( "memorial_female", "Fell off a mount." ) );
- }
- check_dead_state();
- }
- add_effect( effect_downed, 5_turns, num_bp, true );
- } else {
- add_msg( m_debug, "Forced_dismount could not find a square to deposit player" );
- }
- if( is_player() ) {
- if( g->u.get_grab_type() != OBJECT_NONE ) {
- add_msg( m_warning, _( "You let go of the grabbed object." ) );
- g->u.grab( OBJECT_NONE );
- }
- set_movement_mode( PMM_WALK );
- g->update_map( g->u );
- }
- moves -= 150;
-}
-
-void player::dismount()
-{
- if( !is_mounted() ) {
- add_msg( m_debug, "dismount called when not riding" );
- return;
- }
- if( const cata::optional pnt = choose_adjacent( _( "Dismount where?" ) ) ) {
- if( !g->is_empty( *pnt ) ) {
- add_msg( m_warning, _( "You cannot dismount there!" ) );
- return;
- }
- remove_effect( effect_riding );
- monster *critter = mounted_creature.get();
- critter->mounted_player_id = character_id();
- if( critter->has_flag( MF_RIDEABLE_MECH ) && !critter->type->mech_weapon.empty() ) {
- remove_item( g->u.weapon );
- }
- if( g->u.get_grab_type() != OBJECT_NONE ) {
- add_msg( m_warning, _( "You let go of the grabbed object." ) );
- g->u.grab( OBJECT_NONE );
- }
- critter->remove_effect( effect_ridden );
- critter->add_effect( effect_controlled, 5_turns );
- mounted_creature = nullptr;
- critter->mounted_player = nullptr;
- setpos( *pnt );
- g->refresh_all();
- mod_moves( -100 );
- set_movement_mode( PMM_WALK );
- }
-}
-
Creature::Attitude player::attitude_to( const Creature &other ) const
{
const auto m = dynamic_cast( &other );
@@ -11229,54 +10950,6 @@ bool player::sees_with_infrared( const Creature &critter ) const
return g->m.sees( pos(), critter.pos(), sight_range( current_daylight_level( calendar::turn ) ) );
}
-std::vector player::get_overlay_ids() const
-{
- std::vector rval;
- std::multimap mutation_sorting;
- int order;
- std::string overlay_id;
-
- // first get effects
- for( const auto &eff_pr : *effects ) {
- rval.push_back( "effect_" + eff_pr.first.str() );
- }
-
- // then get mutations
- for( const auto &mut : my_mutations ) {
- overlay_id = ( mut.second.powered ? "active_" : "" ) + mut.first.str();
- order = get_overlay_order_of_mutation( overlay_id );
- mutation_sorting.insert( std::pair( order, overlay_id ) );
- }
-
- // then get bionics
- for( const bionic &bio : *my_bionics ) {
- overlay_id = ( bio.powered ? "active_" : "" ) + bio.id.str();
- order = get_overlay_order_of_mutation( overlay_id );
- mutation_sorting.insert( std::pair( order, overlay_id ) );
- }
-
- for( auto &mutorder : mutation_sorting ) {
- rval.push_back( "mutation_" + mutorder.second );
- }
-
- // next clothing
- // TODO: worry about correct order of clothing overlays
- for( const item &worn_item : worn ) {
- rval.push_back( "worn_" + worn_item.typeId() );
- }
-
- // last weapon
- // TODO: might there be clothing that covers the weapon?
- if( is_armed() ) {
- rval.push_back( "wielded_" + weapon.typeId() );
- }
-
- if( move_mode != PMM_WALK ) {
- rval.push_back( player_movemode_str[ move_mode ] );
- }
- return rval;
-}
-
float player::power_rating() const
{
int dmg = std::max( { weapon.damage_melee( DT_BASH ),
@@ -11307,7 +10980,7 @@ float player::speed_rating() const
float ret = get_speed() / 100.0f;
ret *= 100.0f / run_cost( 100, false );
// Adjustment for player being able to run, but not doing so at the moment
- if( move_mode != PMM_RUN ) {
+ if( move_mode != CMM_RUN ) {
ret *= 1.0f + ( static_cast( stamina ) / static_cast( get_stamina_max() ) );
}
return ret;
diff --git a/src/player.h b/src/player.h
index b02251504fda3..073df11035850 100644
--- a/src/player.h
+++ b/src/player.h
@@ -157,20 +157,6 @@ struct needs_rates {
float kcal = 0.0f;
};
-enum player_movemode : unsigned char {
- PMM_WALK = 0,
- PMM_RUN = 1,
- PMM_CROUCH = 2,
- PMM_COUNT
-};
-
-static const std::array< std::string, PMM_COUNT > player_movemode_str = { {
- "walk",
- "run",
- "crouch"
- }
-};
-
class player : public Character
{
public:
@@ -211,8 +197,7 @@ class player : public Character
bool is_npc() const override {
return false; // Overloaded for NPCs in npc.h
}
- bool can_mount( const monster &critter ) const;
- void mount_creature( monster &z );
+
/** Returns what color the player should be drawn as */
nc_color basic_symbol_color() const override;
@@ -309,8 +294,6 @@ class player : public Character
/** Handles process of introducing patient into anesthesia during Autodoc operations. Requires anesthetic kits or NOPAIN mutation */
void introduce_into_anesthesia( const time_duration &duration, player &installer,
bool needs_anesthesia );
- /** Returns true if the player is wearing an active optical cloak */
- bool has_active_optcloak() const;
/** Adds a bionic to my_bionics[] */
void add_bionic( const bionic_id &b );
/** Removes a bionic from my_bionics[] */
@@ -440,14 +423,6 @@ class player : public Character
void pause(); // '.' command; pauses & resets recoil
- void set_movement_mode( player_movemode mode );
- bool movement_mode_is( player_movemode mode ) const;
-
- void cycle_move_mode(); // Cycles to the next move mode.
- void reset_move_mode(); // Resets to walking.
- void toggle_run_mode(); // Toggles running on/off.
- void toggle_crouch_mode(); // Toggles crouching on/off.
-
// martialarts.cpp
/** Fires all non-triggered martial arts events */
void ma_static_effects();
@@ -957,12 +932,6 @@ class player : public Character
bool can_estimate_rot() const;
bool is_wielding( const item &target ) const;
- /**
- * Removes currently wielded item (if any) and replaces it with the target item.
- * @param target replacement item to wield or null item to remove existing weapon without replacing it
- * @return whether both removal and replacement were successful (they are performed atomically)
- */
- virtual bool wield( item &target );
bool unwield();
/** Creates the UI and handles player input for picking martial arts styles */
@@ -1462,8 +1431,6 @@ class player : public Character
action_id get_next_auto_move_direction();
bool defer_move( const tripoint &next );
void shift_destination( const point &shift );
- void forced_dismount();
- void dismount();
// Hauling items on the ground
void start_hauling();
@@ -1558,14 +1525,11 @@ class player : public Character
bool is_hallucination() const override;
void environmental_revert_effect();
- bool is_invisible() const;
bool is_deaf() const;
// Checks whether a player can hear a sound at a given volume and location.
bool can_hear( const tripoint &source, int volume ) const;
// Returns a multiplier indicating the keenness of a player's hearing.
float hearing_ability() const;
- int visibility( bool check_color = false,
- int stillness = 0 ) const; // just checks is_invisible for the moment
m_size get_size() const override;
int get_hp( hp_part bp ) const override;
@@ -1599,15 +1563,6 @@ class player : public Character
// TODO: make protected and move into Character
void do_skill_rust();
- // drawing related stuff
- /**
- * Returns a list of the IDs of overlays on this character,
- * sorted from "lowest" to "highest".
- *
- * Only required for rendering.
- */
- std::vector get_overlay_ids() const;
-
/**
* Called when a mutation is gained
*/
@@ -1753,9 +1708,6 @@ class player : public Character
int pkill;
- protected:
- // TODO: move this to avatar
- player_movemode move_mode;
private:
std::vector auto_move_route;
diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp
index f30f373d52c2d..3ec7879bf3f0f 100644
--- a/src/savegame_json.cpp
+++ b/src/savegame_json.cpp
@@ -479,6 +479,15 @@ void Character::load( JsonObject &data )
weapon = item( "null", 0 );
data.read( "weapon", weapon );
+ std::string tmove_mode;
+ data.read( "move_mode", tmove_mode );
+ for( int i = 0; i < CMM_COUNT; ++i ) {
+ if( tmove_mode == character_movemode_str[i] ) {
+ move_mode = static_cast( i );
+ break;
+ }
+ }
+
if( has_effect( effect_riding ) ) {
int temp_id;
if( data.read( "mounted_creature", temp_id ) ) {
@@ -577,6 +586,9 @@ void Character::store( JsonOut &json ) const
// "Fracking Toasters" - Saul Tigh, toaster
json.member( "my_bionics", *my_bionics );
+
+ json.member( "move_mode", character_movemode_str[ move_mode ] );
+
// storing the mount
if( is_mounted() ) {
json.member( "mounted_creature", g->critter_tracker->temporary_id( *mounted_creature ) );
@@ -861,7 +873,6 @@ void avatar::store( JsonOut &json ) const
json.member( "style_selected", style_selected );
json.member( "keep_hands_free", keep_hands_free );
- json.member( "move_mode", player_movemode_str[ move_mode ] );
json.member( "magic", magic );
// stats through kills
@@ -977,14 +988,6 @@ void avatar::load( JsonObject &data )
data.read( "stamina", stamina );
data.read( "magic", magic );
- std::string tmove_mode;
- data.read( "move_mode", tmove_mode );
- for( int i = 0; i < PMM_COUNT; ++i ) {
- if( tmove_mode == player_movemode_str[i] ) {
- move_mode = static_cast( i );
- break;
- }
- }
set_highest_cat_level();
drench_mut_calc();
diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp
index 6507e06318f88..8cf4b05623c9a 100644
--- a/src/sdltiles.cpp
+++ b/src/sdltiles.cpp
@@ -2547,11 +2547,11 @@ static void CheckMessages()
}
// If we're already running, make it simple to toggle running to off.
- if( g->u.movement_mode_is( PMM_RUN ) ) {
+ if( g->u.movement_mode_is( CMM_RUN ) ) {
actions.insert( ACTION_TOGGLE_RUN );
}
// If we're already crouching, make it simple to toggle crouching to off.
- if( g->u.movement_mode_is( PMM_CROUCH ) ) {
+ if( g->u.movement_mode_is( CMM_CROUCH ) ) {
actions.insert( ACTION_TOGGLE_CROUCH );
}
diff --git a/src/trapfunc.cpp b/src/trapfunc.cpp
index d712b20ceb560..8f22ffe980f4d 100644
--- a/src/trapfunc.cpp
+++ b/src/trapfunc.cpp
@@ -710,22 +710,22 @@ bool trapfunc::dissector( const tripoint &p, Creature *c, item * )
}
// distribute damage amongst player and horse
if( z->has_effect( effect_ridden ) && z->mounted_player ) {
- player *pl = z->mounted_player;
- pl->deal_damage( nullptr, bp_head, damage_instance( DT_CUT, 15 ) );
- pl->deal_damage( nullptr, bp_torso, damage_instance( DT_CUT, 20 ) );
- pl->deal_damage( nullptr, bp_arm_r, damage_instance( DT_CUT, 12 ) );
- pl->deal_damage( nullptr, bp_arm_l, damage_instance( DT_CUT, 12 ) );
- pl->deal_damage( nullptr, bp_hand_r, damage_instance( DT_CUT, 10 ) );
- pl->deal_damage( nullptr, bp_hand_l, damage_instance( DT_CUT, 10 ) );
- pl->deal_damage( nullptr, bp_leg_r, damage_instance( DT_CUT, 12 ) );
- pl->deal_damage( nullptr, bp_leg_r, damage_instance( DT_CUT, 12 ) );
- pl->deal_damage( nullptr, bp_foot_l, damage_instance( DT_CUT, 10 ) );
- pl->deal_damage( nullptr, bp_foot_r, damage_instance( DT_CUT, 10 ) );
+ Character *ch = z->mounted_player;
+ ch->deal_damage( nullptr, bp_head, damage_instance( DT_CUT, 15 ) );
+ ch->deal_damage( nullptr, bp_torso, damage_instance( DT_CUT, 20 ) );
+ ch->deal_damage( nullptr, bp_arm_r, damage_instance( DT_CUT, 12 ) );
+ ch->deal_damage( nullptr, bp_arm_l, damage_instance( DT_CUT, 12 ) );
+ ch->deal_damage( nullptr, bp_hand_r, damage_instance( DT_CUT, 10 ) );
+ ch->deal_damage( nullptr, bp_hand_l, damage_instance( DT_CUT, 10 ) );
+ ch->deal_damage( nullptr, bp_leg_r, damage_instance( DT_CUT, 12 ) );
+ ch->deal_damage( nullptr, bp_leg_r, damage_instance( DT_CUT, 12 ) );
+ ch->deal_damage( nullptr, bp_foot_l, damage_instance( DT_CUT, 10 ) );
+ ch->deal_damage( nullptr, bp_foot_r, damage_instance( DT_CUT, 10 ) );
if( g->u.sees( p ) ) {
- pl->add_msg_player_or_npc( m_bad, _( "Electrical beams emit from the floor and slice your flesh!" ),
+ ch->add_msg_player_or_npc( m_bad, _( "Electrical beams emit from the floor and slice your flesh!" ),
_( "Electrical beams emit from the floor and slice s flesh!" ) );
}
- pl->check_dead_state();
+ ch->check_dead_state();
}
}
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index ffbaa61189de9..b5275e7827b82 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -719,9 +719,9 @@ void vehicle::drive_to_local_target( const tripoint &autodrive_local_target, boo
// when following player, take distance to player into account.
// we really want to avoid running the player over.
int safe_player_follow_speed = 400;
- if( g->u.movement_mode_is( PMM_RUN ) ) {
+ if( g->u.movement_mode_is( CMM_RUN ) ) {
safe_player_follow_speed = 800;
- } else if( g->u.movement_mode_is( PMM_CROUCH ) ) {
+ } else if( g->u.movement_mode_is( CMM_CROUCH ) ) {
safe_player_follow_speed = 200;
}
if( follow_protocol ) {
From 7b8ef1bd49fb8c7774de36c9a905ab860a06a884 Mon Sep 17 00:00:00 2001
From: Valiant
Date: Tue, 15 Oct 2019 17:09:11 +0400
Subject: [PATCH 75/86] Tweaked NPC "Trade how many" menu
---
src/npctrade.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/npctrade.cpp b/src/npctrade.cpp
index be21f2a5f316c..e515dcb8b9162 100644
--- a/src/npctrade.cpp
+++ b/src/npctrade.cpp
@@ -397,8 +397,12 @@ int trading_window::get_var_trade( const item &it, int total_count )
{
string_input_popup popup_input;
int how_many = total_count;
- const std::string title = string_format( _( "Trade how many %s [MAX: %d]: " ),
- it.display_name(), total_count );
+ const bool contained = it.is_container() && !it.contents.empty();
+
+ const std::string title = string_format( _( "Trade how many %s [MAX: %d]: " ), contained ?
+ "containers with " + it.get_contained().type_name( how_many ) :
+ it.type_name( how_many ),
+ total_count );
popup_input.title( title ).edit( how_many );
if( popup_input.canceled() || how_many <= 0 ) {
return -1;
From c75cf5de9f4746d6c4a804e49bb025b429cbb9d4 Mon Sep 17 00:00:00 2001
From: Anton Burmistrov
Date: Wed, 16 Oct 2019 09:57:36 +0300
Subject: [PATCH 76/86] Allow auto targeting mode for turrets only with
installed turret control unit (#34202)
* Added turret control unit
* Made it craftable (autolearn)
* Added corresponding vehicle part
* Added flag to bitflags set
* Added documentation
* Forcibly set turrets' targeting mode to manual if no turret control unit is present on turret's tile on loading save
* Allow changing turrets' targeting mode only if turret control unit is present
Also reworded targeting mode options a bit to reduce confusing.
Also removed a check for MANUAL flag as there is no items or vehicle parts with this flag.
Also reworded reason of why you can't aim automatic turrets and added a missing period.
* Turret controls must be installed on a turret
Also, on removing turret controls forcibly set targeting mode of affected turret to manual.
* Set turret control unit's state equal to turret's targeting mode
* Increased control unit power draw
* Added a requirement for laptop computer
Also inreased craft time to 2 hours.
* Added mechanics skill req for crafting TCU
Also increased its power consumption from 100W to 250W.
---
data/json/items/vehicle/controls.json | 12 +++++++++++
data/json/recipes/recipe_vehicle.json | 22 +++++++++++++++++++
data/json/vehicleparts/vehicle_parts.json | 26 +++++++++++++++++++++++
doc/JSON_FLAGS.md | 1 +
src/savegame_json.cpp | 9 ++++++++
src/turret.cpp | 23 +++++++++++++++-----
src/veh_type.cpp | 1 +
src/veh_type.h | 1 +
src/vehicle.cpp | 17 +++++++++++++++
9 files changed, 107 insertions(+), 5 deletions(-)
diff --git a/data/json/items/vehicle/controls.json b/data/json/items/vehicle/controls.json
index 3dda828dde67f..63ec8a5773d16 100644
--- a/data/json/items/vehicle/controls.json
+++ b/data/json/items/vehicle/controls.json
@@ -68,5 +68,17 @@
"bashing": 1,
"price": 20000,
"copy-from": "vehicle_controls"
+ },
+ {
+ "type": "GENERIC",
+ "id": "turret_controls",
+ "name": "turret control unit",
+ "description": "A set of motor, camera, and various electronic modules banded together to allow for tracking targets, friend-or-foe identification, and firing the connected turret in full automatic mode.",
+ "weight": "4000 g",
+ "color": "white",
+ "symbol": "&",
+ "volume": "9 L",
+ "price": 500000,
+ "copy-from": "vehicle_controls"
}
]
diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json
index 6a3f55cf95874..a90b5e5e95bb1 100644
--- a/data/json/recipes/recipe_vehicle.json
+++ b/data/json/recipes/recipe_vehicle.json
@@ -392,5 +392,27 @@
"using": [ [ "welding_standard", 1 ] ],
"qualities": [ { "id": "DRILL", "level": 3 } ],
"components": [ [ [ "scrap", 2 ] ] ]
+ },
+ {
+ "type": "recipe",
+ "result": "turret_controls",
+ "category": "CC_OTHER",
+ "subcategory": "CSC_OTHER_VEHICLE",
+ "skill_used": "electronics",
+ "skills_required": [ [ "computer", 5 ], [ "mechanics", 3 ] ],
+ "difficulty": 5,
+ "time": "2 h",
+ "autolearn": true,
+ "using": [ [ "soldering_standard", 10 ] ],
+ "qualities": [ { "id": "SCREW", "level": 1 } ],
+ "tools": [ [ [ "laptop", -1 ] ] ],
+ "components": [
+ [ [ "targeting_module", 1 ] ],
+ [ [ "ai_module", 1 ] ],
+ [ [ "gun_module", 1 ] ],
+ [ [ "cable", 10 ] ],
+ [ [ "omnicamera", 1 ] ],
+ [ [ "robot_controls", 1 ] ]
+ ]
}
]
diff --git a/data/json/vehicleparts/vehicle_parts.json b/data/json/vehicleparts/vehicle_parts.json
index a97fe8adb7a9c..c8602c7f7edcb 100644
--- a/data/json/vehicleparts/vehicle_parts.json
+++ b/data/json/vehicleparts/vehicle_parts.json
@@ -3100,5 +3100,31 @@
"flags": [ "TURRET_MOUNT" ],
"breaks_into": [ { "item": "scrap", "count": [ 1, 4 ] } ],
"damage_reduction": { "all": 54 }
+ },
+ {
+ "type": "vehicle_part",
+ "id": "controls_turret",
+ "name": "turret control unit",
+ "symbol": "$",
+ "color": "yellow",
+ "broken_symbol": "$",
+ "broken_color": "red",
+ "damage_modifier": 10,
+ "durability": 50,
+ "epower": -250,
+ "item": "turret_controls",
+ "description": "A set of motor, camera, and an AI unit which allows for tracking targets, friend-or-foe identification, and firing the connected turret in full automatic mode. When installed over the turret, it will enable auto targeting mode for said turret.",
+ "folded_volume": 3,
+ "flags": [ "ENABLED_DRAINS_EPOWER", "TURRET_CONTROLS", "UNMOUNT_ON_DAMAGE" ],
+ "requirements": {
+ "install": {
+ "time": 120000,
+ "skills": [ [ "mechanics", 3 ], [ "electronics", 3 ] ],
+ "qualities": [ { "id": "SCREW", "level": 1 } ]
+ },
+ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": 8000, "using": [ [ "adhesive", 1 ] ] },
+ "removal": { "skills": [ [ "mechanics", 3 ] ], "qualities": [ { "id": "SCREW", "level": 1 } ] }
+ },
+ "breaks_into": "ig_vp_device"
}
]
diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md
index 4ea9d37de5214..3726bbbcb6ca5 100644
--- a/doc/JSON_FLAGS.md
+++ b/doc/JSON_FLAGS.md
@@ -1371,6 +1371,7 @@ Those flags are added by the game code to specific items (that specific welder,
- ```TOWEL``` Can be used to dry yourself up.
- ```TRACKED``` Contributes to steering effectiveness but doesn't count as a steering axle for install difficulty and still contributes to drag for the center of steering calculation.
- ```TRACK``` Allows the vehicle installed on, to be marked and tracked on map.
+- ```TURRET_CONTROLS``` If part with this flag is installed over the turret, it allows to set said turret's targeting mode to full auto.
- ```TURRET_MOUNT``` Parts with this flag are suitable for installing turrets.
- ```TURRET``` Is a weapon turret. Can only be installed on a part with ```TURRET_MOUNT``` flag.
- ```UNMOUNT_ON_DAMAGE``` Part breaks off the vehicle when destroyed by damage.
diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp
index 3ec7879bf3f0f..e5b9d0687a866 100644
--- a/src/savegame_json.cpp
+++ b/src/savegame_json.cpp
@@ -2514,6 +2514,15 @@ void vehicle::deserialize( JsonIn &jsin )
for( const vpart_reference &vp : get_any_parts( "TURRET" ) ) {
install_part( vp.mount(), vpart_id( "turret_mount" ), false );
+
+ //Forcibly set turrets' targeting mode to manual if no turret control unit is present on turret's tile on loading save
+ if( !has_part( global_part_pos3( vp.part() ), "TURRET_CONTROLS" ) ) {
+ vp.part().enabled = false;
+ }
+ //Set turret control unit's state equal to turret's targeting mode on loading save
+ for( const vpart_reference &turret_part : get_any_parts( "TURRET_CONTROLS" ) ) {
+ turret_part.part().enabled = vp.part().enabled;
+ }
}
// Add vehicle mounts to cars that are missing them.
diff --git a/src/turret.cpp b/src/turret.cpp
index 874e8b367eab1..c25574c272647 100644
--- a/src/turret.cpp
+++ b/src/turret.cpp
@@ -292,12 +292,16 @@ void vehicle::turrets_set_targeting()
{
std::vector turrets;
std::vector locations;
+ std::vector turret_controls;
for( auto &p : parts ) {
- if( p.base.is_gun() && !p.info().has_flag( "MANUAL" ) ) {
+ if( p.base.is_gun() ) {
turrets.push_back( &p );
locations.push_back( global_part_pos3( p ) );
}
+ if( part_flag( index_of_part( &p ), "TURRET_CONTROLS" ) ) {
+ turret_controls.push_back( &p );
+ }
}
pointmenu_cb callback( locations );
@@ -312,8 +316,11 @@ void vehicle::turrets_set_targeting()
menu.w_y = 2;
for( auto &p : turrets ) {
- menu.addentry( -1, true, MENU_AUTOASSIGN, "%s [%s]", p->name(),
- p->enabled ? _( "auto" ) : _( "manual" ) );
+ menu.addentry( -1, has_part( global_part_pos3( *p ), "TURRET_CONTROLS" ), MENU_AUTOASSIGN,
+ "%s [%s]", p->name(), p->enabled ?
+ _( "auto -> manual" ) : has_part( global_part_pos3( *p ), "TURRET_CONTROLS" ) ?
+ _( "manual -> auto" ) :
+ _( "manual (turret control unit required for auto mode)" ) );
}
menu.query();
@@ -322,7 +329,12 @@ void vehicle::turrets_set_targeting()
}
sel = menu.ret;
- turrets[ sel ]->enabled = !turrets[ sel ]->enabled;
+ if( has_part( locations[ sel ], "TURRET_CONTROLS" ) ) {
+ turrets[sel]->enabled = !turrets[sel]->enabled;
+ turret_controls[sel]->enabled = turrets[sel]->enabled;
+ } else {
+ turrets[sel]->enabled = false;
+ }
// clear the turret's current targets to prevent unwanted auto-firing
tripoint pos = locations[ sel ];
@@ -381,7 +393,8 @@ bool vehicle::turrets_aim( bool manual, bool automatic, vehicle_part *tur_part )
} ), last );
if( opts.empty() ) {
- add_msg( m_warning, _( "Can't aim turrets: all turrets are offline" ) );
+ add_msg( m_warning,
+ _( "Can't aim turrets: all turrets are offline or set to manual targeting mode." ) );
return false;
}
diff --git a/src/veh_type.cpp b/src/veh_type.cpp
index dd665e618ed36..b65f3c85c9d0e 100644
--- a/src/veh_type.cpp
+++ b/src/veh_type.cpp
@@ -103,6 +103,7 @@ static const std::unordered_map vpart_bitflag_map =
{ "FLUIDTANK", VPFLAG_FLUIDTANK },
{ "REACTOR", VPFLAG_REACTOR },
{ "RAIL", VPFLAG_RAIL },
+ { "TURRET_CONTROLS", VPFLAG_TURRET_CONTROLS },
};
static const std::vector> standard_terrain_mod = {{
diff --git a/src/veh_type.h b/src/veh_type.h
index 297ac9e27e640..b872fd460719e 100644
--- a/src/veh_type.h
+++ b/src/veh_type.h
@@ -75,6 +75,7 @@ enum vpart_bitflags : int {
VPFLAG_FLUIDTANK,
VPFLAG_REACTOR,
VPFLAG_RAIL,
+ VPFLAG_TURRET_CONTROLS,
NUM_VPFLAGS
};
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index b5275e7827b82..e0d522bbc10c2 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1381,6 +1381,20 @@ bool vehicle::can_mount( const point &dp, const vpart_id &id ) const
}
}
+ //Turret controls must be installed on a turret
+ if( part.has_flag( "TURRET_CONTROLS" ) ) {
+ bool anchor_found = false;
+ for( const auto &elem : parts_in_square ) {
+ if( part_info( elem ).has_flag( "TURRET" ) ) {
+ anchor_found = true;
+ break;
+ }
+ }
+ if( !anchor_found ) {
+ return false;
+ }
+ }
+
//Anything not explicitly denied is permitted
return true;
}
@@ -5289,6 +5303,9 @@ void vehicle::refresh()
} else if( !camera_on && vpi.has_flag( "CAMERA" ) ) {
vp.part().enabled = false;
}
+ if( vpi.has_flag( "TURRET" ) && !has_part( global_part_pos3( vp.part() ), "TURRET_CONTROLS" ) ) {
+ vp.part().enabled = false;
+ }
}
rail_wheel_bounding_box.p1 = point( railwheel_xmin, railwheel_ymin );
From 73565ed7a8946404bac74db4f322d60814b9eff9 Mon Sep 17 00:00:00 2001
From: Siersha <45908883+Siersha@users.noreply.github.com>
Date: Wed, 16 Oct 2019 02:58:35 -0400
Subject: [PATCH 77/86] Changed how unarmed xp is calculated (#34723)
---
src/melee.cpp | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/melee.cpp b/src/melee.cpp
index 2338860344de4..97f007f190555 100644
--- a/src/melee.cpp
+++ b/src/melee.cpp
@@ -374,12 +374,15 @@ static void melee_train( player &p, int lo, int hi, const item &weap )
int bash = weap.damage_melee( DT_BASH ) + ( weap.is_null() ? 1 : 0 );
float total = std::max( cut + stab + bash, 1 );
- p.practice( skill_cutting, ceil( cut / total * rng( lo, hi ) ), hi );
- p.practice( skill_stabbing, ceil( stab / total * rng( lo, hi ) ), hi );
- // Unarmed skill scaled bashing damage and so scales with bashing damage
- p.practice( weap.is_unarmed_weapon() ? skill_unarmed : skill_bashing,
- ceil( bash / total * rng( lo, hi ) ), hi );
+ // Unarmed may deal cut, stab, and bash damage depending on the weapon
+ if( weap.is_unarmed_weapon() ) {
+ p.practice( skill_unarmed, ceil( 1 * rng( lo, hi ) ), hi );
+ } else {
+ p.practice( skill_cutting, ceil( cut / total * rng( lo, hi ) ), hi );
+ p.practice( skill_stabbing, ceil( stab / total * rng( lo, hi ) ), hi );
+ p.practice( skill_bashing, ceil( bash / total * rng( lo, hi ) ), hi );
+ }
}
void player::melee_attack( Creature &t, bool allow_special )
From 19dc3c3e009e78102569d4616f90d4efd4652ff7 Mon Sep 17 00:00:00 2001
From: ipcyborg
Date: Mon, 14 Oct 2019 18:31:17 +0300
Subject: [PATCH 78/86] Fixed targeting UI issue for reach attack.
---
src/line.cpp | 8 ++++++++
src/line.h | 1 +
src/player.cpp | 10 ++--------
src/ranged.cpp | 2 +-
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/line.cpp b/src/line.cpp
index 361c345f44133..a7f14b64ec8b1 100644
--- a/src/line.cpp
+++ b/src/line.cpp
@@ -267,6 +267,14 @@ int rl_dist( const tripoint &loc1, const tripoint &loc2 )
return square_dist( loc1, loc2 );
}
+float rl_dist_exact( const tripoint &loc1, const tripoint &loc2 )
+{
+ if( trigdist ) {
+ return trig_dist( loc1, loc2 );
+ }
+ return square_dist( loc1, loc2 );
+}
+
int manhattan_dist( const point &loc1, const point &loc2 )
{
const point d = abs( loc1 - loc2 );
diff --git a/src/line.h b/src/line.h
index 752bcc35fda3e..5b52fd599b4cc 100644
--- a/src/line.h
+++ b/src/line.h
@@ -117,6 +117,7 @@ int square_dist( const tripoint &loc1, const tripoint &loc2 );
// Choose between the above two according to the "circular distances" option
int rl_dist( const point &a, const point &b );
int rl_dist( const tripoint &loc1, const tripoint &loc2 );
+float rl_dist_exact( const tripoint &loc1, const tripoint &loc2 );
// Sum of distance in both axes
int manhattan_dist( const point &loc1, const point &loc2 );
diff --git a/src/player.cpp b/src/player.cpp
index 474205cb35421..9e99ca8097c69 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -10827,7 +10827,7 @@ std::vector player::get_targetable_creatures( const int range ) cons
{
return g->get_creatures_if( [this, range]( const Creature & critter ) -> bool {
return this != &critter && pos() != critter.pos() && // TODO: get rid of fake npcs (pos() check)
- rl_dist( pos(), critter.pos() ) <= range &&
+ round( rl_dist_exact( pos(), critter.pos() ) ) <= range &&
( sees( critter ) || sees_with_infrared( critter ) );
} );
}
@@ -10837,13 +10837,7 @@ std::vector