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

Fixed "Zone construction build wooden wall builds window instead. #32965" #33083

Closed

Conversation

ipcyborg
Copy link
Contributor

@ipcyborg ipcyborg commented Aug 9, 2019

Summary

SUMMARY: Bugfixes "Zone construction build wooden wall builds window instead. #32965"

Purpose of change

Fixes #32965

Describe the solution

Added recursive functions to handle complex constructions:

get_final_construction detects what was really selected from the construction menu.
Not just <First construction that contains "Build Wood Wall">,
but <The final construction is Wood Wall (t_wall, not t_wall_half)>.

find_base_construction looks up the construction "tree" for the first building that we can actually construct here, and which will lead to our goal (may be indirectly).

Now it is possible to have a zone "Build Wood Wall" over some chipped/broken wooden walls or empty windows. The result will be "wooden wall where possible".

EDIT:
Now blueprint construction is a continuous process. Once started it can be interrupted at any time (for ex., using 5) and then continued.
Partial (unfinished) construction in the blueprint zone will be continued.
Note, that there is no extra check that this specific construction will lead to the goal in blueprint. It is just assumed. I think it is safe enough, no?

Describe alternatives you've considered

Need some dependency structure in constructions (like a tree). For now just use logic like <"*_half" is not the final construction>.

Additional context

None

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones NPC / Factions NPCs, AI, Speech, Factions, Ownership Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Aug 9, 2019
@ghost
Copy link

ghost commented Aug 10, 2019

Ill review this properly later, if its working better ( I never was completely happy with the pre-requisite construction checking I was doing ), then I will incorporate it into the new activity loop im working on.

@ZhilkinSerg ZhilkinSerg self-assigned this Aug 14, 2019
ZhilkinSerg and others added 23 commits August 21, 2019 11:21
* For CleverRaven#33254 added recepy to make lab kit

* For CleverRaven#33254 added requirement for a box to keep the kit in
Simplified conditional assignment

Co-Authored-By: BevapDin <[email protected]>
… do it.

The called functions do string formatting on their own.
The format string does not contain any format specifier so the output will be the same as the input anyway, so why even call the function?
No comment. Really: none. I have no words for this. Why? And ... Just: no.
especially as there are no further arguments there to be formatted.
Translate the raw string literal, not the formatted string.
Use `to_string( time_duration )` instead of replicating the code.
The craftable tarp raincatcher is set to Difficulty 99, which results NO way to remove/pick back up the raincatcher once it is placed down. The character simply says "That raincatcher looks too dangerous to mess with. Better leave it alone". I'm not sure why its set that high, so i've simply lowered it to match other funnels.
This is inside a set inside mtype, and it not being movable was causing
lots of unnecessary clone operations in the underlying mattack_actors.
…2019-08-21

Change JSON style check job name
Some spell objects are constructed during data loading.  At that time
spell pointers can still get invalidated, so this could end up as a
dangling pointer.

Just store the string id instead, and look it up each time.

If this proves to be a performance issue, we could load the pointer at
finalization time.
Fixes CleverRaven#25430

The ability to disassemble mininukes was unintentionally lost when the
ability to craft them was removed.
pierredavidbelanger and others added 23 commits August 28, 2019 23:36
…en#33372)

* initial impl of using zone as firewood source while handling item activity

* fix my C++ newbeness

* astyle

* new SOURCE_FIREWOOD zone (named "Source: Firewood") + make the old way of marking firewood source still usable

* SOURCE_FIREWOOD zone description now state that waiting *does* trigger the refuel fire code
…faction-mission-rewards

update mission rewards isherwood
Ensure proper road connections, add subway connector level (non-functional)
Disable generic Rewards for Hub 01 missions
* Show if monsters and NPCs are aware of the player in their description (visible when x - looking at them).

* Fix alignment for monster descriptions.
@ipcyborg
Copy link
Contributor Author

ipcyborg commented Aug 29, 2019

Rebased.

Added meets_skill_requirements for construction into Character.

@anothersimulacrum
Copy link
Member

Looks like something went wrong
image

@ipcyborg
Copy link
Contributor Author

Agreed. I followed the git hub rebase instruction here:
https://help.github.com/en/articles/using-git-rebase-on-the-command-line

Don't know how to fix this.
Probably faster to just open new PR and move the changes there?

@ipcyborg
Copy link
Contributor Author

Closed by #33673 (clean rebase)

@ipcyborg ipcyborg closed this Aug 30, 2019
@ipcyborg ipcyborg deleted the fix-32965-construction-zones branch August 30, 2019 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zone construction build wooden wall builds window instead.