Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport from upstream #1

Merged
merged 10,000 commits into from
May 6, 2020
Merged

Backport from upstream #1

merged 10,000 commits into from
May 6, 2020

Conversation

LambdaSix
Copy link
Owner

No description provided.

KorGgenT and others added 30 commits May 2, 2020 16:05
this also fixes a bug where you have a wielded sealed plastic bag, try to pick something up, and it crashes.
add an item::combine function that combines two items.
This test still needs some more work, but this is the minimum to get the test passing
Using `i_add` for these test cases appears to run into complications
with needing a container for liquids, and storage in inventory for the
item. These considerations get in the way of what we're testing, which
is simply the effects of using various items, and this can be done
without putting the item in the inventory.
Fris0uman and others added 29 commits May 5, 2020 10:35
Add a can_resume_with function to activity_actor and migrate ACT_DIG and ACT_DIG_CHANNEL
…er-2020-05-06

Declutter overmap terrain definitions (2020-05-06)
* Shirt typo

* Monster typos
When doing stupid things, such as blacklisting all items in the game,
the game would crash on loading trying to inline an empty list of
requirements. Check that that list is not empty before attempting to
do anything with it.
Things such as turrets firing weapons and taking down furniture could
place items on that map that were blacklisted. Make sure an item is not
blacklisted before placing it.

There is some minor possibility for crashing here, by adding a new way
this function can return a null item reference. There were already ways
this function could return a null item reference, so anything where this
would cause a crash could already be problematic.
Includes test cases for `Creature` effects, covering functions:

- add_effect, remove_effect
- has_effect, has_effect_with_flag
- resists_effect, is_immune_effect

Behaviors exercised:

- characters may have an effect on a body part, or all-body
- monsters may only have all-body effects (not having body parts)
- monsters immune to an effect can still be forced to have it
- fleshy, warm-blooded monsters can bleed and be poisoned
- bony, non-warm monsters are immune to bleeding and poison
- fleshy, non-warm-blooded monsters are immune to bleeding and poison
- Slimy mutation gives immunity to corroding effect
- Tentacle bracing mutation gives immunity to downing
- Strong Stomach mutation gives immunity to nausea
Expand blacklisting to all map item placement functions
Aluminum and steel kegs are supposed to contain 50L and were set to 3 L.
Updated both to 50L and set the max weights higher as well.
* add categorize toggle to inventory
* allow toggle back to original
* Delete inventory_ui.cpp
* change default to contained items in own_inv_column
Includes test cases focused on `effect` class functions, including:

- High-level: decay (invoked by Creature::process_effects)
- Duration: get_duration, set_duration, get_max_duration
- Permanence: is_permanent, pause_effect, unpause_effect
- Display: disp_name, get_speed_name, disp_short_desc
- Intensity: get_intensity, set_intensity, mod_intensity
- Body parts: get_bp, set_bp
- Modifiers: get_mod, get_amount

Example behaviors exercised:

- simple class initialization test
- minimum / maximum intensity level
- intensity tracks duration for duration-related effects
- decay reduces duration until the effect is removed
- displayed names can vary based on intensity
- pause and unpause effect permanence
- switch grab effect body part back and forth

Some related JSON attributes:

- "name": [ "A", "B", "C"] // multiple intensity names
- "speed_name": "@-name"   // as shown in the @ menu
- "base_mods": [ ... ]     // fixed mod to stats, healing, etc.
- "scaling_mods": [ ... ]  // intensity-based mods to stats, etc.
- "int_dur_factor": time   // for duration-based intensity

Includes some JSON test data to use for data-dependent checks.
@LambdaSix LambdaSix merged commit e52a5a6 into LambdaSix:master May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.