Skip to content

Commit

Permalink
Merge branch 'master' into spell-components-imgui
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePotatomancer committed Sep 3, 2024
2 parents 0b778cb + 01a0c36 commit 69d34c7
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 484 deletions.
20 changes: 20 additions & 0 deletions data/json/furniture_and_terrain/furniture-decorative.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,25 @@
"sound_vol": 16,
"items": [ { "item": "glass_shard", "count": [ 25, 50 ] }, { "item": "splinter", "count": [ 5, 15 ] } ]
}
},
{
"type": "furniture",
"id": "f_indoor_flagpole",
"name": "indoor flagpole",
"description": "A 2.5-meter tall flagpole on a weighted stand. You could hoist up a flag here.",
"symbol": "F",
"color": "light_gray",
"move_cost_mod": 2,
"coverage": 20,
"required_str": 1,
"flags": [ "TRANSPARENT", "PLACE_ITEM" ],
"max_volume": "2 L",
"bash": {
"str_min": 10,
"str_max": 30,
"sound": "crunch!",
"sound_fail": "whack!",
"items": [ { "item": "material_aluminium_ingot", "count": [ 4, 8 ] }, { "item": "scrap", "count": [ 2, 6 ] } ]
}
}
]
527 changes: 66 additions & 461 deletions data/json/harvest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/json/items/resources/bone.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"id": "skull_canis_triclopean",
"name": { "str": "triclopean canine skull" },
"description": "The skull of a what looks like a dog, although it has an extra eye socket.",
"copy-from": "skull_canis_medium"
"copy-from": "skull_canis"
},
{
"type": "GENERIC",
Expand Down
12 changes: 10 additions & 2 deletions data/json/mapgen/robofachq_static.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
"M": "t_ramp_up_high",
"m": "t_ramp_up_low"
},
"furniture": { "6": "f_console", ":": "f_server", "f": "f_filing_cabinet" },
"furniture": { "6": "f_console", ":": "f_server", "f": "f_filing_cabinet", "A": "f_indoor_flagpole" },
"item": { "A": { "item": "american_flag" } },
"items": { "f": { "item": "file_room", "chance": 100, "repeat": [ 10, 30 ] } },
"monster": { "T": { "monster": "mon_robofac_laserturret_mk1" } },
Expand Down Expand Up @@ -459,7 +459,15 @@
"R": "t_railing",
"W": "t_water_dispenser"
},
"furniture": { "6": "f_console", ":": "f_server", "K": "f_counter", "H": "f_armchair", "L": "f_locker", "f": "f_filing_cabinet" },
"furniture": {
"6": "f_console",
":": "f_server",
"K": "f_counter",
"H": "f_armchair",
"L": "f_locker",
"f": "f_filing_cabinet",
"A": "f_indoor_flagpole"
},
"item": { "A": { "item": "american_flag" } },
"items": {
"F": { "item": "fridge", "chance": 80 },
Expand Down
4 changes: 2 additions & 2 deletions data/json/monsters/mammal.json
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@
"dodge": 2,
"vision_night": 6,
"stomach_size": 650,
"harvest": "mammal_fur_canis",
"harvest": "dog_with_skull_fur",
"reproduction": { "baby_monster": "mon_dog_gpyrenees_pup", "baby_count": 7, "baby_timer": 320 },
"//2": "1-7 puppies & 300-320 days per-litter for size medium canines"
},
Expand Down Expand Up @@ -2626,7 +2626,7 @@
"melee_damage": [ { "damage_type": "cut", "amount": 4 } ],
"dodge": 4,
"vision_night": 5,
"harvest": "mammal_fur_canis",
"harvest": "dog_with_skull_fur",
"dissect": "dissect_lupine_sample_single",
"weakpoint_sets": [ "wps_animal_quadruped" ],
"families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_canine" ],
Expand Down
4 changes: 2 additions & 2 deletions data/json/monsters/mutant_mammal.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
{ "id": "scratch_grab_required" }
],
"stomach_size": 500,
"harvest": "mutant_mammal_fur",
"harvest": "dog_with_skull_fur_mutant",
"path_settings": { "max_dist": 7 },
"extend": { "flags": [ "NO_BREED" ] }
},
Expand All @@ -159,7 +159,7 @@
"melee_dice_sides": 8,
"melee_damage": [ { "damage_type": "cut", "amount": 4 } ],
"path_settings": { "max_dist": 7 },
"harvest": "mutant_mammal_fur",
"harvest": "dog_with_skull_fur_mutant",
"extend": { "flags": [ "NO_BREED", "BADVENOM" ] }
},
{
Expand Down
13 changes: 2 additions & 11 deletions data/mods/Xedra_Evolved/harvest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,9 @@
},
{
"id": "fae_march_lord",
"//": "same as fae_changeling but with a skull.",
"type": "harvest",
"entries": [
{ "drop": "skull_march_lord", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 },
{ "drop": "fae_meat", "type": "flesh", "mass_ratio": 0.3 },
{ "drop": "fae_meat_scrap", "type": "flesh", "mass_ratio": 0.03 },
{ "drop": "fae_organs", "type": "flesh", "mass_ratio": 0.1 },
{ "drop": "fae_blood", "type": "blood", "mass_ratio": 0.1 },
{ "drop": "bone", "type": "bone", "mass_ratio": 0.15 },
{ "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 },
{ "drop": "fat", "type": "flesh", "mass_ratio": 0.04 }
]
"copy-from": "fae_changeling",
"extend": { "entries": [ { "drop": "skull_march_lord", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 } ] }
},
{
"id": "stoneling",
Expand Down
9 changes: 7 additions & 2 deletions src/clzones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,11 @@ std::optional<std::string> zone_manager::query_name( const std::string &default_
}
}

static std::string wrap60( const std::string &text )
{
return string_join( foldstring( text, 60 ), "\n" );
}

std::optional<zone_type_id> zone_manager::query_type( bool personal ) const
{
const auto &types = get_manager().get_types();
Expand All @@ -609,13 +614,13 @@ std::optional<zone_type_id> zone_manager::query_type( bool personal ) const

uilist as_m;
as_m.desc_enabled = true;
as_m.text = _( "Select zone type:" );
as_m.title = _( "Select zone type:" );

size_t i = 0;
for( const auto &pair : types_vec ) {
const zone_type &type = pair.second;

as_m.addentry_desc( i++, true, MENU_AUTOASSIGN, type.name(), type.desc() );
as_m.addentry_desc( i++, true, MENU_AUTOASSIGN, type.name(), wrap60( type.desc() ) );
}

as_m.query();
Expand Down
2 changes: 1 addition & 1 deletion src/computer_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ void computer_session::action_toll()
reset_terminal();
} else {
comp.next_attempt = calendar::turn + 1_minutes;
sounds::sound( get_player_character().pos(), 120, sounds::sound_t::music,
sounds::sound( get_player_character().pos(), 120, sounds::sound_t::alarm,
//~ the sound of a church bell ringing
_( "Bohm… Bohm… Bohm…" ), true, "environment", "church_bells" );

Expand Down
6 changes: 4 additions & 2 deletions src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ void uilist_impl::draw_controls()
parent.hovered = parent.fentries[ i ];
}
ImGui::SameLine( 0, 0 );
cataimgui::draw_colored_text( entry.hotkey.value().short_description(),
is_selected ? parent.hilight_color : parent.hotkey_color );
if( entry.hotkey.has_value() ) {
cataimgui::draw_colored_text( entry.hotkey.value().short_description(),
is_selected ? parent.hilight_color : parent.hotkey_color );
}

ImGui::TableSetColumnIndex( 1 );
nc_color color = ( is_selected ?
Expand Down

0 comments on commit 69d34c7

Please sign in to comment.